2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								/ * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									MIT  License  http : //www.opensource.org/licenses/mit-license.php
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									Author  Tobias  Koppers  @ sokra 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								* / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								"use strict" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 21:01:20 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  fs  =  require ( "fs" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								const  path  =  require ( "path" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-01 01:56:32 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-26 00:41:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									ASSET _MODULE _TYPE , 
							 
						 
					
						
							
								
									
										
										
										
											2025-09-25 02:01:10 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									ASSET _MODULE _TYPE _BYTES , 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-01 04:19:07 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									ASSET _MODULE _TYPE _INLINE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									ASSET _MODULE _TYPE _RESOURCE , 
							 
						 
					
						
							
								
									
										
										
										
											2025-09-19 09:16:25 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									ASSET _MODULE _TYPE _SOURCE , 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-19 11:29:24 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									CSS _MODULE _TYPE , 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-03 17:06:45 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									CSS _MODULE _TYPE _AUTO , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									CSS _MODULE _TYPE _GLOBAL , 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-04 22:22:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									CSS _MODULE _TYPE _MODULE , 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-03 17:06:45 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									JAVASCRIPT _MODULE _TYPE _AUTO , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									JAVASCRIPT _MODULE _TYPE _DYNAMIC , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									JAVASCRIPT _MODULE _TYPE _ESM , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									JSON _MODULE _TYPE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									WEBASSEMBLY _MODULE _TYPE _ASYNC , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									WEBASSEMBLY _MODULE _TYPE _SYNC 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-01 01:56:32 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								}  =  require ( "../ModuleTypeConstants" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								const  Template  =  require ( "../Template" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  {  cleverMerge  }  =  require ( "../util/cleverMerge" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-28 19:42:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  { 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-03 17:06:45 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									getDefaultTarget , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-28 19:42:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									getTargetProperties , 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-03 17:06:45 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									getTargetsProperties 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-28 19:42:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								}  =  require ( "./target" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-04-13 02:33:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").CacheOptionsNormalized} CacheOptionsNormalized */ 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").Context} Context */ 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").CssGeneratorOptions} CssGeneratorOptions */ 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").EntryDescription} EntryDescription */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").EntryNormalized} Entry */ 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").Environment} Environment */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").Experiments} Experiments */ 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-19 01:23:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").ExperimentsNormalized} ExperimentsNormalized */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").ExternalsPresets} ExternalsPresets */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 03:45:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").ExternalsType} ExternalsType */ 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").FileCacheOptions} FileCacheOptions */ 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").GeneratorOptionsByModuleTypeKnown} GeneratorOptionsByModuleTypeKnown */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").InfrastructureLogging} InfrastructureLogging */ 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */ 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 22:24:10 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").JsonGeneratorOptions} JsonGeneratorOptions */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-20 03:25:49 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").Library} Library */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").LibraryName} LibraryName */ 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:54:13 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").Loader} Loader */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 18:58:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").Mode} Mode */ 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-20 22:08:58 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").ModuleOptionsNormalized} ModuleOptions */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").Node} WebpackNode */ 
							 
						 
					
						
							
								
									
										
										
										
											2025-08-20 18:50:12 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").OptimizationNormalized} Optimization */ 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").OptimizationSplitChunksOptions} OptimizationSplitChunksOptions */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").OutputNormalized} Output */ 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").ParserOptionsByModuleTypeKnown} ParserOptionsByModuleTypeKnown */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").Performance} Performance */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").ResolveOptions} ResolveOptions */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").RuleSetRules} RuleSetRules */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 06:36:16 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").SnapshotOptions} SnapshotOptions */ 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-13 02:33:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptionsNormalized */ 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("../Module")} Module */ 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-01 22:22:45 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("./target").PlatformTargetProperties} PlatformTargetProperties */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/** @typedef {import("./target").TargetProperties} TargetProperties */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-08-20 18:50:12 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ template  T 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ typedef  { {  [ P  in  keyof  T ] - ? :  T [ P ]  extends  object  ?  RecursiveNonNullable < NonNullable < T [ P ] >>  :  NonNullable < T [ P ] >  } }  RecursiveNonNullable 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ typedef  { Output  &  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  uniqueName :  NonNullable < Output [ "uniqueName" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  filename :  NonNullable < Output [ "filename" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  cssFilename :  NonNullable < Output [ "cssFilename" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  chunkFilename :  NonNullable < Output [ "chunkFilename" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  cssChunkFilename :  NonNullable < Output [ "cssChunkFilename" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  hotUpdateChunkFilename :  NonNullable < Output [ "hotUpdateChunkFilename" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  hotUpdateGlobal :  NonNullable < Output [ "hotUpdateGlobal" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  assetModuleFilename :  NonNullable < Output [ "assetModuleFilename" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  webassemblyModuleFilename :  NonNullable < Output [ "webassemblyModuleFilename" ] > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  sourceMapFilename :  NonNullable < Output [ "sourceMapFilename" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  hotUpdateMainFilename :  NonNullable < Output [ "hotUpdateMainFilename" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  devtoolNamespace :  NonNullable < Output [ "devtoolNamespace" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  publicPath :  NonNullable < Output [ "publicPath" ] > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  workerPublicPath :  NonNullable < Output [ "workerPublicPath" ] > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  workerWasmLoading :  NonNullable < Output [ "workerWasmLoading" ] > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  workerChunkLoading :  NonNullable < Output [ "workerChunkLoading" ] > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  chunkFormat :  NonNullable < Output [ "chunkFormat" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  module :  NonNullable < Output [ "module" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  asyncChunks :  NonNullable < Output [ "asyncChunks" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  charset :  NonNullable < Output [ "charset" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  iife :  NonNullable < Output [ "iife" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  globalObject :  NonNullable < Output [ "globalObject" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  scriptType :  NonNullable < Output [ "scriptType" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  path :  NonNullable < Output [ "path" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  pathinfo :  NonNullable < Output [ "pathinfo" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  hashFunction :  NonNullable < Output [ "hashFunction" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  hashDigest :  NonNullable < Output [ "hashDigest" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  hashDigestLength :  NonNullable < Output [ "hashDigestLength" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  chunkLoadTimeout :  NonNullable < Output [ "chunkLoadTimeout" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  chunkLoading :  NonNullable < Output [ "chunkLoading" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  chunkLoadingGlobal :  NonNullable < Output [ "chunkLoadingGlobal" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  compareBeforeEmit :  NonNullable < Output [ "compareBeforeEmit" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  strictModuleErrorHandling :  NonNullable < Output [ "strictModuleErrorHandling" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  strictModuleExceptionHandling :  NonNullable < Output [ "strictModuleExceptionHandling" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  importFunctionName :  NonNullable < Output [ "importFunctionName" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  importMetaName :  NonNullable < Output [ "importMetaName" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  environment :  RecursiveNonNullable < Output [ "environment" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  crossOriginLoading :  NonNullable < Output [ "crossOriginLoading" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  wasmLoading :  NonNullable < Output [ "wasmLoading" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  } }  OutputNormalizedWithDefaults 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ typedef  { SnapshotOptions  &  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  managedPaths :  NonNullable < SnapshotOptions [ "managedPaths" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  unmanagedPaths :  NonNullable < SnapshotOptions [ "unmanagedPaths" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  immutablePaths :  NonNullable < SnapshotOptions [ "immutablePaths" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  resolveBuildDependencies :  NonNullable < SnapshotOptions [ "resolveBuildDependencies" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  buildDependencies :  NonNullable < SnapshotOptions [ "buildDependencies" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  module :  NonNullable < SnapshotOptions [ "module" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  resolve :  NonNullable < SnapshotOptions [ "resolve" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  } }  SnapshotNormalizedWithDefaults 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ typedef  { Optimization  &  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  runtimeChunk :  NonNullable < Optimization [ "runtimeChunk" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  splitChunks :  NonNullable < Optimization [ "splitChunks" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  mergeDuplicateChunks :  NonNullable < Optimization [ "mergeDuplicateChunks" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  removeAvailableModules :  NonNullable < Optimization [ "removeAvailableModules" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  removeEmptyChunks :  NonNullable < Optimization [ "removeEmptyChunks" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  flagIncludedChunks :  NonNullable < Optimization [ "flagIncludedChunks" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  moduleIds :  NonNullable < Optimization [ "moduleIds" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  chunkIds :  NonNullable < Optimization [ "chunkIds" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  sideEffects :  NonNullable < Optimization [ "sideEffects" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  providedExports :  NonNullable < Optimization [ "providedExports" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  usedExports :  NonNullable < Optimization [ "usedExports" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  mangleExports :  NonNullable < Optimization [ "mangleExports" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  innerGraph :  NonNullable < Optimization [ "innerGraph" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  concatenateModules :  NonNullable < Optimization [ "concatenateModules" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  avoidEntryIife :  NonNullable < Optimization [ "avoidEntryIife" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  emitOnErrors :  NonNullable < Optimization [ "emitOnErrors" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  checkWasmTypes :  NonNullable < Optimization [ "checkWasmTypes" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  mangleWasmImports :  NonNullable < Optimization [ "mangleWasmImports" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  portableRecords :  NonNullable < Optimization [ "portableRecords" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  realContentHash :  NonNullable < Optimization [ "realContentHash" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  minimize :  NonNullable < Optimization [ "minimize" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  minimizer :  NonNullable < Exclude < Optimization [ "minimizer" ] ,  "..." >> , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  nodeEnv :  NonNullable < Optimization [ "nodeEnv" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  } }  OptimizationNormalizedWithDefaults 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ typedef  { ExternalsPresets  &  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  web :  NonNullable < ExternalsPresets [ "web" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  node :  NonNullable < ExternalsPresets [ "node" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  nwjs :  NonNullable < ExternalsPresets [ "nwjs" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  electron :  NonNullable < ExternalsPresets [ "electron" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  electronMain :  NonNullable < ExternalsPresets [ "electronMain" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  electronPreload :  NonNullable < ExternalsPresets [ "electronPreload" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  electronRenderer :  NonNullable < ExternalsPresets [ "electronRenderer" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  } }  ExternalsPresetsNormalizedWithDefaults 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ typedef  { InfrastructureLogging  &  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  stream :  NonNullable < InfrastructureLogging [ "stream" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  level :  NonNullable < InfrastructureLogging [ "level" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  debug :  NonNullable < InfrastructureLogging [ "debug" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  colors :  NonNullable < InfrastructureLogging [ "colors" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  appendOnly :  NonNullable < InfrastructureLogging [ "appendOnly" ] > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  } }  InfrastructureLoggingNormalizedWithDefaults 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ typedef  { WebpackOptionsNormalized 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  context :  NonNullable < WebpackOptionsNormalized [ "context" ] >  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  infrastructureLogging :  InfrastructureLoggingNormalizedWithDefaults  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  }  WebpackOptionsNormalizedWithBaseDefaults 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ typedef  { WebpackOptionsNormalizedWithBaseDefaults 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  target :  NonNullable < WebpackOptionsNormalized [ "target" ] >  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  output :  OutputNormalizedWithDefaults  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  optimization :  OptimizationNormalizedWithDefaults  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  devtool :  NonNullable < WebpackOptionsNormalized [ "devtool" ] >  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  stats :  NonNullable < WebpackOptionsNormalized [ "stats" ] >   } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  node :  NonNullable < WebpackOptionsNormalized [ "node" ] >  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  profile :  NonNullable < WebpackOptionsNormalized [ "profile" ] >  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  parallelism :  NonNullable < WebpackOptionsNormalized [ "parallelism" ] >  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  snapshot :  SnapshotNormalizedWithDefaults  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  externalsPresets :  ExternalsPresetsNormalizedWithDefaults  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  externalsType :  NonNullable < WebpackOptionsNormalized [ "externalsType" ] >  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  watch :  NonNullable < WebpackOptionsNormalized [ "watch" ] >  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  performance :  NonNullable < WebpackOptionsNormalized [ "performance" ] >  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  recordsInputPath :  NonNullable < WebpackOptionsNormalized [ "recordsInputPath" ] >  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  &  {  recordsOutputPath :  NonNullable < WebpackOptionsNormalized [ "recordsOutputPath" ] > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  } }  WebpackOptionsNormalizedWithDefaults 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-06-07 22:29:10 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 21:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ typedef  { object }  ResolvedOptions 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-07 22:29:10 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ property  { PlatformTargetProperties  |  false }  platform  -  platform  target  properties 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								const  NODE _MODULES _REGEXP  =  /[\\/]node_modules[\\/]/i ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-13 00:24:21 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  DEFAULT _CACHE _NAME  =  "default" ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-14 03:39:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  DEFAULTS  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									// TODO webpack 6 - use xxhash64
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									HASH _FUNCTION :  "md4" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  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 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-12 09:56:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { ( )  =>  T [ P ] }  factory  a  default  value  factory  for  the  property 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								const  F  =  ( obj ,  prop ,  factory )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									if  ( obj [ prop ]  ===  undefined )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										obj [ prop ]  =  factory ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  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 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-12 09:56:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { ( )  =>  T [ P ] }  factory  a  default  value  factory  for  the  property 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								const  A  =  ( obj ,  prop ,  factory )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									const  value  =  obj [ prop ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									if  ( value  ===  undefined )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										obj [ prop ]  =  factory ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 20:28:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									}  else  if  ( Array . isArray ( value ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-25 02:13:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										/** @type {EXPECTED_ANY[] | undefined} */ 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 06:15:03 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										let  newArray ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 20:28:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										for  ( let  i  =  0 ;  i  <  value . length ;  i ++ )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											const  item  =  value [ i ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											if  ( item  ===  "..." )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 20:28:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												if  ( newArray  ===  undefined )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-22 16:03:12 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													newArray  =  value . slice ( 0 ,  i ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 20:28:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													obj [ prop ]  =  /** @type {T[P]} */  ( /** @type {unknown} */  ( newArray ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2025-08-20 18:50:12 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												const  items  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													/** @type {EXPECTED_ANY[]} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													( /** @type {unknown} */  ( factory ( ) ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												if  ( items  !==  undefined )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													for  ( const  item  of  items )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														newArray . push ( item ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 20:28:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											}  else  if  ( newArray  !==  undefined )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												newArray . push ( item ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-13 02:33:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { WebpackOptionsNormalized }  options  options  to  be  modified 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-17 00:13:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  applyWebpackOptionsBaseDefaults  =  ( options )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									F ( options ,  "context" ,  ( )  =>  process . cwd ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-06 21:20:27 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									applyInfrastructureLoggingDefaults ( options . infrastructureLogging ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-04-13 02:33:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { WebpackOptionsNormalized }  options  options  to  be  modified 
							 
						 
					
						
							
								
									
										
										
										
											2025-04-16 22:04:11 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { number = }  compilerIndex  index  of  compiler 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-07 22:38:52 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ returns  { ResolvedOptions }  Resolved  options  after  apply  defaults 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-08 00:01:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  applyWebpackOptionsDefaults  =  ( options ,  compilerIndex )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									F ( options ,  "context" ,  ( )  =>  process . cwd ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 11:31:11 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( options ,  "target" ,  ( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										getDefaultTarget ( /** @type {string} */  ( options . context ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									const  {  mode ,  name ,  target  }  =  options ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 04:09:42 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									const  targetProperties  = 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										target  ===  false 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											?  /** @type {false} */  ( false ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											:  typeof  target  ===  "string" 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 05:43:19 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												?  getTargetProperties ( target ,  /** @type {Context} */  ( options . context ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												:  getTargetsProperties ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														/** @type {string[]} */  ( target ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														/** @type {Context} */  ( options . context ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									const  development  =  mode  ===  "development" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									const  production  =  mode  ===  "production"  ||  ! mode ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-06-04 08:06:57 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									if  ( typeof  options . entry  !==  "function" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										for  ( const  key  of  Object . keys ( options . entry ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											F ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												options . entry [ key ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												"import" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												( )  =>  /** @type {[string]} */  ( [ "./src" ] ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									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 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-01-19 01:14:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									applyExperimentsDefaults ( options . experiments ,  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										production , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										development , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										targetProperties 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-24 17:35:28 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									const  futureDefaults  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										/** @type {NonNullable<ExperimentsNormalized["futureDefaults"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( options . experiments . futureDefaults ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-18 22:07:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									F ( options ,  "cache" ,  ( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										development  ?  {  type :  /** @type {"memory"} */  ( "memory" )  }  :  false 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									applyCacheDefaults ( options . cache ,  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-13 00:24:21 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										name :  name  ||  DEFAULT _CACHE _NAME , 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-01 22:59:00 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										mode :  mode  ||  "production" , 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-24 17:35:28 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										development , 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-08 00:01:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										cacheUnaffected :  options . experiments . cacheUnaffected , 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-14 03:39:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										futureDefaults , 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-08 00:01:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										compilerIndex 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 11:11:11 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									const  cache  =  Boolean ( options . cache ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-10-18 22:07:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									applySnapshotDefaults ( options . snapshot ,  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										production , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										futureDefaults 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									applyOutputDefaults ( options . output ,  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										context :  /** @type {Context} */  ( options . context ) , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										targetProperties , 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-23 19:58:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										isAffectedByBrowserslist : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											target  ===  undefined  || 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( typeof  target  ===  "string"  &&  target . startsWith ( "browserslist" ) )  || 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( Array . isArray ( target )  && 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-17 00:13:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												target . some ( ( target )  =>  target . startsWith ( "browserslist" ) ) ) , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										outputModule : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<ExperimentsNormalized["outputModule"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( options . experiments . outputModule ) , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										development , 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										entry :  options . entry , 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-14 03:43:12 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										futureDefaults , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										asyncWebAssembly : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<ExperimentsNormalized["asyncWebAssembly"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( options . experiments . asyncWebAssembly ) 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 15:23:01 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-11-02 01:15:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									applyModuleDefaults ( options . module ,  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										cache , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										syncWebAssembly : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<ExperimentsNormalized["syncWebAssembly"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( options . experiments . syncWebAssembly ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										asyncWebAssembly : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<ExperimentsNormalized["asyncWebAssembly"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( options . experiments . asyncWebAssembly ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										css : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<ExperimentsNormalized["css"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( options . experiments . css ) , 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-28 20:18:09 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										deferImport : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<ExperimentsNormalized["deferImport"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( options . experiments . deferImport ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-02 01:15:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										futureDefaults , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										isNode :  targetProperties  &&  targetProperties . node  ===  true , 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-07 21:12:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										uniqueName :  /** @type {string} */  ( options . output . uniqueName ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-14 01:14:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										targetProperties , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										mode :  options . mode 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-02 01:15:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 21:55:58 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									applyExternalsPresetsDefaults ( options . externalsPresets ,  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										targetProperties , 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 11:11:11 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										buildHttp :  Boolean ( options . experiments . buildHttp ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 21:55:58 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-20 03:25:49 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									applyLoaderDefaults ( 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-13 02:33:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										/** @type {NonNullable<WebpackOptionsNormalized["loader"]>} */  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											options . loader 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-30 01:50:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										{  targetProperties ,  environment :  options . output . environment  } 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:54:13 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 03:45:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( options ,  "externalsType" ,  ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										const  validExternalTypes  =  require ( "../../schemas/WebpackOptions.json" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											. definitions . ExternalsType . enum ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-02 20:10:54 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 03:45:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										return  options . output . library  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											validExternalTypes . includes ( options . output . library . type ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											?  /** @type {ExternalsType} */  ( options . output . library . type ) 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-20 03:25:49 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											:  options . output . module 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-05 23:13:57 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												?  "module-import" 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 05:43:19 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												:  "var" ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 03:45:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 17:44:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 00:15:27 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									applyNodeDefaults ( options . node ,  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										futureDefaults : 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-13 02:33:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<WebpackOptionsNormalized["experiments"]["futureDefaults"]>} */ 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											( options . experiments . futureDefaults ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-01 03:05:27 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										outputModule : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<WebpackOptionsNormalized["output"]["module"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( options . output . module ) , 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 00:15:27 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										targetProperties 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( options ,  "performance" ,  ( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										production  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										targetProperties  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( targetProperties . browser  ||  targetProperties . browser  ===  null ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											?  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											:  false 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									applyPerformanceDefaults ( 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-13 02:33:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										/** @type {NonNullable<WebpackOptionsNormalized["performance"]>} */ 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										( options . performance ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											production 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									applyOptimizationDefaults ( options . optimization ,  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										development , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										production , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										css : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<ExperimentsNormalized["css"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( options . experiments . css ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 11:11:11 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										records :  Boolean ( options . recordsInputPath  ||  options . recordsOutputPath ) 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									options . resolve  =  cleverMerge ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										getResolveDefaults ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											cache , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											context :  /** @type {Context} */  ( options . context ) , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											targetProperties , 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-14 00:34:05 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											mode :  /** @type {Mode} */  ( options . mode ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											css : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												/** @type {NonNullable<ExperimentsNormalized["css"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												( options . experiments . css ) 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										} ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										options . resolve 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									options . resolveLoader  =  cleverMerge ( 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 23:15:20 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										getResolveLoaderDefaults ( {  cache  } ) , 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										options . resolveLoader 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-01 22:22:45 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									return  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-07 22:29:10 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										platform : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											targetProperties  ===  false 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												?  targetProperties 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												:  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														web :  targetProperties . web , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														browser :  targetProperties . browser , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														webworker :  targetProperties . webworker , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														node :  targetProperties . node , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														nwjs :  targetProperties . nwjs , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														electron :  targetProperties . electron 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 05:43:19 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													} 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-01 22:22:45 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-19 01:23:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { ExperimentsNormalized }  experiments  options 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 21:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { object }  options  options 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 21:55:58 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . production  is  production 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . development  is  development  mode 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-19 01:14:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { TargetProperties  |  false }  options . targetProperties  target  properties 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-19 01:14:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  applyExperimentsDefaults  =  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									experiments , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									{  production ,  development ,  targetProperties  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								)  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-05 16:53:32 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( experiments ,  "futureDefaults" ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( experiments ,  "backCompat" ,  ! experiments . futureDefaults ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									D ( experiments ,  "syncWebAssembly" ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-05 16:53:32 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( experiments ,  "asyncWebAssembly" ,  experiments . futureDefaults ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									D ( experiments ,  "outputModule" ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-19 01:23:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( experiments ,  "lazyCompilation" ,  undefined ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( experiments ,  "buildHttp" ,  undefined ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-24 17:35:28 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( experiments ,  "cacheUnaffected" ,  experiments . futureDefaults ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-25 23:14:00 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( experiments ,  "deferImport" ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( experiments ,  "css" ,  ( )  =>  ( experiments . futureDefaults  ?  true  :  undefined ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 21:55:58 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									if  ( typeof  experiments . buildHttp  ===  "object" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										D ( experiments . buildHttp ,  "frozen" ,  production ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-19 01:23:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										D ( experiments . buildHttp ,  "upgrade" ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 21:55:58 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-13 02:33:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { CacheOptionsNormalized }  cache  options 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 21:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { object }  options  options 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { string }  options . name  name 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { Mode }  options . mode  mode 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-14 03:39:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . futureDefaults  is  future  defaults  enabled 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-01 22:59:00 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . development  is  development  mode 
							 
						 
					
						
							
								
									
										
										
										
											2025-04-16 22:04:11 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { number = }  options . compilerIndex  index  of  compiler 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { Experiments [ "cacheUnaffected" ] }  options . cacheUnaffected  the  cacheUnaffected  experiment  is  enabled 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-24 17:35:28 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  applyCacheDefaults  =  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									cache , 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-14 03:39:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									{  name ,  mode ,  development ,  cacheUnaffected ,  compilerIndex ,  futureDefaults  } 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-24 17:35:28 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								)  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									if  ( cache  ===  false )  return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									switch  ( cache . type )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										case  "filesystem" : 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-08 00:01:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											F ( cache ,  "name" ,  ( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												compilerIndex  !==  undefined 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 10:39:30 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													?  ` ${ ` ${ name } - ${ mode } ` } __compiler ${ compilerIndex  +  1 } __ ` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													:  ` ${ name } - ${ mode } ` 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-08 00:01:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
											D ( cache ,  "version" ,  "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											F ( cache ,  "cacheDirectory" ,  ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												const  cwd  =  process . cwd ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												/** @type {string | undefined} */ 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 21:01:20 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												let  dir  =  cwd ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												for  ( ; ; )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													try  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 21:22:36 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
														if  ( fs . statSync ( path . join ( dir ,  "package.json" ) ) . isFile ( ) )  break ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 21:01:20 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
														// eslint-disable-next-line no-empty
 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 15:37:05 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													}  catch  ( _err )  { } 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 21:01:20 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													const  parent  =  path . dirname ( dir ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													if  ( dir  ===  parent )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														dir  =  undefined ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														break ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-31 00:05:46 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													} 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-06 03:02:01 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													dir  =  parent ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 21:01:20 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
												if  ( ! dir )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													return  path . resolve ( cwd ,  ".cache/webpack" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												}  else  if  ( process . versions . pnp  ===  "1" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													return  path . resolve ( dir ,  ".pnp/.cache/webpack" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 22:48:43 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												}  else  if  ( process . versions . pnp  ===  "3" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													return  path . resolve ( dir ,  ".yarn/.cache/webpack" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 04:21:27 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												return  path . resolve ( dir ,  "node_modules/.cache/webpack" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											F ( cache ,  "cacheLocation" ,  ( )  => 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												path . resolve ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													/** @type {NonNullable<FileCacheOptions["cacheDirectory"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													( cache . cacheDirectory ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													/** @type {NonNullable<FileCacheOptions["name"]>} */  ( cache . name ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												) 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
											) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-14 03:39:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											D ( cache ,  "hashAlgorithm" ,  futureDefaults  ?  "xxhash64"  :  "md4" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
											D ( cache ,  "store" ,  "pack" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-10 19:02:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											D ( cache ,  "compression" ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-27 17:06:01 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											D ( cache ,  "profile" ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
											D ( cache ,  "idleTimeout" ,  60000 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-28 17:35:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											D ( cache ,  "idleTimeoutForInitialStore" ,  5000 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											D ( cache ,  "idleTimeoutAfterLargeChanges" ,  1000 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-20 21:22:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											D ( cache ,  "maxMemoryGenerations" ,  development  ?  5  :  Infinity ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-01 22:59:00 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											D ( cache ,  "maxAge" ,  1000  *  60  *  60  *  24  *  60 ) ;  // 1 month
 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-20 21:22:16 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											D ( cache ,  "allowCollectingMemory" ,  development ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-24 17:35:28 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											D ( cache ,  "memoryCacheUnaffected" ,  development  &&  cacheUnaffected ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-17 17:23:28 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											D ( cache ,  "readonly" ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												/** @type {NonNullable<FileCacheOptions["buildDependencies"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												( cache . buildDependencies ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												"defaultWebpack" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												[ path . resolve ( _ _dirname ,  ".." )  +  path . sep ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
											break ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-01 22:59:00 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										case  "memory" : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											D ( cache ,  "maxGenerations" ,  Infinity ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-24 17:35:28 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											D ( cache ,  "cacheUnaffected" ,  development  &&  cacheUnaffected ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-01 22:59:00 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											break ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 06:36:16 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { SnapshotOptions }  snapshot  options 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 21:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { object }  options  options 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 06:36:16 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . production  is  production 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-18 22:07:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . futureDefaults  is  future  defaults  enabled 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 06:36:16 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-18 22:07:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  applySnapshotDefaults  =  ( snapshot ,  {  production ,  futureDefaults  } )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									if  ( futureDefaults )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										F ( snapshot ,  "managedPaths" ,  ( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											process . versions . pnp  ===  "3" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												?  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														/^(.+?(?:[\\/]\.yarn[\\/]unplugged[\\/][^\\/]+)?[\\/]node_modules[\\/])/ 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 05:43:19 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													] 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-18 22:07:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												:  [ /^(.+?[\\/]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 ( "watchpack" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												if  ( match )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													return  [ path . resolve ( match [ 1 ] ,  "unplugged" ) ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-12 20:32:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												const  match  =  /^(.+?[\\/]node_modules[\\/])/ . exec ( 
							 
						 
					
						
							
								
									
										
										
										
											2021-05-11 15:31:46 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													require . resolve ( "watchpack" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-18 22:07:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												if  ( match )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													return  [ match [ 1 ] ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-18 22:07:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											return  [ ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										A ( snapshot ,  "immutablePaths" ,  ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											if  ( process . versions . pnp  ===  "1" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												const  match  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													/^(.+?[\\/]v4)[\\/]npm-watchpack-[^\\/]+-[\da-f]{40}[\\/]node_modules[\\/]/ . exec ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														require . resolve ( "watchpack" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												if  ( match )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													return  [ match [ 1 ] ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											}  else  if  ( process . versions . pnp  ===  "3" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												const  match  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													/^(.+?)[\\/]watchpack-npm-[^\\/]+\.zip[\\/]node_modules[\\/]/ . exec ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														require . resolve ( "watchpack" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												if  ( match )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													return  [ match [ 1 ] ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 22:48:43 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-18 22:07:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											return  [ ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2024-03-11 20:13:15 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( snapshot ,  "unmanagedPaths" ,  ( )  =>  [ ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 06:36:16 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( snapshot ,  "resolveBuildDependencies" ,  ( )  =>  ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										timestamp :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										hash :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( snapshot ,  "buildDependencies" ,  ( )  =>  ( {  timestamp :  true ,  hash :  true  } ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( snapshot ,  "module" ,  ( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										production  ?  {  timestamp :  true ,  hash :  true  }  :  {  timestamp :  true  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 03:16:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( snapshot ,  "contextModule" ,  ( )  =>  ( {  timestamp :  true  } ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 06:36:16 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( snapshot ,  "resolve" ,  ( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										production  ?  {  timestamp :  true ,  hash :  true  }  :  {  timestamp :  true  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-20 22:08:58 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { JavascriptParserOptions }  parserOptions  parser  options 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 21:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { object }  options  options 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-05 23:13:49 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . futureDefaults  is  future  defaults  enabled 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-28 20:18:09 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . deferImport  is  defer  import  enabled 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 22:16:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . isNode  is  node  target  platform 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-05 23:13:49 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  applyJavascriptParserOptionsDefaults  =  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									parserOptions , 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-28 20:18:09 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									{  futureDefaults ,  deferImport ,  isNode  } 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-05 23:13:49 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								)  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-20 22:08:58 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									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 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-28 16:52:30 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( parserOptions ,  "importMeta" ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-15 21:42:52 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( parserOptions ,  "dynamicImportMode" ,  "lazy" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-09 15:27:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( parserOptions ,  "dynamicImportPrefetch" ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( parserOptions ,  "dynamicImportPreload" ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-23 04:42:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( parserOptions ,  "dynamicImportFetchPriority" ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 22:16:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( parserOptions ,  "createRequire" ,  isNode ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-05-22 22:54:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( parserOptions ,  "dynamicUrl" ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-28 20:18:09 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( parserOptions ,  "deferImport" ,  deferImport ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-06 08:01:21 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									if  ( futureDefaults )  D ( parserOptions ,  "exportsPresence" ,  "error" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-20 22:08:58 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 22:24:10 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { JsonGeneratorOptions }  generatorOptions  generator  options 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-17 00:13:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  applyJsonGeneratorOptionsDefaults  =  ( generatorOptions )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 22:24:10 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( generatorOptions ,  "JSONParse" ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { CssGeneratorOptions }  generatorOptions  generator  options 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 21:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { object }  options  options 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { TargetProperties  |  false }  options . targetProperties  target  properties 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								const  applyCssGeneratorOptionsDefaults  =  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									generatorOptions , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									{  targetProperties  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								)  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										generatorOptions , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"exportsOnly" , 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-25 22:51:47 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										! targetProperties  ||  targetProperties . document  ===  false 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-26 14:53:52 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( generatorOptions ,  "esModule" ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-21 21:01:38 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { ModuleOptions }  module  options 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 21:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { object }  options  options 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . cache  is  caching  enabled 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . syncWebAssembly  is  syncWebAssembly  enabled 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . asyncWebAssembly  is  asyncWebAssembly  enabled 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . css  is  css  enabled 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-05 23:13:49 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . futureDefaults  is  future  defaults  enabled 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-02 01:15:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { string }  options . uniqueName  the  unique  name 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 22:16:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . isNode  is  node  target  platform 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-28 20:18:09 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . deferImport  is  defer  import  enabled 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { TargetProperties  |  false }  options . targetProperties  target  properties 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-07 21:12:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { Mode  |  undefined }  options . mode  mode 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								const  applyModuleDefaults  =  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									module , 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										cache , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										syncWebAssembly , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										asyncWebAssembly , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										css , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										futureDefaults , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										isNode , 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-02 01:15:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										uniqueName , 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-14 01:14:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										targetProperties , 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-28 20:18:09 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										mode , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										deferImport 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								)  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									if  ( cache )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											module , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											"unsafeCache" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											 *  @ param  { Module }  module  module 
							 
						 
					
						
							
								
									
										
										
										
											2025-05-01 22:36:51 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											 *  @ returns  { boolean }  true ,  if  we  want  to  cache  the  module 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											 * / 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-17 00:13:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											( module )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												const  name  =  module . nameForCondition ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-05-01 22:36:51 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												if  ( ! name )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												return  NODE _MODULES _REGEXP . test ( name ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									}  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										D ( module ,  "unsafeCache" ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 07:19:11 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( module . parser ,  ASSET _MODULE _TYPE ,  ( )  =>  ( { } ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-07 21:12:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										/** @type {NonNullable<ParserOptionsByModuleTypeKnown[ASSET_MODULE_TYPE]>} */ 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-04 22:22:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										( module . parser [ ASSET _MODULE _TYPE ] ) , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										"dataUrlCondition" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( )  =>  ( { } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									if  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										typeof  ( 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-07 21:12:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<ParserOptionsByModuleTypeKnown[ASSET_MODULE_TYPE]>} */ 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-04 22:22:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											( module . parser [ ASSET _MODULE _TYPE ] ) . dataUrlCondition 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										)  ===  "object" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									)  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										D ( 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-07 21:12:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<ParserOptionsByModuleTypeKnown[ASSET_MODULE_TYPE]>} */ 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-04 22:22:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											( module . parser [ ASSET _MODULE _TYPE ] ) . dataUrlCondition , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											"maxSize" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											8096 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( module . parser ,  "javascript" ,  ( )  =>  ( { } ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-14 01:14:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( module . parser ,  JSON _MODULE _TYPE ,  ( )  =>  ( { } ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( 
							 
						 
					
						
							
								
									
										
										
										
											2025-05-01 22:36:51 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										/** @type {NonNullable<ParserOptionsByModuleTypeKnown[JSON_MODULE_TYPE]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( module . parser [ JSON _MODULE _TYPE ] ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-14 01:14:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										"exportsDepth" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										mode  ===  "development"  ?  1  :  Infinity 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									applyJavascriptParserOptionsDefaults ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										/** @type {NonNullable<ParserOptionsByModuleTypeKnown["javascript"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( module . parser . javascript ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											futureDefaults , 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-28 20:18:09 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											deferImport , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											isNode 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 22:24:10 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( module . generator ,  "json" ,  ( )  =>  ( { } ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									applyJsonGeneratorOptionsDefaults ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										/** @type {NonNullable<GeneratorOptionsByModuleTypeKnown["json"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( module . generator . json ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									if  ( css )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-04 22:22:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										F ( module . parser ,  CSS _MODULE _TYPE ,  ( )  =>  ( { } ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-13 18:23:30 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-07 21:12:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<ParserOptionsByModuleTypeKnown[CSS_MODULE_TYPE]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( module . parser [ CSS _MODULE _TYPE ] ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											"import" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<ParserOptionsByModuleTypeKnown[CSS_MODULE_TYPE]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( module . parser [ CSS _MODULE _TYPE ] ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											"url" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<ParserOptionsByModuleTypeKnown[CSS_MODULE_TYPE]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( module . parser [ CSS _MODULE _TYPE ] ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											"namedExports" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-13 18:23:30 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-04 22:22:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										F ( module . generator ,  CSS _MODULE _TYPE ,  ( )  =>  ( { } ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										applyCssGeneratorOptionsDefaults ( 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-07 21:12:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<GeneratorOptionsByModuleTypeKnown[CSS_MODULE_TYPE]>} */ 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-04 22:22:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											( module . generator [ CSS _MODULE _TYPE ] ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											{  targetProperties  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-22 19:58:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-11-02 01:15:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										const  localIdentName  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											uniqueName . length  >  0  ?  "[uniqueName]-[id]-[local]"  :  "[id]-[local]" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-04 22:22:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										F ( module . generator ,  CSS _MODULE _TYPE _AUTO ,  ( )  =>  ( { } ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-07 21:12:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<GeneratorOptionsByModuleTypeKnown[CSS_MODULE_TYPE_AUTO]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( module . generator [ CSS _MODULE _TYPE _AUTO ] ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											"localIdentName" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											localIdentName 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<GeneratorOptionsByModuleTypeKnown[CSS_MODULE_TYPE_AUTO]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( module . generator [ CSS _MODULE _TYPE _AUTO ] ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											"exportsConvention" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											"as-is" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-22 19:58:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-04 22:22:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										F ( module . generator ,  CSS _MODULE _TYPE _MODULE ,  ( )  =>  ( { } ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-22 19:58:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										D ( 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-07 21:12:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<GeneratorOptionsByModuleTypeKnown[CSS_MODULE_TYPE_MODULE]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( module . generator [ CSS _MODULE _TYPE _MODULE ] ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-22 19:58:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											"localIdentName" , 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-02 01:15:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											localIdentName 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-22 19:58:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-07 21:12:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<GeneratorOptionsByModuleTypeKnown[CSS_MODULE_TYPE_MODULE]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( module . generator [ CSS _MODULE _TYPE _MODULE ] ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											"exportsConvention" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											"as-is" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-22 19:58:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-04 22:22:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										F ( module . generator ,  CSS _MODULE _TYPE _GLOBAL ,  ( )  =>  ( { } ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-22 19:58:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										D ( 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-07 21:12:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<GeneratorOptionsByModuleTypeKnown[CSS_MODULE_TYPE_GLOBAL]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( module . generator [ CSS _MODULE _TYPE _GLOBAL ] ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-22 19:58:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											"localIdentName" , 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-02 01:15:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											localIdentName 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-22 19:58:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-07 21:12:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<GeneratorOptionsByModuleTypeKnown[CSS_MODULE_TYPE_GLOBAL]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( module . generator [ CSS _MODULE _TYPE _GLOBAL ] ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											"exportsConvention" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											"as-is" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									A ( module ,  "defaultRules" ,  ( )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-02 20:41:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										const  esm  =  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-01 01:56:32 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											type :  JAVASCRIPT _MODULE _TYPE _ESM , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-02 20:41:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											resolve :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												byDependency :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													esm :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														fullySpecified :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										const  commonjs  =  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-01 01:56:32 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											type :  JAVASCRIPT _MODULE _TYPE _DYNAMIC 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-02 20:41:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										} ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
										/** @type {RuleSetRules} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										const  rules  =  [ 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-17 16:27:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												mimetype :  "application/node" , 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-01 01:56:32 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												type :  JAVASCRIPT _MODULE _TYPE _AUTO 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
											} , 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-05 05:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											{ 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
												test :  /\.json$/i , 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-01 01:56:32 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												type :  JSON _MODULE _TYPE 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-18 15:00:28 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												mimetype :  "application/json" , 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-01 01:56:32 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												type :  JSON _MODULE _TYPE 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-02 21:07:15 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											{ 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-02 20:41:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												test :  /\.mjs$/i , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												... esm 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												test :  /\.js$/i , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												descriptionData :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													type :  "module" 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-17 16:27:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												} , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-02 20:41:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												... esm 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												test :  /\.cjs$/i , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												... commonjs 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												test :  /\.js$/i , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												descriptionData :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													type :  "commonjs" 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-17 16:27:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												} , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-02 20:41:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												... commonjs 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											{ 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-05 19:41:25 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												mimetype :  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-17 16:27:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													or :  [ "text/javascript" ,  "application/javascript" ] 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-05 19:41:25 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												} , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-02 20:41:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												... esm 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										] ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
										if  ( asyncWebAssembly )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-17 21:57:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											const  wasm  =  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-01 01:56:32 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												type :  WEBASSEMBLY _MODULE _TYPE _ASYNC , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-02 20:41:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												rules :  [ 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-17 21:57:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														descriptionData :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
															type :  "module" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														resolve :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
															fullySpecified :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													} 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-02 20:41:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
											rules . push ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												test :  /\.wasm$/i , 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-17 21:57:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												... wasm 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
											} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-18 15:00:28 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											rules . push ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												mimetype :  "application/wasm" , 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-17 21:57:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												... wasm 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-18 15:00:28 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
										}  else  if  ( syncWebAssembly )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-17 21:57:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											const  wasm  =  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-01 01:56:32 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												type :  WEBASSEMBLY _MODULE _TYPE _SYNC , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-02 20:41:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												rules :  [ 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-17 21:57:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														descriptionData :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
															type :  "module" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														resolve :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
															fullySpecified :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													} 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-02 20:41:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
											rules . push ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												test :  /\.wasm$/i , 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-17 21:57:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												... wasm 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
											} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-18 15:00:28 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											rules . push ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												mimetype :  "application/wasm" , 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-17 21:57:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												... wasm 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-18 15:00:28 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-30 19:55:51 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										if  ( css )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 04:03:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											const  resolve  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												fullySpecified :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												preferRelative :  true 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-14 23:02:26 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											} ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-30 19:55:51 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											rules . push ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												test :  /\.css$/i , 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 04:03:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												type :  CSS _MODULE _TYPE _AUTO , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												resolve 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-14 23:02:26 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											rules . push ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												mimetype :  "text/css+module" , 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 04:03:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												type :  CSS _MODULE _TYPE _MODULE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												resolve 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-30 19:55:51 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											rules . push ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												mimetype :  "text/css" , 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 04:03:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												type :  CSS _MODULE _TYPE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												resolve 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-30 19:55:51 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-17 04:16:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										rules . push ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												dependency :  "url" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												oneOf :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														scheme :  /^data$/ , 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-01 04:19:07 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
														type :  ASSET _MODULE _TYPE _INLINE 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-17 04:16:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													{ 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-01 04:19:07 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
														type :  ASSET _MODULE _TYPE _RESOURCE 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-17 04:16:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											{ 
							 
						 
					
						
							
								
									
										
										
										
											2025-09-19 09:16:25 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												with :  {  type :  JSON _MODULE _TYPE  } , 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-01 01:56:32 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												type :  JSON _MODULE _TYPE 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 01:40:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											{ 
							 
						 
					
						
							
								
									
										
										
										
											2025-09-19 09:16:25 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												assert :  {  type :  JSON _MODULE _TYPE  } , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 01:40:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												type :  JSON _MODULE _TYPE 
							 
						 
					
						
							
								
									
										
										
										
											2025-09-19 09:16:25 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												with :  {  type :  "text"  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												type :  ASSET _MODULE _TYPE _SOURCE 
							 
						 
					
						
							
								
									
										
										
										
											2025-09-25 02:01:10 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												with :  {  type :  "bytes"  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												type :  ASSET _MODULE _TYPE _BYTES 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-17 04:16:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
										return  rules ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { Output }  output  options 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 21:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { object }  options  options 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 22:50:38 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { string }  options . context  context 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { TargetProperties  |  false }  options . targetProperties  target  properties 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-23 19:58:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . isAffectedByBrowserslist  is  affected  by  browserslist 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . outputModule  is  outputModule  experiment  enabled 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . development  is  development  mode 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { Entry }  options . entry  entry  option 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-23 21:04:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . futureDefaults  is  future  defaults  enabled 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-14 03:43:12 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . asyncWebAssembly  is  asyncWebAssembly  enabled 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 22:50:38 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  applyOutputDefaults  =  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									output , 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-23 19:58:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										context , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										targetProperties :  tp , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										isAffectedByBrowserslist , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										outputModule , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										development , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										entry , 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-14 03:43:12 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										futureDefaults , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										asyncWebAssembly 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-23 19:58:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 22:50:38 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								)  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-20 03:25:49 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									 *  @ param  { Library = }  library  the  library  option 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									 *  @ returns  { string }  a  readable  library  name 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									 * / 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-17 00:13:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									const  getLibraryName  =  ( library )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-20 03:25:49 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										const  libraryName  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											typeof  library  ===  "object"  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											library  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											! Array . isArray ( library )  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											"type"  in  library 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												?  library . name 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												:  /** @type {LibraryName} */  ( library ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-20 03:25:49 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										if  ( Array . isArray ( libraryName ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											return  libraryName . join ( "." ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										}  else  if  ( typeof  libraryName  ===  "object" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											return  getLibraryName ( libraryName . root ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										}  else  if  ( typeof  libraryName  ===  "string" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											return  libraryName ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-20 03:25:49 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										return  "" ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 22:50:38 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( output ,  "uniqueName" ,  ( )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-10 19:58:37 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										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  ||  "" } ` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													:  "" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 22:50:38 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										if  ( libraryName )  return  libraryName ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-06 19:07:57 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										const  pkgPath  =  path . resolve ( context ,  "package.json" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 22:50:38 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										try  { 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-02 20:10:54 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											const  packageInfo  =  JSON . parse ( fs . readFileSync ( pkgPath ,  "utf8" ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 22:50:38 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											return  packageInfo . name  ||  "" ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 15:37:05 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										}  catch  ( err )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											if  ( /** @type {Error & { code: string }} */  ( err ) . code  !==  "ENOENT" )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												/** @type {Error & { code: string }} */ 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 15:37:05 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												( err ) . message  += 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 05:43:19 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													` \n while determining default 'output.uniqueName' from 'name' in  ${ pkgPath } ` ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 15:37:05 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												throw  err ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-06 19:07:57 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 22:50:38 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											return  "" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 11:11:11 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( output ,  "module" ,  ( )  =>  Boolean ( outputModule ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-02 06:16:52 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									const  environment  =  /** @type {Environment} */  ( output . environment ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									 *  @ param  { boolean  |  undefined }  v  value 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									 *  @ returns  { boolean }  true ,  when  v  is  truthy  or  undefined 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									 * / 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-17 00:13:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									const  optimistic  =  ( v )  =>  v  ||  v  ===  undefined ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-02 06:16:52 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									 *  @ param  { boolean  |  undefined }  v  value 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									 *  @ param  { boolean  |  undefined }  c  condition 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									 *  @ returns  { boolean  |  undefined }  true ,  when  v  is  truthy  or  undefined ,  or  c  is  truthy 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									const  conditionallyOptimistic  =  ( v ,  c )  =>  ( v  ===  undefined  &&  c )  ||  v ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										environment , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"globalThis" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( )  =>  /** @type {boolean | undefined} */  ( tp  &&  tp . globalThis ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										environment , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"bigIntLiteral" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											tp  &&  optimistic ( /** @type {boolean | undefined} */  ( tp . bigIntLiteral ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										environment , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"const" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( )  =>  tp  &&  optimistic ( /** @type {boolean | undefined} */  ( tp . const ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										environment , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"arrowFunction" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											tp  &&  optimistic ( /** @type {boolean | undefined} */  ( tp . arrowFunction ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										environment , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"asyncFunction" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											tp  &&  optimistic ( /** @type {boolean | undefined} */  ( tp . asyncFunction ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										environment , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"forOf" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( )  =>  tp  &&  optimistic ( /** @type {boolean | undefined} */  ( tp . forOf ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										environment , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"destructuring" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											tp  &&  optimistic ( /** @type {boolean | undefined} */  ( tp . destructuring ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										environment , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"optionalChaining" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											tp  &&  optimistic ( /** @type {boolean | undefined} */  ( tp . optionalChaining ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										environment , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"nodePrefixForCoreModules" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											tp  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											optimistic ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												/** @type {boolean | undefined} */  ( tp . nodePrefixForCoreModules ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										environment , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"templateLiteral" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											tp  &&  optimistic ( /** @type {boolean | undefined} */  ( tp . templateLiteral ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( environment ,  "dynamicImport" ,  ( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										conditionallyOptimistic ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {boolean | undefined} */  ( tp  &&  tp . dynamicImport ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											output . module 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( environment ,  "dynamicImportInWorker" ,  ( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										conditionallyOptimistic ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {boolean | undefined} */  ( tp  &&  tp . dynamicImportInWorker ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											output . module 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( environment ,  "module" ,  ( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										conditionallyOptimistic ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {boolean | undefined} */  ( tp  &&  tp . module ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											output . module 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										environment , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"document" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( )  =>  tp  &&  optimistic ( /** @type {boolean | undefined} */  ( tp . document ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-23 19:58:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( output ,  "filename" ,  output . module  ?  "[name].mjs"  :  "[name].js" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									F ( output ,  "iife" ,  ( )  =>  ! output . module ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-15 22:24:11 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( output ,  "importFunctionName" ,  "import" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-18 16:55:37 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( output ,  "importMetaName" ,  "import.meta" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									F ( output ,  "chunkFilename" ,  ( )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										const  filename  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<Output["chunkFilename"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( output . filename ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
										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 ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-13 00:51:26 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											// Otherwise prefix "[id]." in front of the basename to make it changing
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
											return  filename . replace ( /(^|\/)([^/]*(?:\?|$))/ ,  "$1[id].$2" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-23 19:58:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										return  output . module  ?  "[id].mjs"  :  "[id].js" ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-30 19:55:51 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( output ,  "cssFilename" ,  ( )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										const  filename  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<Output["cssFilename"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( output . filename ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-17 19:18:01 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										if  ( typeof  filename  !==  "function" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											return  filename . replace ( /\.[mc]?js(\?|$)/ ,  ".css$1" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										return  "[id].css" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( output ,  "cssChunkFilename" ,  ( )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										const  chunkFilename  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<Output["cssChunkFilename"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( output . chunkFilename ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-30 19:55:51 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										if  ( typeof  chunkFilename  !==  "function" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											return  chunkFilename . replace ( /\.[mc]?js(\?|$)/ ,  ".css$1" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										return  "[id].css" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-28 00:49:47 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( output ,  "assetModuleFilename" ,  "[hash][ext][query]" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									D ( output ,  "webassemblyModuleFilename" ,  "[hash].module.wasm" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( output ,  "compareBeforeEmit" ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-02-07 12:17:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( output ,  "charset" ,  ! futureDefaults ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-31 18:01:25 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									const  uniqueNameId  =  Template . toIdentifier ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										/** @type {NonNullable<Output["uniqueName"]>} */  ( output . uniqueName ) 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 10:39:30 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( output ,  "hotUpdateGlobal" ,  ( )  =>  ` webpackHotUpdate ${ uniqueNameId } ` ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( output ,  "chunkLoadingGlobal" ,  ( )  =>  ` webpackChunk ${ uniqueNameId } ` ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									F ( output ,  "globalObject" ,  ( )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										if  ( tp )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											if  ( tp . global )  return  "global" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											if  ( tp . globalThis )  return  "globalThis" ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										return  "self" ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 03:45:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( output ,  "chunkFormat" ,  ( )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										if  ( tp )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-23 19:58:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											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 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-02 06:16:52 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												if  ( environment . dynamicImport )  return  "module" ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-23 19:58:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												if  ( tp . document )  return  "array-push" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												throw  new  Error ( 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 12:23:44 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													"For the selected environment is no default ESM chunk format available:\n"  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														"ESM exports can be chosen when 'import()' is available.\n"  + 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 10:39:30 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
														` JSONP Array push can be chosen when 'document' is available. \n ${ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
															helpMessage 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														} ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-23 19:58:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											}  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 ( 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 12:23:44 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													"For the selected environment is no default script chunk format available:\n"  + 
							 
						 
					
						
							
								
									
										
										
										
											2025-10-02 01:12:27 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
														` ${ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
															tp . module 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
																?  "Module ('module') can be chosen when ES modules are available (please set 'experiments.outputModule' and 'output.module' to `true`)" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
																:  "" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														} \ n `  +
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														"JSONP Array push ('array-push') can be chosen when 'document' or 'importScripts' is available.\n"  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														` CommonJs exports ('commonjs') can be chosen when 'require' or node builtins are available. \n ${ 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 10:39:30 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
															helpMessage 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														} ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-23 19:58:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 03:45:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-23 19:58:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										throw  new  Error ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											"Chunk format can't be selected by default when no target is specified" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 03:45:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-10 21:23:03 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( output ,  "asyncChunks" ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 03:45:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( output ,  "chunkLoading" ,  ( )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										if  ( tp )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-16 00:15:09 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											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" : 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-02 06:16:52 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													if  ( environment . dynamicImport )  return  "import" ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-16 00:15:09 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											if  ( 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-14 22:03:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												( tp . require  ===  null  || 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													tp . nodeBuiltins  ===  null  || 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													tp . document  ===  null  || 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													tp . importScripts  ===  null )  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												output . module  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												environment . dynamicImport 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											)  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												return  "universal" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 03:45:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										return  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 03:45:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-08 00:02:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( output ,  "workerChunkLoading" ,  ( )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										if  ( tp )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-16 00:15:09 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											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" : 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-02 06:16:52 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													if  ( environment . dynamicImportInWorker )  return  "import" ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-16 00:15:09 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
													break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											if  ( 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-14 22:03:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												( tp . require  ===  null  || 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													tp . nodeBuiltins  ===  null  || 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													tp . importScriptsInWorker  ===  null )  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												output . module  && 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-03 23:09:39 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												environment . dynamicImportInWorker 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											)  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												return  "universal" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-08 00:02:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										return  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-08 00:02:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 15:23:01 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( output ,  "wasmLoading" ,  ( )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										if  ( tp )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											if  ( tp . fetchWasm )  return  "fetch" ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-14 11:17:57 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											if  ( tp . nodeBuiltins )  return  "async-node" ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-14 08:01:30 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											if  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												( tp . nodeBuiltins  ===  null  ||  tp . fetchWasm  ===  null )  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												asyncWebAssembly  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												output . module  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												environment . dynamicImport 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											)  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												return  "universal" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 15:23:01 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										return  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 15:23:01 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( output ,  "workerWasmLoading" ,  ( )  =>  output . wasmLoading ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 22:50:38 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( output ,  "devtoolNamespace" ,  ( )  =>  output . uniqueName ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									if  ( output . library )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										F ( output . library ,  "type" ,  ( )  =>  ( output . module  ?  "module"  :  "var" ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									F ( output ,  "path" ,  ( )  =>  path . join ( process . cwd ( ) ,  "dist" ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( output ,  "pathinfo" ,  ( )  =>  development ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( output ,  "sourceMapFilename" ,  "[file].map[query]" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-23 19:58:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										output , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"hotUpdateChunkFilename" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										` [id].[fullhash].hot-update. ${ output . module  ?  "mjs"  :  "js" } ` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-06-27 02:11:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										output , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"hotUpdateMainFilename" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										` [runtime].[fullhash].hot-update. ${ output . module  ?  "json.mjs"  :  "json" } ` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									D ( output ,  "crossOriginLoading" ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-25 04:05:21 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( output ,  "scriptType" ,  ( )  =>  ( output . module  ?  "module"  :  false ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-18 16:26:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										output , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"publicPath" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( tp  &&  ( tp . document  ||  tp . importScripts ) )  ||  output . scriptType  ===  "module" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											?  "auto" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											:  "" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-22 07:30:43 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( output ,  "workerPublicPath" ,  "" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									D ( output ,  "chunkLoadTimeout" ,  120000 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-14 03:39:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( output ,  "hashFunction" ,  ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										if  ( futureDefaults )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											DEFAULTS . HASH _FUNCTION  =  "xxhash64" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											return  "xxhash64" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										return  "md4" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									D ( output ,  "hashDigest" ,  "hex" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-30 03:12:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( output ,  "hashDigestLength" ,  futureDefaults  ?  16  :  20 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-04 19:52:44 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( output ,  "strictModuleErrorHandling" ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									D ( output ,  "strictModuleExceptionHandling" ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-05-10 16:34:21 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									const  {  trustedTypes  }  =  output ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									if  ( trustedTypes )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										F ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											trustedTypes , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											"policyName" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( )  => 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												/** @type {NonNullable<Output["uniqueName"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												( output . uniqueName ) . replace ( /[^a-zA-Z0-9\-#=_/@.%]+/g ,  "_" )  ||  "webpack" 
							 
						 
					
						
							
								
									
										
										
										
											2021-05-10 16:34:21 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
									
										
											 
										 
										
											
												Add option to continue on trusted-types policy-creation failure
Webpack already allows for specifying a trusted-types policy name. However, its current implementation is such that if a call to trustedTypes.createPolicy fails, the code will immediately stop executing. This isn't necessarily desirable, as an application could be in the early phases of rolling out trusted types, and thus have the CSP rule for trusted-types LibraryA LibraryB etc, BUT have require-trusted-types-for 'script' be in "report only" mode (Content-Security-Policy-Report-Only). In such a configuration, and when the webpacked code is dynamically-loaded into an application, adding the policy name to the webpack config will break old versions.
This PR keeps the original behavior, but introduces a new option for onPolicyCreationFailure: "continue" | "stop" (with "stop" remaining the default). If a developer chooses the "continue" option, the policy-creation will be wrapped in a try/catch. There is no security risk to this, since for host applications that DO have strict enforcement of trusted-types, the code will simply fail when the dangerous sink is used (e.g., when doing parseFromString). And likewise, wrapping in try/catch and doing nothing on catch is OK, because the code already deals with the possibility of the trustedTypes API not being available on the browser.
											 
										 
										
											2023-04-20 05:53:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										D ( trustedTypes ,  "onPolicyCreationFailure" ,  "stop" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-05-10 16:34:21 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									/ * * 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-12 09:56:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									 *  @ param  { ( entryDescription :  EntryDescription )  =>  void }  fn  iterator 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									 * / 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-17 00:13:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									const  forEachEntry  =  ( fn )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										for  ( const  name  of  Object . keys ( entry ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											fn ( /** @type {{[k: string] : EntryDescription}} */  ( entry ) [ name ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									A ( output ,  "enabledLibraryTypes" ,  ( )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										/** @type {LibraryType[]} */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										const  enabledLibraryTypes  =  [ ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										if  ( output . library )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											enabledLibraryTypes . push ( output . library . type ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-17 00:13:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										forEachEntry ( ( desc )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											if  ( desc . library )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												enabledLibraryTypes . push ( desc . library . type ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										return  enabledLibraryTypes ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									A ( output ,  "enabledChunkLoadingTypes" ,  ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										const  enabledChunkLoadingTypes  =  new  Set ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										if  ( output . chunkLoading )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											enabledChunkLoadingTypes . add ( output . chunkLoading ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										if  ( output . workerChunkLoading )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											enabledChunkLoadingTypes . add ( output . workerChunkLoading ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-17 00:13:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										forEachEntry ( ( desc )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											if  ( desc . chunkLoading )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												enabledChunkLoadingTypes . add ( desc . chunkLoading ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-03 17:06:45 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										return  [ ... enabledChunkLoadingTypes ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									A ( output ,  "enabledWasmLoadingTypes" ,  ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										const  enabledWasmLoadingTypes  =  new  Set ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										if  ( output . wasmLoading )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											enabledWasmLoadingTypes . add ( output . wasmLoading ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										if  ( output . workerWasmLoading )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											enabledWasmLoadingTypes . add ( output . workerWasmLoading ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-17 00:13:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										forEachEntry ( ( desc )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											if  ( desc . wasmLoading )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												enabledWasmLoadingTypes . add ( desc . wasmLoading ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-03 17:06:45 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										return  [ ... enabledWasmLoadingTypes ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { ExternalsPresets }  externalsPresets  options 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 21:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { object }  options  options 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { TargetProperties  |  false }  options . targetProperties  target  properties 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 21:55:58 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . buildHttp  buildHttp  experiment  enabled 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:16:53 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  applyExternalsPresetsDefaults  =  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									externalsPresets , 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 21:55:58 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									{  targetProperties ,  buildHttp  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								)  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 21:55:58 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										externalsPresets , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"web" , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										/** @type {boolean | undefined} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( ! buildHttp  &&  targetProperties  &&  targetProperties . web ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										externalsPresets , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"node" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										/** @type {boolean | undefined} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( targetProperties  &&  targetProperties . node ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										externalsPresets , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"nwjs" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										/** @type {boolean | undefined} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( targetProperties  &&  targetProperties . nwjs ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 21:55:58 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										externalsPresets , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"electron" , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										/** @type {boolean | undefined} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( targetProperties  &&  targetProperties . electron ) 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										externalsPresets , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"electronMain" , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										/** @type {boolean | undefined} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											targetProperties  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												targetProperties . electron  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												targetProperties . electronMain 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										externalsPresets , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"electronPreload" , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										/** @type {boolean | undefined} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											targetProperties  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												targetProperties . electron  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												targetProperties . electronPreload 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										externalsPresets , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										"electronRenderer" , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										/** @type {boolean | undefined} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											targetProperties  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												targetProperties . electron  && 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												targetProperties . electronRenderer 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:54:13 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { Loader }  loader  options 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 21:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { object }  options  options 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { TargetProperties  |  false }  options . targetProperties  target  properties 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-30 01:50:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { Environment }  options . environment  environment 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:54:13 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-30 01:50:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  applyLoaderDefaults  =  ( loader ,  {  targetProperties ,  environment  } )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:54:13 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( loader ,  "target" ,  ( )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										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" ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:54:13 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-30 01:50:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( loader ,  "environment" ,  environment ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 21:54:13 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { WebpackNode }  node  options 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 21:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { object }  options  options 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { TargetProperties  |  false }  options . targetProperties  target  properties 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 00:15:27 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . futureDefaults  is  future  defaults  enabled 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-14 21:50:03 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . outputModule  is  output  type  is  module 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-14 21:50:03 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  applyNodeDefaults  =  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									node , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									{  futureDefaults ,  outputModule ,  targetProperties  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								)  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									if  ( node  ===  false )  return ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 00:15:27 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									F ( node ,  "global" ,  ( )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										if  ( targetProperties  &&  targetProperties . global )  return  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 00:15:27 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										// TODO webpack 6 should always default to false
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										return  futureDefaults  ?  "warn"  :  true ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-14 21:50:03 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									const  handlerForNames  =  ( )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-02 20:10:54 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										if  ( targetProperties  &&  targetProperties . node )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-14 21:50:03 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											return  outputModule  ?  "node-module"  :  "eval-only" ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-02 20:10:54 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 00:15:27 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										// TODO webpack 6 should always default to false
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										return  futureDefaults  ?  "warn-mock"  :  "mock" ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-14 21:50:03 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( node ,  "__filename" ,  handlerForNames ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( node ,  "__dirname" ,  handlerForNames ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { Performance }  performance  options 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 21:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { object }  options  options 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ 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 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 21:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { object }  options  options 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . production  is  production 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . development  is  development 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . css  is  css  enabled 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . records  using  records 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								const  applyOptimizationDefaults  =  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									optimization , 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-30 19:55:51 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									{  production ,  development ,  css ,  records  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								)  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									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" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-26 22:32:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( optimization ,  "sideEffects" ,  ( )  =>  ( production  ?  true  :  "flag" ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									D ( optimization ,  "providedExports" ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-08 18:22:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( optimization ,  "usedExports" ,  production ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( optimization ,  "innerGraph" ,  production ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									D ( optimization ,  "mangleExports" ,  production ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( optimization ,  "concatenateModules" ,  production ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-20 00:24:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( optimization ,  "avoidEntryIife" ,  production ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									D ( optimization ,  "runtimeChunk" ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-17 21:39:16 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( optimization ,  "emitOnErrors" ,  ! production ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									D ( optimization ,  "checkWasmTypes" ,  production ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( optimization ,  "mangleWasmImports" ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( optimization ,  "portableRecords" ,  records ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-19 03:14:43 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( optimization ,  "realContentHash" ,  production ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									D ( optimization ,  "minimize" ,  production ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									A ( optimization ,  "minimizer" ,  ( )  =>  [ 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-17 00:13:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											apply :  ( compiler )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
												// Lazy load the Terser plugin
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												const  TerserPlugin  =  require ( "terser-webpack-plugin" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-02 20:10:54 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-08-18 03:32:47 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												new  TerserPlugin ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													terserOptions :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														compress :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
															passes :  2 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
														} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
													} 
							 
						 
					
						
							
								
									
										
										
										
											2025-04-26 01:43:01 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
												} ) . apply ( /** @type {EXPECTED_ANY} */  ( compiler ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									F ( optimization ,  "nodeEnv" ,  ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										if  ( production )  return  "production" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										if  ( development )  return  "development" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									const  {  splitChunks  }  =  optimization ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									if  ( splitChunks )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-30 19:55:51 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										A ( splitChunks ,  "defaultSizeTypes" ,  ( )  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											css  ?  [ "javascript" ,  "css" ,  "unknown" ]  :  [ "javascript" ,  "unknown" ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
										D ( splitChunks ,  "hidePathInfo" ,  production ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										D ( splitChunks ,  "chunks" ,  "async" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-27 19:55:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										D ( splitChunks ,  "usedExports" ,  optimization . usedExports  ===  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
										D ( splitChunks ,  "minChunks" ,  1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 16:13:27 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										F ( splitChunks ,  "minSize" ,  ( )  =>  ( production  ?  20000  :  10000 ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
										F ( splitChunks ,  "minRemainingSize" ,  ( )  =>  ( development  ?  0  :  undefined ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 16:13:27 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										F ( splitChunks ,  "enforceSizeThreshold" ,  ( )  =>  ( production  ?  50000  :  30000 ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-16 22:48:12 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										F ( splitChunks ,  "maxAsyncRequests" ,  ( )  =>  ( production  ?  30  :  Infinity ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										F ( splitChunks ,  "maxInitialRequests" ,  ( )  =>  ( production  ?  30  :  Infinity ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
										D ( splitChunks ,  "automaticNameDelimiter" ,  "-" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 05:25:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										const  cacheGroups  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											/** @type {NonNullable<OptimizationSplitChunksOptions["cacheGroups"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											( splitChunks . cacheGroups ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
										F ( cacheGroups ,  "default" ,  ( )  =>  ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											idHint :  "" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											reuseExistingChunk :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											minChunks :  2 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											priority :  - 20 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										F ( cacheGroups ,  "defaultVendors" ,  ( )  =>  ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											idHint :  "vendors" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											reuseExistingChunk :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											test :  NODE _MODULES _REGEXP , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											priority :  - 10 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										} ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 21:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { object }  options  options 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . cache  is  cache  enable 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-09 05:12:45 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { string }  options . context  build  context 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { TargetProperties  |  false }  options . targetProperties  target  properties 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 18:58:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { Mode }  options . mode  mode 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 15:47:31 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . css  is  css  enabled 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ returns  { ResolveOptions }  resolve  options 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-14 00:34:05 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  getResolveDefaults  =  ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									cache , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									context , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									targetProperties , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									mode , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									css 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									/** @type {string[]} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									const  conditions  =  [ "webpack" ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									conditions . push ( mode  ===  "development"  ?  "development"  :  "production" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									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" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 18:58:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-07-17 21:57:56 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									const  jsExtensions  =  [ ".js" ,  ".json" ,  ".wasm" ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 18:58:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									const  tp  =  targetProperties ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									const  browserField  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										tp  &&  tp . web  &&  ( ! tp . node  ||  ( tp . electron  &&  tp . electronRenderer ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-12 09:56:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									/** @type {() => ResolveOptions} */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 20:28:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									const  cjsDeps  =  ( )  =>  ( { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										aliasFields :  browserField  ?  [ "browser" ]  :  [ ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										mainFields :  browserField  ?  [ "browser" ,  "module" ,  "..." ]  :  [ "module" ,  "..." ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										conditionNames :  [ "require" ,  "module" ,  "..." ] , 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 23:46:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										extensions :  [ ... jsExtensions ] 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 20:28:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-12 09:56:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									/** @type {() => ResolveOptions} */ 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 20:28:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									const  esmDeps  =  ( )  =>  ( { 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-10 16:42:29 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										aliasFields :  browserField  ?  [ "browser" ]  :  [ ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										mainFields :  browserField  ?  [ "browser" ,  "module" ,  "..." ]  :  [ "module" ,  "..." ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										conditionNames :  [ "import" ,  "module" ,  "..." ] , 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 23:46:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										extensions :  [ ... jsExtensions ] 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 20:28:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									/** @type {ResolveOptions} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									const  resolveOptions  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										cache , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										modules :  [ "node_modules" ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										conditionNames :  conditions , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										mainFiles :  [ "index" ] , 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 23:46:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										extensions :  [ ] , 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										aliasFields :  [ ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										exportsFields :  [ "exports" ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										roots :  [ context ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										mainFields :  [ "main" ] , 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-25 15:26:08 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										importsFields :  [ "imports" ] , 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										byDependency :  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 20:28:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											wasm :  esmDeps ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											esm :  esmDeps ( ) , 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-09 21:40:10 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											loaderImport :  esmDeps ( ) , 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-29 02:43:03 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											url :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												preferRelative :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											worker :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												... esmDeps ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
												preferRelative :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											} , 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 20:28:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											commonjs :  cjsDeps ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											amd :  cjsDeps ( ) , 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											// for backward-compat: loadModule
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 20:28:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											loader :  cjsDeps ( ) , 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											// for backward-compat: Custom Dependency
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 20:28:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											unknown :  cjsDeps ( ) , 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											// for backward-compat: getResolve without dependencyType
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 20:28:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											undefined :  cjsDeps ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 18:58:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									} ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 18:58:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-14 00:34:05 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									if  ( css )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										const  styleConditions  =  [ ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-14 01:09:30 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										styleConditions . push ( "webpack" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-14 00:34:05 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										styleConditions . push ( mode  ===  "development"  ?  "development"  :  "production" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										styleConditions . push ( "style" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-11 08:28:01 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										/** @type {NonNullable<ResolveOptions["byDependency"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( resolveOptions . byDependency ) [ "css-import" ]  =  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-14 04:48:58 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											// We avoid using any main files because we have to be consistent with CSS `@import`
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											// and CSS `@import` does not handle `main` files in directories,
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											// you should always specify the full URL for styles
 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-14 00:34:05 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											mainFiles :  [ ] , 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-14 01:09:30 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											mainFields :  [ "style" ,  "..." ] , 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-14 00:34:05 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											conditionNames :  styleConditions , 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-23 19:04:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
											extensions :  [ ".css" ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
											preferRelative :  true 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-14 00:34:05 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									return  resolveOptions ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 21:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ param  { object }  options  options 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { boolean }  options . cache  is  cache  enable 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  @ returns  { ResolveOptions }  resolve  options 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-11 16:30:18 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  getResolveLoaderDefaults  =  ( {  cache  } )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									/** @type {ResolveOptions} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									const  resolveOptions  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										cache , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										conditionNames :  [ "loader" ,  "require" ,  "node" ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										exportsFields :  [ "exports" ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										mainFields :  [ "loader" ,  "main" ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										extensions :  [ ".js" ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										mainFiles :  [ "index" ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									return  resolveOptions ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/ * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ param  { InfrastructureLogging }  infrastructureLogging  options 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  @ returns  { void } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 * / 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-17 00:13:14 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  applyInfrastructureLoggingDefaults  =  ( infrastructureLogging )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-06 21:23:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									F ( infrastructureLogging ,  "stream" ,  ( )  =>  process . stderr ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									const  tty  = 
							 
						 
					
						
							
								
									
										
										
										
											2025-04-26 01:43:01 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
										/** @type {NonNullable<InfrastructureLogging["stream"]>} */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
										( infrastructureLogging . stream ) . isTTY  &&  process . env . TERM  !==  "dumb" ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
									D ( infrastructureLogging ,  "level" ,  "info" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( infrastructureLogging ,  "debug" ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-06 21:20:27 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
									D ( infrastructureLogging ,  "colors" ,  tty ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									D ( infrastructureLogging ,  "appendOnly" ,  ! tty ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-07-03 17:06:45 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								module . exports . DEFAULTS  =  DEFAULTS ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 04:54:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								module . exports . applyWebpackOptionsBaseDefaults  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
									applyWebpackOptionsBaseDefaults ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								module . exports . applyWebpackOptionsDefaults  =  applyWebpackOptionsDefaults ;