chayns-toolkit 4.0.0-beta.0 → 4.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cli.js CHANGED
@@ -1,47 +1,47 @@
1
- "use strict";var Ru=Object.create;var mi=Object.defineProperty;var wu=Object.getOwnPropertyDescriptor;var Tu=Object.getOwnPropertyNames;var ku=Object.getPrototypeOf,$u=Object.prototype.hasOwnProperty;var y=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Lu=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Tu(e))!$u.call(r,i)&&i!==t&&mi(r,i,{get:()=>e[i],enumerable:!(n=wu(e,i))||n.enumerable});return r};var ee=(r,e,t)=>(t=r!=null?Ru(ku(r)):{},Lu(e||!r||!r.__esModule?mi(t,"default",{value:r,enumerable:!0}):t,r));var tt=y(nr=>{var gt=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},rr=class extends gt{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};nr.CommanderError=gt;nr.InvalidArgumentError=rr});var _t=y(sr=>{var{InvalidArgumentError:Mu}=tt(),ir=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new Mu(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Nu(r){let e=r.name()+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}sr.Argument=ir;sr.humanReadableArgName=Nu});var ur=y(ar=>{var{humanReadableArgName:Hu}=_t(),or=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((i,s)=>i.name().localeCompare(s.name())),t}compareOptions(e,t){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){let i=n.short&&e._findOption(n.short),s=n.long&&e._findOption(n.long);!i&&!s?t.push(n):n.long&&!s?t.push(e.createOption(n.long,n.description)):n.short&&!i&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(s=>!s.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(n=>Hu(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((n,i)=>Math.max(n,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(i)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((n,i)=>Math.max(n,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(i)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return t.length===0?[]:[n.styleTitle(e),...t,""]}groupItems(e,t,n){let i=new Map;return e.forEach(s=>{let o=n(s);i.has(o)||i.set(o,[])}),t.forEach(s=>{let o=n(s);i.has(o)||i.set(o,[]),i.get(o).push(s)}),i}formatHelp(e,t){let n=t.padWidth(e,t),i=t.helpWidth??80;function s(f,c){return t.formatItem(f,n,c,t)}let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],a=t.commandDescription(e);a.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(a),i),""]));let l=t.visibleArguments(e).map(f=>s(t.styleArgumentTerm(t.argumentTerm(f)),t.styleArgumentDescription(t.argumentDescription(f))));if(o=o.concat(this.formatItemList("Arguments:",l,t)),this.groupItems(e.options,t.visibleOptions(e),f=>f.helpGroupHeading??"Options:").forEach((f,c)=>{let E=f.map(_=>s(t.styleOptionTerm(t.optionTerm(_)),t.styleOptionDescription(t.optionDescription(_))));o=o.concat(this.formatItemList(c,E,t))}),t.showGlobalOptions){let f=t.visibleGlobalOptions(e).map(c=>s(t.styleOptionTerm(t.optionTerm(c)),t.styleOptionDescription(t.optionDescription(c))));o=o.concat(this.formatItemList("Global Options:",f,t))}return this.groupItems(e.commands,t.visibleCommands(e),f=>f.helpGroup()||"Commands:").forEach((f,c)=>{let E=f.map(_=>s(t.styleSubcommandTerm(t.subcommandTerm(_)),t.styleSubcommandDescription(t.subcommandDescription(_))));o=o.concat(this.formatItemList(c,E,t))}),o.join(`
2
- `)}displayWidth(e){return gi(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,i){let o=" ".repeat(2);if(!n)return o+e;let a=e.padEnd(t+e.length-i.displayWidth(e)),l=2,u=(this.helpWidth??80)-t-l-2,f;return u<this.minWidthToWrap||i.preformatted(n)?f=n:f=i.boxWrap(n,u).replace(/\n/g,`
1
+ "use strict";var Nu=Object.create;var Si=Object.defineProperty;var Hu=Object.getOwnPropertyDescriptor;var Fu=Object.getOwnPropertyNames;var Du=Object.getPrototypeOf,Iu=Object.prototype.hasOwnProperty;var b=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var ju=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Fu(e))!Iu.call(r,i)&&i!==t&&Si(r,i,{get:()=>e[i],enumerable:!(n=Hu(e,i))||n.enumerable});return r};var ee=(r,e,t)=>(t=r!=null?Nu(Du(r)):{},ju(e||!r||!r.__esModule?Si(t,"default",{value:r,enumerable:!0}):t,r));var rt=b(or=>{var _t=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},sr=class extends _t{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};or.CommanderError=_t;or.InvalidArgumentError=sr});var yt=b(ur=>{var{InvalidArgumentError:Bu}=rt(),ar=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new Bu(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function qu(r){let e=r.name()+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}ur.Argument=ar;ur.humanReadableArgName=qu});var fr=b(cr=>{var{humanReadableArgName:Vu}=yt(),lr=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((i,s)=>i.name().localeCompare(s.name())),t}compareOptions(e,t){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){let i=n.short&&e._findOption(n.short),s=n.long&&e._findOption(n.long);!i&&!s?t.push(n):n.long&&!s?t.push(e.createOption(n.long,n.description)):n.short&&!i&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(s=>!s.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(n=>Vu(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((n,i)=>Math.max(n,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(i)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((n,i)=>Math.max(n,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(i)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return t.length===0?[]:[n.styleTitle(e),...t,""]}groupItems(e,t,n){let i=new Map;return e.forEach(s=>{let o=n(s);i.has(o)||i.set(o,[])}),t.forEach(s=>{let o=n(s);i.has(o)||i.set(o,[]),i.get(o).push(s)}),i}formatHelp(e,t){let n=t.padWidth(e,t),i=t.helpWidth??80;function s(f,c){return t.formatItem(f,n,c,t)}let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],a=t.commandDescription(e);a.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(a),i),""]));let l=t.visibleArguments(e).map(f=>s(t.styleArgumentTerm(t.argumentTerm(f)),t.styleArgumentDescription(t.argumentDescription(f))));if(o=o.concat(this.formatItemList("Arguments:",l,t)),this.groupItems(e.options,t.visibleOptions(e),f=>f.helpGroupHeading??"Options:").forEach((f,c)=>{let y=f.map(g=>s(t.styleOptionTerm(t.optionTerm(g)),t.styleOptionDescription(t.optionDescription(g))));o=o.concat(this.formatItemList(c,y,t))}),t.showGlobalOptions){let f=t.visibleGlobalOptions(e).map(c=>s(t.styleOptionTerm(t.optionTerm(c)),t.styleOptionDescription(t.optionDescription(c))));o=o.concat(this.formatItemList("Global Options:",f,t))}return this.groupItems(e.commands,t.visibleCommands(e),f=>f.helpGroup()||"Commands:").forEach((f,c)=>{let y=f.map(g=>s(t.styleSubcommandTerm(t.subcommandTerm(g)),t.styleSubcommandDescription(t.subcommandDescription(g))));o=o.concat(this.formatItemList(c,y,t))}),o.join(`
2
+ `)}displayWidth(e){return vi(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,i){let o=" ".repeat(2);if(!n)return o+e;let a=e.padEnd(t+e.length-i.displayWidth(e)),l=2,u=(this.helpWidth??80)-t-l-2,f;return u<this.minWidthToWrap||i.preformatted(n)?f=n:f=i.boxWrap(n,u).replace(/\n/g,`
3
3
  `+" ".repeat(t+l)),o+a+" ".repeat(l)+f.replace(/\n/g,`
4
- ${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,s=[];return n.forEach(o=>{let a=o.match(i);if(a===null){s.push("");return}let l=[a.shift()],h=this.displayWidth(l[0]);a.forEach(u=>{let f=this.displayWidth(u);if(h+f<=t){l.push(u),h+=f;return}s.push(l.join(""));let c=u.trimStart();l=[c],h=this.displayWidth(c)}),s.push(l.join(""))}),s.join(`
5
- `)}};function gi(r){let e=/\x1b\[\d*(;\d*)*m/g;return r.replace(e,"")}ar.Help=or;ar.stripColor=gi});var pr=y(fr=>{var{InvalidArgumentError:Fu}=tt(),lr=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=Iu(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new Fu(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?_i(this.name().replace(/^no-/,"")):_i(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},cr=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,s=i!==void 0?i:!1;return t.negate===(s===e)}};function _i(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Iu(r){let e,t,n=/^-[^-]$/,i=/^--[^-]/,s=r.split(/[ |,]+/).concat("guard");if(n.test(s[0])&&(e=s.shift()),i.test(s[0])&&(t=s.shift()),!e&&n.test(s[0])&&(e=s.shift()),!e&&i.test(s[0])&&(e=t,t=s.shift()),s[0].startsWith("-")){let o=s[0],a=`option creation failed due to '${o}' in option flags '${r}'`;throw/^-[^-][^-]/.test(o)?new Error(`${a}
4
+ ${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,s=[];return n.forEach(o=>{let a=o.match(i);if(a===null){s.push("");return}let l=[a.shift()],p=this.displayWidth(l[0]);a.forEach(u=>{let f=this.displayWidth(u);if(p+f<=t){l.push(u),p+=f;return}s.push(l.join(""));let c=u.trimStart();l=[c],p=this.displayWidth(c)}),s.push(l.join(""))}),s.join(`
5
+ `)}};function vi(r){let e=/\x1b\[\d*(;\d*)*m/g;return r.replace(e,"")}cr.Help=lr;cr.stripColor=vi});var mr=b(dr=>{var{InvalidArgumentError:Wu}=rt(),pr=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=Gu(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new Wu(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Ei(this.name().replace(/^no-/,"")):Ei(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},hr=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,s=i!==void 0?i:!1;return t.negate===(s===e)}};function Ei(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Gu(r){let e,t,n=/^-[^-]$/,i=/^--[^-]/,s=r.split(/[ |,]+/).concat("guard");if(n.test(s[0])&&(e=s.shift()),i.test(s[0])&&(t=s.shift()),!e&&n.test(s[0])&&(e=s.shift()),!e&&i.test(s[0])&&(e=t,t=s.shift()),s[0].startsWith("-")){let o=s[0],a=`option creation failed due to '${o}' in option flags '${r}'`;throw/^-[^-][^-]/.test(o)?new Error(`${a}
6
6
  - a short flag is a single dash and a single character
7
7
  - either use a single dash and a single character (for a short flag)
8
8
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):n.test(o)?new Error(`${a}
9
9
  - too many short flags`):i.test(o)?new Error(`${a}
10
10
  - too many long flags`):new Error(`${a}
11
- - unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${r}'.`);return{shortFlag:e,longFlag:t}}fr.Option=lr;fr.DualOptions=cr});var bi=y(yi=>{function Du(r,e){if(Math.abs(r.length-e.length)>3)return Math.max(r.length,e.length);let t=[];for(let n=0;n<=r.length;n++)t[n]=[n];for(let n=0;n<=e.length;n++)t[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=r.length;i++){let s=1;r[i-1]===e[n-1]?s=0:s=1,t[i][n]=Math.min(t[i-1][n]+1,t[i][n-1]+1,t[i-1][n-1]+s),i>1&&n>1&&r[i-1]===e[n-2]&&r[i-2]===e[n-1]&&(t[i][n]=Math.min(t[i][n],t[i-2][n-2]+1))}return t[r.length][e.length]}function Bu(r,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=r.startsWith("--");t&&(r=r.slice(2),e=e.map(o=>o.slice(2)));let n=[],i=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=Du(r,o),l=Math.max(r.length,o.length);(l-a)/l>s&&(a<i?(i=a,n=[o]):a===i&&n.push(o))}),n.sort((o,a)=>o.localeCompare(a)),t&&(n=n.map(o=>`--${o}`)),n.length>1?`
11
+ - unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${r}'.`);return{shortFlag:e,longFlag:t}}dr.Option=pr;dr.DualOptions=hr});var Ci=b(Ai=>{function Uu(r,e){if(Math.abs(r.length-e.length)>3)return Math.max(r.length,e.length);let t=[];for(let n=0;n<=r.length;n++)t[n]=[n];for(let n=0;n<=e.length;n++)t[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=r.length;i++){let s=1;r[i-1]===e[n-1]?s=0:s=1,t[i][n]=Math.min(t[i-1][n]+1,t[i][n-1]+1,t[i-1][n-1]+s),i>1&&n>1&&r[i-1]===e[n-2]&&r[i-2]===e[n-1]&&(t[i][n]=Math.min(t[i][n],t[i-2][n-2]+1))}return t[r.length][e.length]}function Ku(r,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=r.startsWith("--");t&&(r=r.slice(2),e=e.map(o=>o.slice(2)));let n=[],i=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=Uu(r,o),l=Math.max(r.length,o.length);(l-a)/l>s&&(a<i?(i=a,n=[o]):a===i&&n.push(o))}),n.sort((o,a)=>o.localeCompare(a)),t&&(n=n.map(o=>`--${o}`)),n.length>1?`
12
12
  (Did you mean one of ${n.join(", ")}?)`:n.length===1?`
13
- (Did you mean ${n[0]}?)`:""}yi.suggestSimilar=Bu});var Ai=y(_r=>{var ju=require("node:events").EventEmitter,hr=require("node:child_process"),xe=require("node:path"),yt=require("node:fs"),N=require("node:process"),{Argument:qu,humanReadableArgName:Vu}=_t(),{CommanderError:dr}=tt(),{Help:Wu,stripColor:Gu}=ur(),{Option:Si,DualOptions:Uu}=pr(),{suggestSimilar:vi}=bi(),mr=class r extends ju{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:t=>N.stdout.write(t),writeErr:t=>N.stderr.write(t),outputError:(t,n)=>n(t),getOutHelpWidth:()=>N.stdout.isTTY?N.stdout.columns:void 0,getErrHelpWidth:()=>N.stderr.isTTY?N.stderr.columns:void 0,getOutHasColors:()=>gr()??(N.stdout.isTTY&&N.stdout.hasColors?.()),getErrHasColors:()=>gr()??(N.stderr.isTTY&&N.stderr.hasColors?.()),stripColor:t=>Gu(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let i=t,s=n;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(o);return i&&(l.description(i),l._executableHandler=!0),s.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(s.noHelp||s.hidden),l._executableFile=s.executableFile||null,a&&l.arguments(a),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),i?this:l}createCommand(e){return new r(e)}createHelp(){return Object.assign(new Wu,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
14
- - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new qu(e,t)}argument(e,t,n,i){let s=this.createArgument(e,t);return typeof n=="function"?s.default(i).argParser(n):s.default(n),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let n=e??"help [command]",[,i,s]=n.match(/([^ ]+) *(.*)/),o=t??"display help for command",a=this.createCommand(i);return a.helpOption(!1),s&&a.arguments(s),o&&a.description(o),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||t)&&this._initCommandGroup(a),this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
15
- Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new dr(e,t,n)),N.exit(e)}action(e){let t=n=>{let i=this.registeredArguments.length,s=n.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new Si(e,t)}_callParseArg(e,t,n,i){try{return e.parseArg(t,n)}catch(s){if(s.code==="commander.invalidArgument"){let o=`${i} ${s.message}`;this.error(o,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
16
- - already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=i=>[i.name()].concat(i.aliases()),n=t(e).find(i=>this._findCommand(i));if(n){let i=t(this._findCommand(n)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let i=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let l=this.getOptionValue(n);s!==null&&e.parseArg?s=this._callParseArg(e,s,l,o):s!==null&&e.variadic&&(s=e._collectValue(s,l)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(n,s,a)};return this.on("option:"+t,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;i(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;i(s,o,"env")}),this}_optionEx(e,t,n,i,s){if(typeof t=="object"&&t instanceof Si)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,n);if(o.makeOptionMandatory(!!e.mandatory),typeof i=="function")o.default(s).argParser(i);else if(i instanceof RegExp){let a=i;i=(l,h)=>{let u=a.exec(l);return u?u[0]:h},o.default(s).argParser(i)}else o.default(i);return this.addOption(o)}option(e,t,n,i){return this._optionEx({},e,t,n,i)}requiredOption(e,t,n,i){return this._optionEx({mandatory:!0},e,t,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){N.versions?.electron&&(t.from="electron");let i=N.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(t.from="eval")}e===void 0&&(e=N.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":N.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
17
- - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,n){if(yt.existsSync(e))return;let i=t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",s=`'${e}' does not exist
13
+ (Did you mean ${n[0]}?)`:""}Ai.suggestSimilar=Ku});var wi=b(Sr=>{var Yu=require("node:events").EventEmitter,gr=require("node:child_process"),xe=require("node:path"),bt=require("node:fs"),H=require("node:process"),{Argument:Qu,humanReadableArgName:Ju}=yt(),{CommanderError:_r}=rt(),{Help:Xu,stripColor:zu}=fr(),{Option:Oi,DualOptions:Zu}=mr(),{suggestSimilar:xi}=Ci(),yr=class r extends Yu{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:t=>H.stdout.write(t),writeErr:t=>H.stderr.write(t),outputError:(t,n)=>n(t),getOutHelpWidth:()=>H.stdout.isTTY?H.stdout.columns:void 0,getErrHelpWidth:()=>H.stderr.isTTY?H.stderr.columns:void 0,getOutHasColors:()=>br()??(H.stdout.isTTY&&H.stdout.hasColors?.()),getErrHasColors:()=>br()??(H.stderr.isTTY&&H.stderr.hasColors?.()),stripColor:t=>zu(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let i=t,s=n;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(o);return i&&(l.description(i),l._executableHandler=!0),s.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(s.noHelp||s.hidden),l._executableFile=s.executableFile||null,a&&l.arguments(a),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),i?this:l}createCommand(e){return new r(e)}createHelp(){return Object.assign(new Xu,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
14
+ - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new Qu(e,t)}argument(e,t,n,i){let s=this.createArgument(e,t);return typeof n=="function"?s.default(i).argParser(n):s.default(n),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let n=e??"help [command]",[,i,s]=n.match(/([^ ]+) *(.*)/),o=t??"display help for command",a=this.createCommand(i);return a.helpOption(!1),s&&a.arguments(s),o&&a.description(o),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||t)&&this._initCommandGroup(a),this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
15
+ Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new _r(e,t,n)),H.exit(e)}action(e){let t=n=>{let i=this.registeredArguments.length,s=n.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new Oi(e,t)}_callParseArg(e,t,n,i){try{return e.parseArg(t,n)}catch(s){if(s.code==="commander.invalidArgument"){let o=`${i} ${s.message}`;this.error(o,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
16
+ - already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=i=>[i.name()].concat(i.aliases()),n=t(e).find(i=>this._findCommand(i));if(n){let i=t(this._findCommand(n)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let i=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let l=this.getOptionValue(n);s!==null&&e.parseArg?s=this._callParseArg(e,s,l,o):s!==null&&e.variadic&&(s=e._collectValue(s,l)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(n,s,a)};return this.on("option:"+t,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;i(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;i(s,o,"env")}),this}_optionEx(e,t,n,i,s){if(typeof t=="object"&&t instanceof Oi)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,n);if(o.makeOptionMandatory(!!e.mandatory),typeof i=="function")o.default(s).argParser(i);else if(i instanceof RegExp){let a=i;i=(l,p)=>{let u=a.exec(l);return u?u[0]:p},o.default(s).argParser(i)}else o.default(i);return this.addOption(o)}option(e,t,n,i){return this._optionEx({},e,t,n,i)}requiredOption(e,t,n,i){return this._optionEx({mandatory:!0},e,t,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){H.versions?.electron&&(t.from="electron");let i=H.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(t.from="eval")}e===void 0&&(e=H.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":H.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
17
+ - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,n){if(bt.existsSync(e))return;let i=t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",s=`'${e}' does not exist
18
18
  - if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
19
19
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
20
- - ${i}`;throw new Error(s)}_executeSubCommand(e,t){t=t.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(u,f){let c=xe.resolve(u,f);if(yt.existsSync(c))return c;if(i.includes(xe.extname(f)))return;let E=i.find(_=>yt.existsSync(`${c}${_}`));if(E)return`${c}${E}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=yt.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=xe.resolve(xe.dirname(u),a)}if(a){let u=s(a,o);if(!u&&!e._executableFile&&this._scriptPath){let f=xe.basename(this._scriptPath,xe.extname(this._scriptPath));f!==this._name&&(u=s(a,`${f}-${e._name}`))}o=u||o}n=i.includes(xe.extname(o));let l;N.platform!=="win32"?n?(t.unshift(o),t=Ei(N.execArgv).concat(t),l=hr.spawn(N.argv[0],t,{stdio:"inherit"})):l=hr.spawn(o,t,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),t.unshift(o),t=Ei(N.execArgv).concat(t),l=hr.spawn(N.execPath,t,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{N.on(f,()=>{l.killed===!1&&l.exitCode===null&&l.kill(f)})});let h=this._exitCallback;l.on("close",u=>{u=u??1,h?h(new dr(u,"commander.executeSubCommandAsync","(close)")):N.exit(u)}),l.on("error",u=>{if(u.code==="ENOENT")this._checkForMissingExecutable(o,a,e._name);else if(u.code==="EACCES")throw new Error(`'${o}' not executable`);if(!h)N.exit(1);else{let f=new dr(1,"commander.executeSubCommandAsync","(error)");f.nestedError=u,h(f)}}),this.runningCommand=l}_dispatchSubcommand(e,t,n){let i=this._findCommand(e);i||this.help({error:!0}),i._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,i,"preSubcommand"),s=this._chainOrCall(s,()=>{if(i._executableHandler)this._executeSubCommand(i,t.concat(n));else return i._parseCommand(t,n)}),s}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,s)=>{let o=i;if(i!==null&&n.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;o=this._callParseArg(n,i,s,a)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,i)=>{let s=n.defaultValue;n.variadic?i<this.args.length?(s=this.args.slice(i),n.parseArg&&(s=s.reduce((o,a)=>e(n,a,o),n.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],n.parseArg&&(s=e(n,s,n.defaultValue))),t[i]=s}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,i=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(o=>{i.push({hookedCommand:s,callback:o})})}),t==="postAction"&&i.reverse(),i.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(s=>{i=this._chainOrCall(i,()=>s(this,t))}),i}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(s,e,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent?.listenerCount(s))i(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(s=>n.conflictsWith.includes(s.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],i=t;function s(u){return u.length>1&&u[0]==="-"}let o=u=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(u)?!this._getCommandAndAncestors().some(f=>f.options.map(c=>c.short).some(c=>/^-\d$/.test(c))):!1,a=null,l=null,h=0;for(;h<e.length||l;){let u=l??e[h++];if(l=null,u==="--"){i===n&&i.push(u),i.push(...e.slice(h));break}if(a&&(!s(u)||o(u))){this.emit(`option:${a.name()}`,u);continue}if(a=null,s(u)){let f=this._findOption(u);if(f){if(f.required){let c=e[h++];c===void 0&&this.optionMissingArgument(f),this.emit(`option:${f.name()}`,c)}else if(f.optional){let c=null;h<e.length&&(!s(e[h])||o(e[h]))&&(c=e[h++]),this.emit(`option:${f.name()}`,c)}else this.emit(`option:${f.name()}`);a=f.variadic?f:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let f=this._findOption(`-${u[1]}`);if(f){f.required||f.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${f.name()}`,u.slice(2)):(this.emit(`option:${f.name()}`),l=`-${u.slice(2)}`);continue}}if(/^--[^=]+=/.test(u)){let f=u.indexOf("="),c=this._findOption(u.slice(0,f));if(c&&(c.required||c.optional)){this.emit(`option:${c.name()}`,u.slice(f+1));continue}}if(i===t&&s(u)&&!(this.commands.length===0&&o(u))&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(u)){t.push(u),n.push(...e.slice(h));break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){t.push(u,...e.slice(h));break}else if(this._defaultCommandName){n.push(u,...e.slice(h));break}}if(this._passThroughOptions){i.push(u,...e.slice(h));break}i.push(u)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
20
+ - ${i}`;throw new Error(s)}_executeSubCommand(e,t){t=t.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(u,f){let c=xe.resolve(u,f);if(bt.existsSync(c))return c;if(i.includes(xe.extname(f)))return;let y=i.find(g=>bt.existsSync(`${c}${g}`));if(y)return`${c}${y}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=bt.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=xe.resolve(xe.dirname(u),a)}if(a){let u=s(a,o);if(!u&&!e._executableFile&&this._scriptPath){let f=xe.basename(this._scriptPath,xe.extname(this._scriptPath));f!==this._name&&(u=s(a,`${f}-${e._name}`))}o=u||o}n=i.includes(xe.extname(o));let l;H.platform!=="win32"?n?(t.unshift(o),t=Ri(H.execArgv).concat(t),l=gr.spawn(H.argv[0],t,{stdio:"inherit"})):l=gr.spawn(o,t,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),t.unshift(o),t=Ri(H.execArgv).concat(t),l=gr.spawn(H.execPath,t,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{H.on(f,()=>{l.killed===!1&&l.exitCode===null&&l.kill(f)})});let p=this._exitCallback;l.on("close",u=>{u=u??1,p?p(new _r(u,"commander.executeSubCommandAsync","(close)")):H.exit(u)}),l.on("error",u=>{if(u.code==="ENOENT")this._checkForMissingExecutable(o,a,e._name);else if(u.code==="EACCES")throw new Error(`'${o}' not executable`);if(!p)H.exit(1);else{let f=new _r(1,"commander.executeSubCommandAsync","(error)");f.nestedError=u,p(f)}}),this.runningCommand=l}_dispatchSubcommand(e,t,n){let i=this._findCommand(e);i||this.help({error:!0}),i._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,i,"preSubcommand"),s=this._chainOrCall(s,()=>{if(i._executableHandler)this._executeSubCommand(i,t.concat(n));else return i._parseCommand(t,n)}),s}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,s)=>{let o=i;if(i!==null&&n.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;o=this._callParseArg(n,i,s,a)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,i)=>{let s=n.defaultValue;n.variadic?i<this.args.length?(s=this.args.slice(i),n.parseArg&&(s=s.reduce((o,a)=>e(n,a,o),n.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],n.parseArg&&(s=e(n,s,n.defaultValue))),t[i]=s}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,i=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(o=>{i.push({hookedCommand:s,callback:o})})}),t==="postAction"&&i.reverse(),i.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(s=>{i=this._chainOrCall(i,()=>s(this,t))}),i}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(s,e,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent?.listenerCount(s))i(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(s=>n.conflictsWith.includes(s.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],i=t;function s(u){return u.length>1&&u[0]==="-"}let o=u=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(u)?!this._getCommandAndAncestors().some(f=>f.options.map(c=>c.short).some(c=>/^-\d$/.test(c))):!1,a=null,l=null,p=0;for(;p<e.length||l;){let u=l??e[p++];if(l=null,u==="--"){i===n&&i.push(u),i.push(...e.slice(p));break}if(a&&(!s(u)||o(u))){this.emit(`option:${a.name()}`,u);continue}if(a=null,s(u)){let f=this._findOption(u);if(f){if(f.required){let c=e[p++];c===void 0&&this.optionMissingArgument(f),this.emit(`option:${f.name()}`,c)}else if(f.optional){let c=null;p<e.length&&(!s(e[p])||o(e[p]))&&(c=e[p++]),this.emit(`option:${f.name()}`,c)}else this.emit(`option:${f.name()}`);a=f.variadic?f:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let f=this._findOption(`-${u[1]}`);if(f){f.required||f.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${f.name()}`,u.slice(2)):(this.emit(`option:${f.name()}`),l=`-${u.slice(2)}`);continue}}if(/^--[^=]+=/.test(u)){let f=u.indexOf("="),c=this._findOption(u.slice(0,f));if(c&&(c.required||c.optional)){this.emit(`option:${c.name()}`,u.slice(f+1));continue}}if(i===t&&s(u)&&!(this.commands.length===0&&o(u))&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(u)){t.push(u),n.push(...e.slice(p));break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){t.push(u,...e.slice(p));break}else if(this._defaultCommandName){n.push(u,...e.slice(p));break}}if(this._passThroughOptions){i.push(u,...e.slice(p));break}i.push(u)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
21
21
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
22
22
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
23
- `),this.outputHelp({error:!0}));let n=t||{},i=n.exitCode||1,s=n.code||"commander.error";this._exit(i,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in N.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,N.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Uu(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let n=o=>{let a=o.attributeName(),l=this.getOptionValue(a),h=this.options.find(f=>f.negate&&a===f.attributeName()),u=this.options.find(f=>!f.negate&&a===f.attributeName());return h&&(h.presetArg===void 0&&l===!1||h.presetArg!==void 0&&l===h.presetArg)?h:u||o},i=o=>{let a=n(o),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);i=i.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);t=vi(e,i)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),t=vi(e,i)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let i=this.createOption(t,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
24
- `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let i=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(n=>Vu(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=xe.basename(e,xe.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let i=t.formatHelp(this,t);return n.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let t=!!e.error,n,i,s;return t?(n=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(n=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:t,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),n(a)),hasColors:i,helpWidth:s}}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let n=this._getOutputContext(e),i={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let s=this.helpInformation({error:n.error});if(t&&(s=t(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",i))}helpOption(e,t){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",t??"display help for command"),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(N.exitCode??0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
23
+ `),this.outputHelp({error:!0}));let n=t||{},i=n.exitCode||1,s=n.code||"commander.error";this._exit(i,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in H.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,H.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Zu(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let n=o=>{let a=o.attributeName(),l=this.getOptionValue(a),p=this.options.find(f=>f.negate&&a===f.attributeName()),u=this.options.find(f=>!f.negate&&a===f.attributeName());return p&&(p.presetArg===void 0&&l===!1||p.presetArg!==void 0&&l===p.presetArg)?p:u||o},i=o=>{let a=n(o),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);i=i.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);t=xi(e,i)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),t=xi(e,i)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let i=this.createOption(t,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
24
+ `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let i=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(n=>Ju(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=xe.basename(e,xe.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let i=t.formatHelp(this,t);return n.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let t=!!e.error,n,i,s;return t?(n=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(n=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:t,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),n(a)),hasColors:i,helpWidth:s}}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let n=this._getOutputContext(e),i={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let s=this.helpInformation({error:n.error});if(t&&(s=t(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",i))}helpOption(e,t){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",t??"display help for command"),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(H.exitCode??0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
25
25
  Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,s=>{let o;typeof t=="function"?o=t({error:s.error,command:s.command}):o=t,o&&s.write(`${o}
26
- `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Ei(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?i=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],n=s[3],i=s[4]),t&&i!=="0"?`${t}=${n}:${parseInt(i)+1}`:e})}function gr(){if(N.env.NO_COLOR||N.env.FORCE_COLOR==="0"||N.env.FORCE_COLOR==="false")return!1;if(N.env.FORCE_COLOR||N.env.CLICOLOR_FORCE!==void 0)return!0}_r.Command=mr;_r.useColor=gr});var Pi=y(ce=>{var{Argument:Ci}=_t(),{Command:yr}=Ai(),{CommanderError:Ku,InvalidArgumentError:Oi}=tt(),{Help:Yu}=ur(),{Option:xi}=pr();ce.program=new yr;ce.createCommand=r=>new yr(r);ce.createOption=(r,e)=>new xi(r,e);ce.createArgument=(r,e)=>new Ci(r,e);ce.Command=yr;ce.Option=xi;ce.Argument=Ci;ce.Help=Yu;ce.CommanderError=Ku;ce.InvalidArgumentError=Oi;ce.InvalidOptionArgumentError=Oi});var Es=y(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.splitWhen=Ke.flatten=void 0;function El(r){return r.reduce((e,t)=>[].concat(e,t),[])}Ke.flatten=El;function Al(r,e){let t=[[]],n=0;for(let i of r)e(i)?(n++,t[n]=[]):t[n].push(i);return t}Ke.splitWhen=Al});var As=y(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.isEnoentCodeError=void 0;function Cl(r){return r.code==="ENOENT"}xt.isEnoentCodeError=Cl});var Cs=y(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.createDirentFromStats=void 0;var xr=class{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}};function Ol(r,e){return new xr(r,e)}Pt.createDirentFromStats=Ol});var Rs=y(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.convertPosixPathToPattern=z.convertWindowsPathToPattern=z.convertPathToPattern=z.escapePosixPath=z.escapeWindowsPath=z.escape=z.removeLeadingDotSegment=z.makeAbsolute=z.unixify=void 0;var xl=require("os"),Pl=require("path"),Os=xl.platform()==="win32",Rl=2,wl=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,Tl=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,kl=/^\\\\([.?])/,$l=/\\(?![!()+@[\]{}])/g;function Ll(r){return r.replace(/\\/g,"/")}z.unixify=Ll;function Ml(r,e){return Pl.resolve(r,e)}z.makeAbsolute=Ml;function Nl(r){if(r.charAt(0)==="."){let e=r.charAt(1);if(e==="/"||e==="\\")return r.slice(Rl)}return r}z.removeLeadingDotSegment=Nl;z.escape=Os?Pr:Rr;function Pr(r){return r.replace(Tl,"\\$2")}z.escapeWindowsPath=Pr;function Rr(r){return r.replace(wl,"\\$2")}z.escapePosixPath=Rr;z.convertPathToPattern=Os?xs:Ps;function xs(r){return Pr(r).replace(kl,"//$1").replace($l,"/")}z.convertWindowsPathToPattern=xs;function Ps(r){return Rr(r)}z.convertPosixPathToPattern=Ps});var Ts=y((gm,ws)=>{ws.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}});var Ls=y((_m,$s)=>{var Hl=Ts(),ks={"{":"}","(":")","[":"]"},Fl=function(r){if(r[0]==="!")return!0;for(var e=0,t=-2,n=-2,i=-2,s=-2,o=-2;e<r.length;){if(r[e]==="*"||r[e+1]==="?"&&/[\].+)]/.test(r[e])||n!==-1&&r[e]==="["&&r[e+1]!=="]"&&(n<e&&(n=r.indexOf("]",e)),n>e&&(o===-1||o>n||(o=r.indexOf("\\",e),o===-1||o>n)))||i!==-1&&r[e]==="{"&&r[e+1]!=="}"&&(i=r.indexOf("}",e),i>e&&(o=r.indexOf("\\",e),o===-1||o>i))||s!==-1&&r[e]==="("&&r[e+1]==="?"&&/[:!=]/.test(r[e+2])&&r[e+3]!==")"&&(s=r.indexOf(")",e),s>e&&(o=r.indexOf("\\",e),o===-1||o>s))||t!==-1&&r[e]==="("&&r[e+1]!=="|"&&(t<e&&(t=r.indexOf("|",e)),t!==-1&&r[t+1]!==")"&&(s=r.indexOf(")",t),s>t&&(o=r.indexOf("\\",t),o===-1||o>s))))return!0;if(r[e]==="\\"){var a=r[e+1];e+=2;var l=ks[a];if(l){var h=r.indexOf(l,e);h!==-1&&(e=h+1)}if(r[e]==="!")return!0}else e++}return!1},Il=function(r){if(r[0]==="!")return!0;for(var e=0;e<r.length;){if(/[*?{}()[\]]/.test(r[e]))return!0;if(r[e]==="\\"){var t=r[e+1];e+=2;var n=ks[t];if(n){var i=r.indexOf(n,e);i!==-1&&(e=i+1)}if(r[e]==="!")return!0}else e++}return!1};$s.exports=function(e,t){if(typeof e!="string"||e==="")return!1;if(Hl(e))return!0;var n=Fl;return t&&t.strict===!1&&(n=Il),n(e)}});var Ns=y((ym,Ms)=>{"use strict";var Dl=Ls(),Bl=require("path").posix.dirname,jl=require("os").platform()==="win32",wr="/",ql=/\\/g,Vl=/[\{\[].*[\}\]]$/,Wl=/(^|[^\\])([\{\[]|\([^\)]+$)/,Gl=/\\([\!\*\?\|\[\]\(\)\{\}])/g;Ms.exports=function(e,t){var n=Object.assign({flipBackslashes:!0},t);n.flipBackslashes&&jl&&e.indexOf(wr)<0&&(e=e.replace(ql,wr)),Vl.test(e)&&(e+=wr),e+="a";do e=Bl(e);while(Dl(e)||Wl.test(e));return e.replace(Gl,"$1")}});var Rt=y(pe=>{"use strict";pe.isInteger=r=>typeof r=="number"?Number.isInteger(r):typeof r=="string"&&r.trim()!==""?Number.isInteger(Number(r)):!1;pe.find=(r,e)=>r.nodes.find(t=>t.type===e);pe.exceedsLimit=(r,e,t=1,n)=>n===!1||!pe.isInteger(r)||!pe.isInteger(e)?!1:(Number(e)-Number(r))/Number(t)>=n;pe.escapeNode=(r,e=0,t)=>{let n=r.nodes[e];n&&(t&&n.type===t||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};pe.encloseBrace=r=>r.type!=="brace"?!1:r.commas>>0+r.ranges>>0===0?(r.invalid=!0,!0):!1;pe.isInvalidBrace=r=>r.type!=="brace"?!1:r.invalid===!0||r.dollar?!0:r.commas>>0+r.ranges>>0===0||r.open!==!0||r.close!==!0?(r.invalid=!0,!0):!1;pe.isOpenOrClose=r=>r.type==="open"||r.type==="close"?!0:r.open===!0||r.close===!0;pe.reduce=r=>r.reduce((e,t)=>(t.type==="text"&&e.push(t.value),t.type==="range"&&(t.type="text"),e),[]);pe.flatten=(...r)=>{let e=[],t=n=>{for(let i=0;i<n.length;i++){let s=n[i];if(Array.isArray(s)){t(s);continue}s!==void 0&&e.push(s)}return e};return t(r),e}});var wt=y((Sm,Fs)=>{"use strict";var Hs=Rt();Fs.exports=(r,e={})=>{let t=(n,i={})=>{let s=e.escapeInvalid&&Hs.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a="";if(n.value)return(s||o)&&Hs.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let l of n.nodes)a+=t(l);return a};return t(r)}});var Ds=y((vm,Is)=>{"use strict";Is.exports=function(r){return typeof r=="number"?r-r===0:typeof r=="string"&&r.trim()!==""?Number.isFinite?Number.isFinite(+r):isFinite(+r):!1}});var Ys=y((Em,Ks)=>{"use strict";var Bs=Ds(),Be=(r,e,t)=>{if(Bs(r)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||r===e)return String(r);if(Bs(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...t};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let i=String(n.relaxZeros),s=String(n.shorthand),o=String(n.capture),a=String(n.wrap),l=r+":"+e+"="+i+s+o+a;if(Be.cache.hasOwnProperty(l))return Be.cache[l].result;let h=Math.min(r,e),u=Math.max(r,e);if(Math.abs(h-u)===1){let g=r+"|"+e;return n.capture?`(${g})`:n.wrap===!1?g:`(?:${g})`}let f=Us(r)||Us(e),c={min:r,max:e,a:h,b:u},E=[],_=[];if(f&&(c.isPadded=f,c.maxLen=String(c.max).length),h<0){let g=u<0?Math.abs(u):1;_=js(g,Math.abs(h),c,n),h=c.a=0}return u>=0&&(E=js(h,u,c,n)),c.negatives=_,c.positives=E,c.result=Ul(_,E,n),n.capture===!0?c.result=`(${c.result})`:n.wrap!==!1&&E.length+_.length>1&&(c.result=`(?:${c.result})`),Be.cache[l]=c,c.result};function Ul(r,e,t){let n=Tr(r,e,"-",!1,t)||[],i=Tr(e,r,"",!1,t)||[],s=Tr(r,e,"-?",!0,t)||[];return n.concat(s).concat(i).join("|")}function Kl(r,e){let t=1,n=1,i=Vs(r,t),s=new Set([e]);for(;r<=i&&i<=e;)s.add(i),t+=1,i=Vs(r,t);for(i=Ws(e+1,n)-1;r<i&&i<=e;)s.add(i),n+=1,i=Ws(e+1,n)-1;return s=[...s],s.sort(Xl),s}function Yl(r,e,t){if(r===e)return{pattern:r,count:[],digits:0};let n=Ql(r,e),i=n.length,s="",o=0;for(let a=0;a<i;a++){let[l,h]=n[a];l===h?s+=l:l!=="0"||h!=="9"?s+=Jl(l,h,t):o++}return o&&(s+=t.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:i}}function js(r,e,t,n){let i=Kl(r,e),s=[],o=r,a;for(let l=0;l<i.length;l++){let h=i[l],u=Yl(String(o),String(h),n),f="";if(!t.isPadded&&a&&a.pattern===u.pattern){a.count.length>1&&a.count.pop(),a.count.push(u.count[0]),a.string=a.pattern+Gs(a.count),o=h+1;continue}t.isPadded&&(f=zl(h,t,n)),u.string=f+u.pattern+Gs(u.count),s.push(u),o=h+1,a=u}return s}function Tr(r,e,t,n,i){let s=[];for(let o of r){let{string:a}=o;!n&&!qs(e,"string",a)&&s.push(t+a),n&&qs(e,"string",a)&&s.push(t+a)}return s}function Ql(r,e){let t=[];for(let n=0;n<r.length;n++)t.push([r[n],e[n]]);return t}function Xl(r,e){return r>e?1:e>r?-1:0}function qs(r,e,t){return r.some(n=>n[e]===t)}function Vs(r,e){return Number(String(r).slice(0,-e)+"9".repeat(e))}function Ws(r,e){return r-r%Math.pow(10,e)}function Gs(r){let[e=0,t=""]=r;return t||e>1?`{${e+(t?","+t:"")}}`:""}function Jl(r,e,t){return`[${r}${e-r===1?"":"-"}${e}]`}function Us(r){return/^-?(0+)\d/.test(r)}function zl(r,e,t){if(!e.isPadded)return r;let n=Math.abs(e.maxLen-String(r).length),i=t.relaxZeros!==!1;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${n}}`:`0{${n}}`}}Be.cache={};Be.clearCache=()=>Be.cache={};Ks.exports=Be});var Lr=y((Am,to)=>{"use strict";var Zl=require("util"),Xs=Ys(),Qs=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),ec=r=>e=>r===!0?Number(e):String(e),kr=r=>typeof r=="number"||typeof r=="string"&&r!=="",ot=r=>Number.isInteger(+r),$r=r=>{let e=`${r}`,t=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++t]==="0";);return t>0},tc=(r,e,t)=>typeof r=="string"||typeof e=="string"?!0:t.stringify===!0,rc=(r,e,t)=>{if(e>0){let n=r[0]==="-"?"-":"";n&&(r=r.slice(1)),r=n+r.padStart(n?e-1:e,"0")}return t===!1?String(r):r},kt=(r,e)=>{let t=r[0]==="-"?"-":"";for(t&&(r=r.slice(1),e--);r.length<e;)r="0"+r;return t?"-"+r:r},nc=(r,e,t)=>{r.negatives.sort((a,l)=>a<l?-1:a>l?1:0),r.positives.sort((a,l)=>a<l?-1:a>l?1:0);let n=e.capture?"":"?:",i="",s="",o;return r.positives.length&&(i=r.positives.map(a=>kt(String(a),t)).join("|")),r.negatives.length&&(s=`-(${n}${r.negatives.map(a=>kt(String(a),t)).join("|")})`),i&&s?o=`${i}|${s}`:o=i||s,e.wrap?`(${n}${o})`:o},Js=(r,e,t,n)=>{if(t)return Xs(r,e,{wrap:!1,...n});let i=String.fromCharCode(r);if(r===e)return i;let s=String.fromCharCode(e);return`[${i}-${s}]`},zs=(r,e,t)=>{if(Array.isArray(r)){let n=t.wrap===!0,i=t.capture?"":"?:";return n?`(${i}${r.join("|")})`:r.join("|")}return Xs(r,e,t)},Zs=(...r)=>new RangeError("Invalid range arguments: "+Zl.inspect(...r)),eo=(r,e,t)=>{if(t.strictRanges===!0)throw Zs([r,e]);return[]},ic=(r,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${r}" to be a number`);return[]},sc=(r,e,t=1,n={})=>{let i=Number(r),s=Number(e);if(!Number.isInteger(i)||!Number.isInteger(s)){if(n.strictRanges===!0)throw Zs([r,e]);return[]}i===0&&(i=0),s===0&&(s=0);let o=i>s,a=String(r),l=String(e),h=String(t);t=Math.max(Math.abs(t),1);let u=$r(a)||$r(l)||$r(h),f=u?Math.max(a.length,l.length,h.length):0,c=u===!1&&tc(r,e,n)===!1,E=n.transform||ec(c);if(n.toRegex&&t===1)return Js(kt(r,f),kt(e,f),!0,n);let _={negatives:[],positives:[]},g=V=>_[V<0?"negatives":"positives"].push(Math.abs(V)),A=[],$=0;for(;o?i>=s:i<=s;)n.toRegex===!0&&t>1?g(i):A.push(rc(E(i,$),f,c)),i=o?i-t:i+t,$++;return n.toRegex===!0?t>1?nc(_,n,f):zs(A,null,{wrap:!1,...n}):A},oc=(r,e,t=1,n={})=>{if(!ot(r)&&r.length>1||!ot(e)&&e.length>1)return eo(r,e,n);let i=n.transform||(c=>String.fromCharCode(c)),s=`${r}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,l=Math.min(s,o),h=Math.max(s,o);if(n.toRegex&&t===1)return Js(l,h,!1,n);let u=[],f=0;for(;a?s>=o:s<=o;)u.push(i(s,f)),s=a?s-t:s+t,f++;return n.toRegex===!0?zs(u,null,{wrap:!1,options:n}):u},Tt=(r,e,t,n={})=>{if(e==null&&kr(r))return[r];if(!kr(r)||!kr(e))return eo(r,e,n);if(typeof t=="function")return Tt(r,e,1,{transform:t});if(Qs(t))return Tt(r,e,0,t);let i={...n};return i.capture===!0&&(i.wrap=!0),t=t||i.step||1,ot(t)?ot(r)&&ot(e)?sc(r,e,t,i):oc(r,e,Math.max(Math.abs(t),1),i):t!=null&&!Qs(t)?ic(t,i):Tt(r,e,1,t)};to.exports=Tt});var io=y((Cm,no)=>{"use strict";var ac=Lr(),ro=Rt(),uc=(r,e={})=>{let t=(n,i={})=>{let s=ro.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,l=e.escapeInvalid===!0?"\\":"",h="";if(n.isOpen===!0)return l+n.value;if(n.isClose===!0)return console.log("node.isClose",l,n.value),l+n.value;if(n.type==="open")return a?l+n.value:"(";if(n.type==="close")return a?l+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let u=ro.reduce(n.nodes),f=ac(...u,{...e,wrap:!1,toRegex:!0,strictZeros:!0});if(f.length!==0)return u.length>1&&f.length>1?`(${f})`:f}if(n.nodes)for(let u of n.nodes)h+=t(u,n);return h};return t(r)};no.exports=uc});var ao=y((Om,oo)=>{"use strict";var lc=Lr(),so=wt(),Ye=Rt(),je=(r="",e="",t=!1)=>{let n=[];if(r=[].concat(r),e=[].concat(e),!e.length)return r;if(!r.length)return t?Ye.flatten(e).map(i=>`{${i}}`):e;for(let i of r)if(Array.isArray(i))for(let s of i)n.push(je(s,e,t));else for(let s of e)t===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?je(i,s,t):i+s);return Ye.flatten(n)},cc=(r,e={})=>{let t=e.rangeLimit===void 0?1e3:e.rangeLimit,n=(i,s={})=>{i.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(i.invalid||i.dollar){a.push(je(a.pop(),so(i,e)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(je(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let f=Ye.reduce(i.nodes);if(Ye.exceedsLimit(...f,e.step,t))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=lc(...f,e);c.length===0&&(c=so(i,e)),a.push(je(a.pop(),c)),i.nodes=[];return}let l=Ye.encloseBrace(i),h=i.queue,u=i;for(;u.type!=="brace"&&u.type!=="root"&&u.parent;)u=u.parent,h=u.queue;for(let f=0;f<i.nodes.length;f++){let c=i.nodes[f];if(c.type==="comma"&&i.type==="brace"){f===1&&h.push(""),h.push("");continue}if(c.type==="close"){a.push(je(a.pop(),h,l));continue}if(c.value&&c.type!=="open"){h.push(je(h.pop(),c.value));continue}c.nodes&&n(c,i)}return h};return Ye.flatten(n(r))};oo.exports=cc});var lo=y((xm,uo)=>{"use strict";uo.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
27
- `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var mo=y((Pm,ho)=>{"use strict";var fc=wt(),{MAX_LENGTH:co,CHAR_BACKSLASH:Mr,CHAR_BACKTICK:pc,CHAR_COMMA:hc,CHAR_DOT:dc,CHAR_LEFT_PARENTHESES:mc,CHAR_RIGHT_PARENTHESES:gc,CHAR_LEFT_CURLY_BRACE:_c,CHAR_RIGHT_CURLY_BRACE:yc,CHAR_LEFT_SQUARE_BRACKET:fo,CHAR_RIGHT_SQUARE_BRACKET:po,CHAR_DOUBLE_QUOTE:bc,CHAR_SINGLE_QUOTE:Sc,CHAR_NO_BREAK_SPACE:vc,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Ec}=lo(),Ac=(r,e={})=>{if(typeof r!="string")throw new TypeError("Expected a string");let t=e||{},n=typeof t.maxLength=="number"?Math.min(co,t.maxLength):co;if(r.length>n)throw new SyntaxError(`Input length (${r.length}), exceeds max characters (${n})`);let i={type:"root",input:r,nodes:[]},s=[i],o=i,a=i,l=0,h=r.length,u=0,f=0,c,E=()=>r[u++],_=g=>{if(g.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&g.type==="text"){a.value+=g.value;return}return o.nodes.push(g),g.parent=o,g.prev=a,a=g,g};for(_({type:"bos"});u<h;)if(o=s[s.length-1],c=E(),!(c===Ec||c===vc)){if(c===Mr){_({type:"text",value:(e.keepEscaping?c:"")+E()});continue}if(c===po){_({type:"text",value:"\\"+c});continue}if(c===fo){l++;let g;for(;u<h&&(g=E());){if(c+=g,g===fo){l++;continue}if(g===Mr){c+=E();continue}if(g===po&&(l--,l===0))break}_({type:"text",value:c});continue}if(c===mc){o=_({type:"paren",nodes:[]}),s.push(o),_({type:"text",value:c});continue}if(c===gc){if(o.type!=="paren"){_({type:"text",value:c});continue}o=s.pop(),_({type:"text",value:c}),o=s[s.length-1];continue}if(c===bc||c===Sc||c===pc){let g=c,A;for(e.keepQuotes!==!0&&(c="");u<h&&(A=E());){if(A===Mr){c+=A+E();continue}if(A===g){e.keepQuotes===!0&&(c+=A);break}c+=A}_({type:"text",value:c});continue}if(c===_c){f++;let A={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:f,commas:0,ranges:0,nodes:[]};o=_(A),s.push(o),_({type:"open",value:c});continue}if(c===yc){if(o.type!=="brace"){_({type:"text",value:c});continue}let g="close";o=s.pop(),o.close=!0,_({type:g,value:c}),f--,o=s[s.length-1];continue}if(c===hc&&f>0){if(o.ranges>0){o.ranges=0;let g=o.nodes.shift();o.nodes=[g,{type:"text",value:fc(o)}]}_({type:"comma",value:c}),o.commas++;continue}if(c===dc&&f>0&&o.commas===0){let g=o.nodes;if(f===0||g.length===0){_({type:"text",value:c});continue}if(a.type==="dot"){if(o.range=[],a.value+=c,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){g.pop();let A=g[g.length-1];A.value+=a.value+c,a=A,o.ranges--;continue}_({type:"dot",value:c});continue}_({type:"text",value:c})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach($=>{$.nodes||($.type==="open"&&($.isOpen=!0),$.type==="close"&&($.isClose=!0),$.nodes||($.type="text"),$.invalid=!0)});let g=s[s.length-1],A=g.nodes.indexOf(o);g.nodes.splice(A,1,...o.nodes)}while(s.length>0);return _({type:"eos"}),i};ho.exports=Ac});var yo=y((Rm,_o)=>{"use strict";var go=wt(),Cc=io(),Oc=ao(),xc=mo(),le=(r,e={})=>{let t=[];if(Array.isArray(r))for(let n of r){let i=le.create(n,e);Array.isArray(i)?t.push(...i):t.push(i)}else t=[].concat(le.create(r,e));return e&&e.expand===!0&&e.nodupes===!0&&(t=[...new Set(t)]),t};le.parse=(r,e={})=>xc(r,e);le.stringify=(r,e={})=>go(typeof r=="string"?le.parse(r,e):r,e);le.compile=(r,e={})=>(typeof r=="string"&&(r=le.parse(r,e)),Cc(r,e));le.expand=(r,e={})=>{typeof r=="string"&&(r=le.parse(r,e));let t=Oc(r,e);return e.noempty===!0&&(t=t.filter(Boolean)),e.nodupes===!0&&(t=[...new Set(t)]),t};le.create=(r,e={})=>r===""||r.length<3?[r]:e.expand!==!0?le.compile(r,e):le.expand(r,e);_o.exports=le});var at=y((wm,Ao)=>{"use strict";var Pc=require("path"),Ee="\\\\/",bo=`[^${Ee}]`,Rc=0,Pe="\\.",wc="\\+",Tc="\\?",$t="\\/",kc="(?=.)",So="[^/]",Nr=`(?:${$t}|$)`,vo=`(?:^|${$t})`,Hr=`${Pe}{1,2}${Nr}`,$c=`(?!${Pe})`,Lc=`(?!${vo}${Hr})`,Mc=`(?!${Pe}{0,1}${Nr})`,Nc=`(?!${Hr})`,Hc=`[^.${$t}]`,Fc=`${So}*?`,Eo={DOT_LITERAL:Pe,PLUS_LITERAL:wc,QMARK_LITERAL:Tc,SLASH_LITERAL:$t,ONE_CHAR:kc,QMARK:So,END_ANCHOR:Nr,DOTS_SLASH:Hr,NO_DOT:$c,NO_DOTS:Lc,NO_DOT_SLASH:Mc,NO_DOTS_SLASH:Nc,QMARK_NO_DOT:Hc,STAR:Fc,START_ANCHOR:vo},Ic={...Eo,SLASH_LITERAL:`[${Ee}]`,QMARK:bo,STAR:`${bo}*?`,DOTS_SLASH:`${Pe}{1,2}(?:[${Ee}]|$)`,NO_DOT:`(?!${Pe})`,NO_DOTS:`(?!(?:^|[${Ee}])${Pe}{1,2}(?:[${Ee}]|$))`,NO_DOT_SLASH:`(?!${Pe}{0,1}(?:[${Ee}]|$))`,NO_DOTS_SLASH:`(?!${Pe}{1,2}(?:[${Ee}]|$))`,QMARK_NO_DOT:`[^.${Ee}]`,START_ANCHOR:`(?:^|[${Ee}])`,END_ANCHOR:`(?:[${Ee}]|$)`},Dc={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Ao.exports={DEFAULT_MAX_EXTGLOB_RECURSION:Rc,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Dc,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Pc.sep,extglobChars(r){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${r.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(r){return r===!0?Ic:Eo}}});var ut=y(oe=>{"use strict";var Bc=require("path"),jc=process.platform==="win32",{REGEX_BACKSLASH:qc,REGEX_REMOVE_BACKSLASH:Vc,REGEX_SPECIAL_CHARS:Wc,REGEX_SPECIAL_CHARS_GLOBAL:Gc}=at();oe.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r);oe.hasRegexChars=r=>Wc.test(r);oe.isRegexChar=r=>r.length===1&&oe.hasRegexChars(r);oe.escapeRegex=r=>r.replace(Gc,"\\$1");oe.toPosixSlashes=r=>r.replace(qc,"/");oe.removeBackslashes=r=>r.replace(Vc,e=>e==="\\"?"":e);oe.supportsLookbehinds=()=>{let r=process.version.slice(1).split(".").map(Number);return r.length===3&&r[0]>=9||r[0]===8&&r[1]>=10};oe.isWindows=r=>r&&typeof r.windows=="boolean"?r.windows:jc===!0||Bc.sep==="\\";oe.escapeLast=(r,e,t)=>{let n=r.lastIndexOf(e,t);return n===-1?r:r[n-1]==="\\"?oe.escapeLast(r,e,n-1):`${r.slice(0,n)}\\${r.slice(n)}`};oe.removePrefix=(r,e={})=>{let t=r;return t.startsWith("./")&&(t=t.slice(2),e.prefix="./"),t};oe.wrapOutput=(r,e={},t={})=>{let n=t.contains?"":"^",i=t.contains?"":"$",s=`${n}(?:${r})${i}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var ko=y((km,To)=>{"use strict";var Co=ut(),{CHAR_ASTERISK:Fr,CHAR_AT:Uc,CHAR_BACKWARD_SLASH:lt,CHAR_COMMA:Kc,CHAR_DOT:Ir,CHAR_EXCLAMATION_MARK:Dr,CHAR_FORWARD_SLASH:wo,CHAR_LEFT_CURLY_BRACE:Br,CHAR_LEFT_PARENTHESES:jr,CHAR_LEFT_SQUARE_BRACKET:Yc,CHAR_PLUS:Qc,CHAR_QUESTION_MARK:Oo,CHAR_RIGHT_CURLY_BRACE:Xc,CHAR_RIGHT_PARENTHESES:xo,CHAR_RIGHT_SQUARE_BRACKET:Jc}=at(),Po=r=>r===wo||r===lt,Ro=r=>{r.isPrefix!==!0&&(r.depth=r.isGlobstar?1/0:1)},zc=(r,e)=>{let t=e||{},n=r.length-1,i=t.parts===!0||t.scanToEnd===!0,s=[],o=[],a=[],l=r,h=-1,u=0,f=0,c=!1,E=!1,_=!1,g=!1,A=!1,$=!1,V=!1,I=!1,Q=!1,R=!1,j=0,P,O,M={value:"",depth:0,isGlob:!1},X=()=>h>=n,m=()=>l.charCodeAt(h+1),B=()=>(P=O,l.charCodeAt(++h));for(;h<n;){O=B();let T;if(O===lt){V=M.backslashes=!0,O=B(),O===Br&&($=!0);continue}if($===!0||O===Br){for(j++;X()!==!0&&(O=B());){if(O===lt){V=M.backslashes=!0,B();continue}if(O===Br){j++;continue}if($!==!0&&O===Ir&&(O=B())===Ir){if(c=M.isBrace=!0,_=M.isGlob=!0,R=!0,i===!0)continue;break}if($!==!0&&O===Kc){if(c=M.isBrace=!0,_=M.isGlob=!0,R=!0,i===!0)continue;break}if(O===Xc&&(j--,j===0)){$=!1,c=M.isBrace=!0,R=!0;break}}if(i===!0)continue;break}if(O===wo){if(s.push(h),o.push(M),M={value:"",depth:0,isGlob:!1},R===!0)continue;if(P===Ir&&h===u+1){u+=2;continue}f=h+1;continue}if(t.noext!==!0&&(O===Qc||O===Uc||O===Fr||O===Oo||O===Dr)===!0&&m()===jr){if(_=M.isGlob=!0,g=M.isExtglob=!0,R=!0,O===Dr&&h===u&&(Q=!0),i===!0){for(;X()!==!0&&(O=B());){if(O===lt){V=M.backslashes=!0,O=B();continue}if(O===xo){_=M.isGlob=!0,R=!0;break}}continue}break}if(O===Fr){if(P===Fr&&(A=M.isGlobstar=!0),_=M.isGlob=!0,R=!0,i===!0)continue;break}if(O===Oo){if(_=M.isGlob=!0,R=!0,i===!0)continue;break}if(O===Yc){for(;X()!==!0&&(T=B());){if(T===lt){V=M.backslashes=!0,B();continue}if(T===Jc){E=M.isBracket=!0,_=M.isGlob=!0,R=!0;break}}if(i===!0)continue;break}if(t.nonegate!==!0&&O===Dr&&h===u){I=M.negated=!0,u++;continue}if(t.noparen!==!0&&O===jr){if(_=M.isGlob=!0,i===!0){for(;X()!==!0&&(O=B());){if(O===jr){V=M.backslashes=!0,O=B();continue}if(O===xo){R=!0;break}}continue}break}if(_===!0){if(R=!0,i===!0)continue;break}}t.noext===!0&&(g=!1,_=!1);let F=l,me="",p="";u>0&&(me=l.slice(0,u),l=l.slice(u),f-=u),F&&_===!0&&f>0?(F=l.slice(0,f),p=l.slice(f)):_===!0?(F="",p=l):F=l,F&&F!==""&&F!=="/"&&F!==l&&Po(F.charCodeAt(F.length-1))&&(F=F.slice(0,-1)),t.unescape===!0&&(p&&(p=Co.removeBackslashes(p)),F&&V===!0&&(F=Co.removeBackslashes(F)));let d={prefix:me,input:r,start:u,base:F,glob:p,isBrace:c,isBracket:E,isGlob:_,isExtglob:g,isGlobstar:A,negated:I,negatedExtglob:Q};if(t.tokens===!0&&(d.maxDepth=0,Po(O)||o.push(M),d.tokens=o),t.parts===!0||t.tokens===!0){let T;for(let L=0;L<s.length;L++){let ae=T?T+1:u,be=s[L],ue=r.slice(ae,be);t.tokens&&(L===0&&u!==0?(o[L].isPrefix=!0,o[L].value=me):o[L].value=ue,Ro(o[L]),d.maxDepth+=o[L].depth),(L!==0||ue!=="")&&a.push(ue),T=be}if(T&&T+1<r.length){let L=r.slice(T+1);a.push(L),t.tokens&&(o[o.length-1].value=L,Ro(o[o.length-1]),d.maxDepth+=o[o.length-1].depth)}d.slashes=s,d.parts=a}return d};To.exports=zc});var Ho=y(($m,No)=>{"use strict";var ct=at(),ne=ut(),{MAX_LENGTH:Lt,POSIX_REGEX_SOURCE:Zc,REGEX_NON_SPECIAL_CHARS:ef,REGEX_SPECIAL_CHARS_BACKREF:tf,REPLACEMENTS:$o}=ct,rf=(r,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...r,e);r.sort();let t=`[${r.join("-")}]`;try{new RegExp(t)}catch{return r.map(i=>ne.escapeRegex(i)).join("..")}return t},Qe=(r,e)=>`Missing ${r}: "${e}" - use "\\\\${e}" to match literal characters`,Lo=r=>{let e=[],t=0,n=0,i=0,s="",o=!1;for(let a of r){if(o===!0){s+=a,o=!1;continue}if(a==="\\"){s+=a,o=!0;continue}if(a==='"'){i=i===1?0:1,s+=a;continue}if(i===0){if(a==="[")t++;else if(a==="]"&&t>0)t--;else if(t===0){if(a==="(")n++;else if(a===")"&&n>0)n--;else if(a==="|"&&n===0){e.push(s),s="";continue}}}s+=a}return e.push(s),e},nf=r=>{let e=!1;for(let t of r){if(e===!0){e=!1;continue}if(t==="\\"){e=!0;continue}if(/[?*+@!()[\]{}]/.test(t))return!1}return!0},Mo=r=>{let e=r.trim(),t=!0;for(;t===!0;)t=!1,/^@\([^\\()[\]{}|]+\)$/.test(e)&&(e=e.slice(2,-1),t=!0);if(nf(e))return e.replace(/\\(.)/g,"$1")},sf=r=>{let e=r.map(Mo).filter(Boolean);for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++){let i=e[t],s=e[n],o=i[0];if(!(!o||i!==o.repeat(i.length)||s!==o.repeat(s.length))&&(i===s||i.startsWith(s)||s.startsWith(i)))return!0}return!1},qr=(r,e=!0)=>{if(r[0]!=="+"&&r[0]!=="*"||r[1]!=="(")return;let t=0,n=0,i=0,s=!1;for(let o=1;o<r.length;o++){let a=r[o];if(s===!0){s=!1;continue}if(a==="\\"){s=!0;continue}if(a==='"'){i=i===1?0:1;continue}if(i!==1){if(a==="["){t++;continue}if(a==="]"&&t>0){t--;continue}if(!(t>0)){if(a==="("){n++;continue}if(a===")"&&(n--,n===0))return e===!0&&o!==r.length-1?void 0:{type:r[0],body:r.slice(2,o),end:o}}}}},of=r=>{let e=0,t=[];for(;e<r.length;){let i=qr(r.slice(e),!1);if(!i||i.type!=="*")return;let s=Lo(i.body).map(a=>a.trim());if(s.length!==1)return;let o=Mo(s[0]);if(!o||o.length!==1)return;t.push(o),e+=i.end+1}return t.length<1?void 0:`${t.length===1?ne.escapeRegex(t[0]):`[${t.map(i=>ne.escapeRegex(i)).join("")}]`}*`},af=r=>{let e=0,t=r.trim(),n=qr(t);for(;n;)e++,t=n.body.trim(),n=qr(t);return e},uf=(r,e)=>{if(e.maxExtglobRecursion===!1)return{risky:!1};let t=typeof e.maxExtglobRecursion=="number"?e.maxExtglobRecursion:ct.DEFAULT_MAX_EXTGLOB_RECURSION,n=Lo(r).map(i=>i.trim());if(n.length>1&&(n.some(i=>i==="")||n.some(i=>/^[*?]+$/.test(i))||sf(n)))return{risky:!0};for(let i of n){let s=of(i);if(s)return{risky:!0,safeOutput:s};if(af(i)>t)return{risky:!0}}return{risky:!1}},Vr=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");r=$o[r]||r;let t={...e},n=typeof t.maxLength=="number"?Math.min(Lt,t.maxLength):Lt,i=r.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:t.prepend||""},o=[s],a=t.capture?"":"?:",l=ne.isWindows(e),h=ct.globChars(l),u=ct.extglobChars(h),{DOT_LITERAL:f,PLUS_LITERAL:c,SLASH_LITERAL:E,ONE_CHAR:_,DOTS_SLASH:g,NO_DOT:A,NO_DOT_SLASH:$,NO_DOTS_SLASH:V,QMARK:I,QMARK_NO_DOT:Q,STAR:R,START_ANCHOR:j}=h,P=S=>`(${a}(?:(?!${j}${S.dot?g:f}).)*?)`,O=t.dot?"":A,M=t.dot?I:Q,X=t.bash===!0?P(t):R;t.capture&&(X=`(${X})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);let m={input:r,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};r=ne.removePrefix(r,m),i=r.length;let B=[],F=[],me=[],p=s,d,T=()=>m.index===i-1,L=m.peek=(S=1)=>r[m.index+S],ae=m.advance=()=>r[++m.index]||"",be=()=>r.slice(m.index+1),ue=(S="",U=0)=>{m.consumed+=S,m.index+=U},ht=S=>{m.output+=S.output!=null?S.output:S.value,ue(S.value)},xu=()=>{let S=1;for(;L()==="!"&&(L(2)!=="("||L(3)==="?");)ae(),m.start++,S++;return S%2===0?!1:(m.negated=!0,m.start++,!0)},dt=S=>{m[S]++,me.push(S)},Te=S=>{m[S]--,me.pop()},k=S=>{if(p.type==="globstar"){let U=m.braces>0&&(S.type==="comma"||S.type==="brace"),b=S.extglob===!0||B.length&&(S.type==="pipe"||S.type==="paren");S.type!=="slash"&&S.type!=="paren"&&!U&&!b&&(m.output=m.output.slice(0,-p.output.length),p.type="star",p.value="*",p.output=X,m.output+=p.output)}if(B.length&&S.type!=="paren"&&(B[B.length-1].inner+=S.value),(S.value||S.output)&&ht(S),p&&p.type==="text"&&S.type==="text"){p.value+=S.value,p.output=(p.output||"")+S.value;return}S.prev=p,o.push(S),p=S},mt=(S,U)=>{let b={...u[U],conditions:1,inner:""};b.prev=p,b.parens=m.parens,b.output=m.output,b.startIndex=m.index,b.tokensIndex=o.length;let w=(t.capture?"(":"")+b.open;dt("parens"),k({type:S,value:U,output:m.output?"":_}),k({type:"paren",extglob:!0,value:ae(),output:w}),B.push(b)},Pu=S=>{let U=r.slice(S.startIndex,m.index+1),b=r.slice(S.startIndex+2,m.index),w=uf(b,t);if((S.type==="plus"||S.type==="star")&&w.risky){let q=w.safeOutput?(S.output?"":_)+(t.capture?`(${w.safeOutput})`:w.safeOutput):void 0,Se=o[S.tokensIndex];Se.type="text",Se.value=U,Se.output=q||ne.escapeRegex(U);for(let ve=S.tokensIndex+1;ve<o.length;ve++)o[ve].value="",o[ve].output="",delete o[ve].suffix;m.output=S.output+Se.output,m.backtrack=!0,k({type:"paren",extglob:!0,value:d,output:""}),Te("parens");return}let W=S.close+(t.capture?")":""),Z;if(S.type==="negate"){let q=X;if(S.inner&&S.inner.length>1&&S.inner.includes("/")&&(q=P(t)),(q!==X||T()||/^\)+$/.test(be()))&&(W=S.close=`)$))${q}`),S.inner.includes("*")&&(Z=be())&&/^\.[^\\/.]+$/.test(Z)){let Se=Vr(Z,{...e,fastpaths:!1}).output;W=S.close=`)${Se})${q})`}S.prev.type==="bos"&&(m.negatedExtglob=!0)}k({type:"paren",extglob:!0,value:d,output:W}),Te("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(r)){let S=!1,U=r.replace(tf,(b,w,W,Z,q,Se)=>Z==="\\"?(S=!0,b):Z==="?"?w?w+Z+(q?I.repeat(q.length):""):Se===0?M+(q?I.repeat(q.length):""):I.repeat(W.length):Z==="."?f.repeat(W.length):Z==="*"?w?w+Z+(q?X:""):X:w?b:`\\${b}`);return S===!0&&(t.unescape===!0?U=U.replace(/\\/g,""):U=U.replace(/\\+/g,b=>b.length%2===0?"\\\\":b?"\\":"")),U===r&&t.contains===!0?(m.output=r,m):(m.output=ne.wrapOutput(U,m,e),m)}for(;!T();){if(d=ae(),d==="\0")continue;if(d==="\\"){let b=L();if(b==="/"&&t.bash!==!0||b==="."||b===";")continue;if(!b){d+="\\",k({type:"text",value:d});continue}let w=/^\\+/.exec(be()),W=0;if(w&&w[0].length>2&&(W=w[0].length,m.index+=W,W%2!==0&&(d+="\\")),t.unescape===!0?d=ae():d+=ae(),m.brackets===0){k({type:"text",value:d});continue}}if(m.brackets>0&&(d!=="]"||p.value==="["||p.value==="[^")){if(t.posix!==!1&&d===":"){let b=p.value.slice(1);if(b.includes("[")&&(p.posix=!0,b.includes(":"))){let w=p.value.lastIndexOf("["),W=p.value.slice(0,w),Z=p.value.slice(w+2),q=Zc[Z];if(q){p.value=W+q,m.backtrack=!0,ae(),!s.output&&o.indexOf(p)===1&&(s.output=_);continue}}}(d==="["&&L()!==":"||d==="-"&&L()==="]")&&(d=`\\${d}`),d==="]"&&(p.value==="["||p.value==="[^")&&(d=`\\${d}`),t.posix===!0&&d==="!"&&p.value==="["&&(d="^"),p.value+=d,ht({value:d});continue}if(m.quotes===1&&d!=='"'){d=ne.escapeRegex(d),p.value+=d,ht({value:d});continue}if(d==='"'){m.quotes=m.quotes===1?0:1,t.keepQuotes===!0&&k({type:"text",value:d});continue}if(d==="("){dt("parens"),k({type:"paren",value:d});continue}if(d===")"){if(m.parens===0&&t.strictBrackets===!0)throw new SyntaxError(Qe("opening","("));let b=B[B.length-1];if(b&&m.parens===b.parens+1){Pu(B.pop());continue}k({type:"paren",value:d,output:m.parens?")":"\\)"}),Te("parens");continue}if(d==="["){if(t.nobracket===!0||!be().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(Qe("closing","]"));d=`\\${d}`}else dt("brackets");k({type:"bracket",value:d});continue}if(d==="]"){if(t.nobracket===!0||p&&p.type==="bracket"&&p.value.length===1){k({type:"text",value:d,output:`\\${d}`});continue}if(m.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(Qe("opening","["));k({type:"text",value:d,output:`\\${d}`});continue}Te("brackets");let b=p.value.slice(1);if(p.posix!==!0&&b[0]==="^"&&!b.includes("/")&&(d=`/${d}`),p.value+=d,ht({value:d}),t.literalBrackets===!1||ne.hasRegexChars(b))continue;let w=ne.escapeRegex(p.value);if(m.output=m.output.slice(0,-p.value.length),t.literalBrackets===!0){m.output+=w,p.value=w;continue}p.value=`(${a}${w}|${p.value})`,m.output+=p.value;continue}if(d==="{"&&t.nobrace!==!0){dt("braces");let b={type:"brace",value:d,output:"(",outputIndex:m.output.length,tokensIndex:m.tokens.length};F.push(b),k(b);continue}if(d==="}"){let b=F[F.length-1];if(t.nobrace===!0||!b){k({type:"text",value:d,output:d});continue}let w=")";if(b.dots===!0){let W=o.slice(),Z=[];for(let q=W.length-1;q>=0&&(o.pop(),W[q].type!=="brace");q--)W[q].type!=="dots"&&Z.unshift(W[q].value);w=rf(Z,t),m.backtrack=!0}if(b.comma!==!0&&b.dots!==!0){let W=m.output.slice(0,b.outputIndex),Z=m.tokens.slice(b.tokensIndex);b.value=b.output="\\{",d=w="\\}",m.output=W;for(let q of Z)m.output+=q.output||q.value}k({type:"brace",value:d,output:w}),Te("braces"),F.pop();continue}if(d==="|"){B.length>0&&B[B.length-1].conditions++,k({type:"text",value:d});continue}if(d===","){let b=d,w=F[F.length-1];w&&me[me.length-1]==="braces"&&(w.comma=!0,b="|"),k({type:"comma",value:d,output:b});continue}if(d==="/"){if(p.type==="dot"&&m.index===m.start+1){m.start=m.index+1,m.consumed="",m.output="",o.pop(),p=s;continue}k({type:"slash",value:d,output:E});continue}if(d==="."){if(m.braces>0&&p.type==="dot"){p.value==="."&&(p.output=f);let b=F[F.length-1];p.type="dots",p.output+=d,p.value+=d,b.dots=!0;continue}if(m.braces+m.parens===0&&p.type!=="bos"&&p.type!=="slash"){k({type:"text",value:d,output:f});continue}k({type:"dot",value:d,output:f});continue}if(d==="?"){if(!(p&&p.value==="(")&&t.noextglob!==!0&&L()==="("&&L(2)!=="?"){mt("qmark",d);continue}if(p&&p.type==="paren"){let w=L(),W=d;if(w==="<"&&!ne.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(p.value==="("&&!/[!=<:]/.test(w)||w==="<"&&!/<([!=]|\w+>)/.test(be()))&&(W=`\\${d}`),k({type:"text",value:d,output:W});continue}if(t.dot!==!0&&(p.type==="slash"||p.type==="bos")){k({type:"qmark",value:d,output:Q});continue}k({type:"qmark",value:d,output:I});continue}if(d==="!"){if(t.noextglob!==!0&&L()==="("&&(L(2)!=="?"||!/[!=<:]/.test(L(3)))){mt("negate",d);continue}if(t.nonegate!==!0&&m.index===0){xu();continue}}if(d==="+"){if(t.noextglob!==!0&&L()==="("&&L(2)!=="?"){mt("plus",d);continue}if(p&&p.value==="("||t.regex===!1){k({type:"plus",value:d,output:c});continue}if(p&&(p.type==="bracket"||p.type==="paren"||p.type==="brace")||m.parens>0){k({type:"plus",value:d});continue}k({type:"plus",value:c});continue}if(d==="@"){if(t.noextglob!==!0&&L()==="("&&L(2)!=="?"){k({type:"at",extglob:!0,value:d,output:""});continue}k({type:"text",value:d});continue}if(d!=="*"){(d==="$"||d==="^")&&(d=`\\${d}`);let b=ef.exec(be());b&&(d+=b[0],m.index+=b[0].length),k({type:"text",value:d});continue}if(p&&(p.type==="globstar"||p.star===!0)){p.type="star",p.star=!0,p.value+=d,p.output=X,m.backtrack=!0,m.globstar=!0,ue(d);continue}let S=be();if(t.noextglob!==!0&&/^\([^?]/.test(S)){mt("star",d);continue}if(p.type==="star"){if(t.noglobstar===!0){ue(d);continue}let b=p.prev,w=b.prev,W=b.type==="slash"||b.type==="bos",Z=w&&(w.type==="star"||w.type==="globstar");if(t.bash===!0&&(!W||S[0]&&S[0]!=="/")){k({type:"star",value:d,output:""});continue}let q=m.braces>0&&(b.type==="comma"||b.type==="brace"),Se=B.length&&(b.type==="pipe"||b.type==="paren");if(!W&&b.type!=="paren"&&!q&&!Se){k({type:"star",value:d,output:""});continue}for(;S.slice(0,3)==="/**";){let ve=r[m.index+4];if(ve&&ve!=="/")break;S=S.slice(3),ue("/**",3)}if(b.type==="bos"&&T()){p.type="globstar",p.value+=d,p.output=P(t),m.output=p.output,m.globstar=!0,ue(d);continue}if(b.type==="slash"&&b.prev.type!=="bos"&&!Z&&T()){m.output=m.output.slice(0,-(b.output+p.output).length),b.output=`(?:${b.output}`,p.type="globstar",p.output=P(t)+(t.strictSlashes?")":"|$)"),p.value+=d,m.globstar=!0,m.output+=b.output+p.output,ue(d);continue}if(b.type==="slash"&&b.prev.type!=="bos"&&S[0]==="/"){let ve=S[1]!==void 0?"|$":"";m.output=m.output.slice(0,-(b.output+p.output).length),b.output=`(?:${b.output}`,p.type="globstar",p.output=`${P(t)}${E}|${E}${ve})`,p.value+=d,m.output+=b.output+p.output,m.globstar=!0,ue(d+ae()),k({type:"slash",value:"/",output:""});continue}if(b.type==="bos"&&S[0]==="/"){p.type="globstar",p.value+=d,p.output=`(?:^|${E}|${P(t)}${E})`,m.output=p.output,m.globstar=!0,ue(d+ae()),k({type:"slash",value:"/",output:""});continue}m.output=m.output.slice(0,-p.output.length),p.type="globstar",p.output=P(t),p.value+=d,m.output+=p.output,m.globstar=!0,ue(d);continue}let U={type:"star",value:d,output:X};if(t.bash===!0){U.output=".*?",(p.type==="bos"||p.type==="slash")&&(U.output=O+U.output),k(U);continue}if(p&&(p.type==="bracket"||p.type==="paren")&&t.regex===!0){U.output=d,k(U);continue}(m.index===m.start||p.type==="slash"||p.type==="dot")&&(p.type==="dot"?(m.output+=$,p.output+=$):t.dot===!0?(m.output+=V,p.output+=V):(m.output+=O,p.output+=O),L()!=="*"&&(m.output+=_,p.output+=_)),k(U)}for(;m.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(Qe("closing","]"));m.output=ne.escapeLast(m.output,"["),Te("brackets")}for(;m.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(Qe("closing",")"));m.output=ne.escapeLast(m.output,"("),Te("parens")}for(;m.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(Qe("closing","}"));m.output=ne.escapeLast(m.output,"{"),Te("braces")}if(t.strictSlashes!==!0&&(p.type==="star"||p.type==="bracket")&&k({type:"maybe_slash",value:"",output:`${E}?`}),m.backtrack===!0){m.output="";for(let S of m.tokens)m.output+=S.output!=null?S.output:S.value,S.suffix&&(m.output+=S.suffix)}return m};Vr.fastpaths=(r,e)=>{let t={...e},n=typeof t.maxLength=="number"?Math.min(Lt,t.maxLength):Lt,i=r.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);r=$o[r]||r;let s=ne.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:l,DOTS_SLASH:h,NO_DOT:u,NO_DOTS:f,NO_DOTS_SLASH:c,STAR:E,START_ANCHOR:_}=ct.globChars(s),g=t.dot?f:u,A=t.dot?c:u,$=t.capture?"":"?:",V={negated:!1,prefix:""},I=t.bash===!0?".*?":E;t.capture&&(I=`(${I})`);let Q=O=>O.noglobstar===!0?I:`(${$}(?:(?!${_}${O.dot?h:o}).)*?)`,R=O=>{switch(O){case"*":return`${g}${l}${I}`;case".*":return`${o}${l}${I}`;case"*.*":return`${g}${I}${o}${l}${I}`;case"*/*":return`${g}${I}${a}${l}${A}${I}`;case"**":return g+Q(t);case"**/*":return`(?:${g}${Q(t)}${a})?${A}${l}${I}`;case"**/*.*":return`(?:${g}${Q(t)}${a})?${A}${I}${o}${l}${I}`;case"**/.*":return`(?:${g}${Q(t)}${a})?${o}${l}${I}`;default:{let M=/^(.*?)\.(\w+)$/.exec(O);if(!M)return;let X=R(M[1]);return X?X+o+M[2]:void 0}}},j=ne.removePrefix(r,V),P=R(j);return P&&t.strictSlashes!==!0&&(P+=`${a}?`),P};No.exports=Vr});var Io=y((Lm,Fo)=>{"use strict";var lf=require("path"),cf=ko(),Wr=Ho(),Gr=ut(),ff=at(),pf=r=>r&&typeof r=="object"&&!Array.isArray(r),J=(r,e,t=!1)=>{if(Array.isArray(r)){let u=r.map(c=>J(c,e,t));return c=>{for(let E of u){let _=E(c);if(_)return _}return!1}}let n=pf(r)&&r.tokens&&r.input;if(r===""||typeof r!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},s=Gr.isWindows(e),o=n?J.compileRe(r,e):J.makeRe(r,e,!1,!0),a=o.state;delete o.state;let l=()=>!1;if(i.ignore){let u={...e,ignore:null,onMatch:null,onResult:null};l=J(i.ignore,u,t)}let h=(u,f=!1)=>{let{isMatch:c,match:E,output:_}=J.test(u,o,e,{glob:r,posix:s}),g={glob:r,state:a,regex:o,posix:s,input:u,output:_,match:E,isMatch:c};return typeof i.onResult=="function"&&i.onResult(g),c===!1?(g.isMatch=!1,f?g:!1):l(u)?(typeof i.onIgnore=="function"&&i.onIgnore(g),g.isMatch=!1,f?g:!1):(typeof i.onMatch=="function"&&i.onMatch(g),f?g:!0)};return t&&(h.state=a),h};J.test=(r,e,t,{glob:n,posix:i}={})=>{if(typeof r!="string")throw new TypeError("Expected input to be a string");if(r==="")return{isMatch:!1,output:""};let s=t||{},o=s.format||(i?Gr.toPosixSlashes:null),a=r===n,l=a&&o?o(r):r;return a===!1&&(l=o?o(r):r,a=l===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=J.matchBase(r,e,t,i):a=e.exec(l)),{isMatch:!!a,match:a,output:l}};J.matchBase=(r,e,t,n=Gr.isWindows(t))=>(e instanceof RegExp?e:J.makeRe(e,t)).test(lf.basename(r));J.isMatch=(r,e,t)=>J(e,t)(r);J.parse=(r,e)=>Array.isArray(r)?r.map(t=>J.parse(t,e)):Wr(r,{...e,fastpaths:!1});J.scan=(r,e)=>cf(r,e);J.compileRe=(r,e,t=!1,n=!1)=>{if(t===!0)return r.output;let i=e||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${r.output})${o}`;r&&r.negated===!0&&(a=`^(?!${a}).*$`);let l=J.toRegex(a,e);return n===!0&&(l.state=r),l};J.makeRe=(r,e={},t=!1,n=!1)=>{if(!r||typeof r!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(r[0]==="."||r[0]==="*")&&(i.output=Wr.fastpaths(r,e)),i.output||(i=Wr(r,e)),J.compileRe(i,e,t,n)};J.toRegex=(r,e)=>{try{let t=e||{};return new RegExp(r,t.flags||(t.nocase?"i":""))}catch(t){if(e&&e.debug===!0)throw t;return/$^/}};J.constants=ff;Fo.exports=J});var Bo=y((Mm,Do)=>{"use strict";Do.exports=Io()});var Uo=y((Nm,Go)=>{"use strict";var qo=require("util"),Vo=yo(),Ae=Bo(),Ur=ut(),jo=r=>r===""||r==="./",Wo=r=>{let e=r.indexOf("{");return e>-1&&r.indexOf("}",e)>-1},G=(r,e,t)=>{e=[].concat(e),r=[].concat(r);let n=new Set,i=new Set,s=new Set,o=0,a=u=>{s.add(u.output),t&&t.onResult&&t.onResult(u)};for(let u=0;u<e.length;u++){let f=Ae(String(e[u]),{...t,onResult:a},!0),c=f.state.negated||f.state.negatedExtglob;c&&o++;for(let E of r){let _=f(E,!0);(c?!_.isMatch:_.isMatch)&&(c?n.add(_.output):(n.delete(_.output),i.add(_.output)))}}let h=(o===e.length?[...s]:[...i]).filter(u=>!n.has(u));if(t&&h.length===0){if(t.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(t.nonull===!0||t.nullglob===!0)return t.unescape?e.map(u=>u.replace(/\\/g,"")):e}return h};G.match=G;G.matcher=(r,e)=>Ae(r,e);G.isMatch=(r,e,t)=>Ae(e,t)(r);G.any=G.isMatch;G.not=(r,e,t={})=>{e=[].concat(e).map(String);let n=new Set,i=[],s=a=>{t.onResult&&t.onResult(a),i.push(a.output)},o=new Set(G(r,e,{...t,onResult:s}));for(let a of i)o.has(a)||n.add(a);return[...n]};G.contains=(r,e,t)=>{if(typeof r!="string")throw new TypeError(`Expected a string: "${qo.inspect(r)}"`);if(Array.isArray(e))return e.some(n=>G.contains(r,n,t));if(typeof e=="string"){if(jo(r)||jo(e))return!1;if(r.includes(e)||r.startsWith("./")&&r.slice(2).includes(e))return!0}return G.isMatch(r,e,{...t,contains:!0})};G.matchKeys=(r,e,t)=>{if(!Ur.isObject(r))throw new TypeError("Expected the first argument to be an object");let n=G(Object.keys(r),e,t),i={};for(let s of n)i[s]=r[s];return i};G.some=(r,e,t)=>{let n=[].concat(r);for(let i of[].concat(e)){let s=Ae(String(i),t);if(n.some(o=>s(o)))return!0}return!1};G.every=(r,e,t)=>{let n=[].concat(r);for(let i of[].concat(e)){let s=Ae(String(i),t);if(!n.every(o=>s(o)))return!1}return!0};G.all=(r,e,t)=>{if(typeof r!="string")throw new TypeError(`Expected a string: "${qo.inspect(r)}"`);return[].concat(e).every(n=>Ae(n,t)(r))};G.capture=(r,e,t)=>{let n=Ur.isWindows(t),s=Ae.makeRe(String(r),{...t,capture:!0}).exec(n?Ur.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};G.makeRe=(...r)=>Ae.makeRe(...r);G.scan=(...r)=>Ae.scan(...r);G.parse=(r,e)=>{let t=[];for(let n of[].concat(r||[]))for(let i of Vo(String(n),e))t.push(Ae.parse(i,e));return t};G.braces=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!Wo(r)?[r]:Vo(r,e)};G.braceExpand=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");return G.braces(r,{...e,expand:!0})};G.hasBraces=Wo;Go.exports=G});var ra=y(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.isAbsolute=C.partitionAbsoluteAndRelative=C.removeDuplicateSlashes=C.matchAny=C.convertPatternsToRe=C.makeRe=C.getPatternParts=C.expandBraceExpansion=C.expandPatternsWithBraceExpansion=C.isAffectDepthOfReadingPattern=C.endsWithSlashGlobStar=C.hasGlobStar=C.getBaseDirectory=C.isPatternRelatedToParentDirectory=C.getPatternsOutsideCurrentDirectory=C.getPatternsInsideCurrentDirectory=C.getPositivePatterns=C.getNegativePatterns=C.isPositivePattern=C.isNegativePattern=C.convertToNegativePattern=C.convertToPositivePattern=C.isDynamicPattern=C.isStaticPattern=void 0;var Ko=require("path"),hf=Ns(),Kr=Uo(),Yo="**",df="\\",mf=/[*?]|^!/,gf=/\[[^[]*]/,_f=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,yf=/[!*+?@]\([^(]*\)/,bf=/,|\.\./,Sf=/(?!^)\/{2,}/g;function Qo(r,e={}){return!Xo(r,e)}C.isStaticPattern=Qo;function Xo(r,e={}){return r===""?!1:!!(e.caseSensitiveMatch===!1||r.includes(df)||mf.test(r)||gf.test(r)||_f.test(r)||e.extglob!==!1&&yf.test(r)||e.braceExpansion!==!1&&vf(r))}C.isDynamicPattern=Xo;function vf(r){let e=r.indexOf("{");if(e===-1)return!1;let t=r.indexOf("}",e+1);if(t===-1)return!1;let n=r.slice(e,t);return bf.test(n)}function Ef(r){return Mt(r)?r.slice(1):r}C.convertToPositivePattern=Ef;function Af(r){return"!"+r}C.convertToNegativePattern=Af;function Mt(r){return r.startsWith("!")&&r[1]!=="("}C.isNegativePattern=Mt;function Jo(r){return!Mt(r)}C.isPositivePattern=Jo;function Cf(r){return r.filter(Mt)}C.getNegativePatterns=Cf;function Of(r){return r.filter(Jo)}C.getPositivePatterns=Of;function xf(r){return r.filter(e=>!Yr(e))}C.getPatternsInsideCurrentDirectory=xf;function Pf(r){return r.filter(Yr)}C.getPatternsOutsideCurrentDirectory=Pf;function Yr(r){return r.startsWith("..")||r.startsWith("./..")}C.isPatternRelatedToParentDirectory=Yr;function Rf(r){return hf(r,{flipBackslashes:!1})}C.getBaseDirectory=Rf;function wf(r){return r.includes(Yo)}C.hasGlobStar=wf;function zo(r){return r.endsWith("/"+Yo)}C.endsWithSlashGlobStar=zo;function Tf(r){let e=Ko.basename(r);return zo(r)||Qo(e)}C.isAffectDepthOfReadingPattern=Tf;function kf(r){return r.reduce((e,t)=>e.concat(Zo(t)),[])}C.expandPatternsWithBraceExpansion=kf;function Zo(r){let e=Kr.braces(r,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((t,n)=>t.length-n.length),e.filter(t=>t!=="")}C.expandBraceExpansion=Zo;function $f(r,e){let{parts:t}=Kr.scan(r,Object.assign(Object.assign({},e),{parts:!0}));return t.length===0&&(t=[r]),t[0].startsWith("/")&&(t[0]=t[0].slice(1),t.unshift("")),t}C.getPatternParts=$f;function ea(r,e){return Kr.makeRe(r,e)}C.makeRe=ea;function Lf(r,e){return r.map(t=>ea(t,e))}C.convertPatternsToRe=Lf;function Mf(r,e){return e.some(t=>t.test(r))}C.matchAny=Mf;function Nf(r){return r.replace(Sf,"/")}C.removeDuplicateSlashes=Nf;function Hf(r){let e=[],t=[];for(let n of r)ta(n)?e.push(n):t.push(n);return[e,t]}C.partitionAbsoluteAndRelative=Hf;function ta(r){return Ko.isAbsolute(r)}C.isAbsolute=ta});var oa=y((Fm,sa)=>{"use strict";var Ff=require("stream"),na=Ff.PassThrough,If=Array.prototype.slice;sa.exports=Df;function Df(){let r=[],e=If.call(arguments),t=!1,n=e[e.length-1];n&&!Array.isArray(n)&&n.pipe==null?e.pop():n={};let i=n.end!==!1,s=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let o=na(n);function a(){for(let u=0,f=arguments.length;u<f;u++)r.push(ia(arguments[u],n));return l(),this}function l(){if(t)return;t=!0;let u=r.shift();if(!u){process.nextTick(h);return}Array.isArray(u)||(u=[u]);let f=u.length+1;function c(){--f>0||(t=!1,l())}function E(_){function g(){_.removeListener("merge2UnpipeEnd",g),_.removeListener("end",g),s&&_.removeListener("error",A),c()}function A($){o.emit("error",$)}if(_._readableState.endEmitted)return c();_.on("merge2UnpipeEnd",g),_.on("end",g),s&&_.on("error",A),_.pipe(o,{end:!1}),_.resume()}for(let _=0;_<u.length;_++)E(u[_]);c()}function h(){t=!1,o.emit("queueDrain"),i&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(u){u.emit("merge2UnpipeEnd")}),e.length&&a.apply(null,e),o}function ia(r,e){if(Array.isArray(r))for(let t=0,n=r.length;t<n;t++)r[t]=ia(r[t],e);else{if(!r._readableState&&r.pipe&&(r=r.pipe(na(e))),!r._readableState||!r.pause||!r.pipe)throw new Error("Only readable stream can be merged.");r.pause()}return r}});var ua=y(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.merge=void 0;var Bf=oa();function jf(r){let e=Bf(r);return r.forEach(t=>{t.once("error",n=>e.emit("error",n))}),e.once("close",()=>aa(r)),e.once("end",()=>aa(r)),e}Nt.merge=jf;function aa(r){r.forEach(e=>e.emit("close"))}});var la=y(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.isEmpty=Xe.isString=void 0;function qf(r){return typeof r=="string"}Xe.isString=qf;function Vf(r){return r===""}Xe.isEmpty=Vf});var Re=y(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.string=ie.stream=ie.pattern=ie.path=ie.fs=ie.errno=ie.array=void 0;var Wf=Es();ie.array=Wf;var Gf=As();ie.errno=Gf;var Uf=Cs();ie.fs=Uf;var Kf=Rs();ie.path=Kf;var Yf=ra();ie.pattern=Yf;var Qf=ua();ie.stream=Qf;var Xf=la();ie.string=Xf});var ha=y(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.convertPatternGroupToTask=se.convertPatternGroupsToTasks=se.groupPatternsByBaseDirectory=se.getNegativePatternsAsPositive=se.getPositivePatterns=se.convertPatternsToTasks=se.generate=void 0;var _e=Re();function Jf(r,e){let t=ca(r,e),n=ca(e.ignore,e),i=fa(t),s=pa(t,n),o=i.filter(u=>_e.pattern.isStaticPattern(u,e)),a=i.filter(u=>_e.pattern.isDynamicPattern(u,e)),l=Qr(o,s,!1),h=Qr(a,s,!0);return l.concat(h)}se.generate=Jf;function ca(r,e){let t=r;return e.braceExpansion&&(t=_e.pattern.expandPatternsWithBraceExpansion(t)),e.baseNameMatch&&(t=t.map(n=>n.includes("/")?n:`**/${n}`)),t.map(n=>_e.pattern.removeDuplicateSlashes(n))}function Qr(r,e,t){let n=[],i=_e.pattern.getPatternsOutsideCurrentDirectory(r),s=_e.pattern.getPatternsInsideCurrentDirectory(r),o=Xr(i),a=Xr(s);return n.push(...Jr(o,e,t)),"."in a?n.push(zr(".",s,e,t)):n.push(...Jr(a,e,t)),n}se.convertPatternsToTasks=Qr;function fa(r){return _e.pattern.getPositivePatterns(r)}se.getPositivePatterns=fa;function pa(r,e){return _e.pattern.getNegativePatterns(r).concat(e).map(_e.pattern.convertToPositivePattern)}se.getNegativePatternsAsPositive=pa;function Xr(r){let e={};return r.reduce((t,n)=>{let i=_e.pattern.getBaseDirectory(n);return i in t?t[i].push(n):t[i]=[n],t},e)}se.groupPatternsByBaseDirectory=Xr;function Jr(r,e,t){return Object.keys(r).map(n=>zr(n,r[n],e,t))}se.convertPatternGroupsToTasks=Jr;function zr(r,e,t,n){return{dynamic:n,positive:e,negative:t,base:r,patterns:[].concat(e,t.map(_e.pattern.convertToNegativePattern))}}se.convertPatternGroupToTask=zr});var ma=y(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.read=void 0;function zf(r,e,t){e.fs.lstat(r,(n,i)=>{if(n!==null){da(t,n);return}if(!i.isSymbolicLink()||!e.followSymbolicLink){Zr(t,i);return}e.fs.stat(r,(s,o)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){da(t,s);return}Zr(t,i);return}e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),Zr(t,o)})})}Ht.read=zf;function da(r,e){r(e)}function Zr(r,e){r(null,e)}});var ga=y(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.read=void 0;function Zf(r,e){let t=e.fs.lstatSync(r);if(!t.isSymbolicLink()||!e.followSymbolicLink)return t;try{let n=e.fs.statSync(r);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!e.throwErrorOnBrokenSymbolicLink)return t;throw n}}Ft.read=Zf});var _a=y(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.createFileSystemAdapter=Le.FILE_SYSTEM_ADAPTER=void 0;var It=require("fs");Le.FILE_SYSTEM_ADAPTER={lstat:It.lstat,stat:It.stat,lstatSync:It.lstatSync,statSync:It.statSync};function ep(r){return r===void 0?Le.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Le.FILE_SYSTEM_ADAPTER),r)}Le.createFileSystemAdapter=ep});var ya=y(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});var tp=_a(),en=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=tp.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return e??t}};tn.default=en});var qe=y(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.statSync=Me.stat=Me.Settings=void 0;var ba=ma(),rp=ga(),rn=ya();Me.Settings=rn.default;function np(r,e,t){if(typeof e=="function"){ba.read(r,nn(),e);return}ba.read(r,nn(e),t)}Me.stat=np;function ip(r,e){let t=nn(e);return rp.read(r,t)}Me.statSync=ip;function nn(r={}){return r instanceof rn.default?r:new rn.default(r)}});var Ea=y((Km,va)=>{var Sa;va.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):r=>(Sa||(Sa=Promise.resolve())).then(r).catch(e=>setTimeout(()=>{throw e},0))});var Ca=y((Ym,Aa)=>{Aa.exports=op;var sp=Ea();function op(r,e){let t,n,i,s=!0;Array.isArray(r)?(t=[],n=r.length):(i=Object.keys(r),t={},n=i.length);function o(l){function h(){e&&e(l,t),e=null}s?sp(h):h()}function a(l,h,u){t[l]=u,(--n===0||h)&&o(h)}n?i?i.forEach(function(l){r[l](function(h,u){a(l,h,u)})}):r.forEach(function(l,h){l(function(u,f){a(h,u,f)})}):o(null),s=!1}});var sn=y(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var Dt=process.versions.node.split(".");if(Dt[0]===void 0||Dt[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var Oa=Number.parseInt(Dt[0],10),ap=Number.parseInt(Dt[1],10),xa=10,up=10,lp=Oa>xa,cp=Oa===xa&&ap>=up;Bt.IS_SUPPORT_READDIR_WITH_FILE_TYPES=lp||cp});var Pa=y(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.createDirentFromStats=void 0;var on=class{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}};function fp(r,e){return new on(r,e)}jt.createDirentFromStats=fp});var an=y(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.fs=void 0;var pp=Pa();qt.fs=pp});var un=y(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.joinPathSegments=void 0;function hp(r,e,t){return r.endsWith(t)?r+e:r+t+e}Vt.joinPathSegments=hp});var La=y(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.readdir=Ne.readdirWithFileTypes=Ne.read=void 0;var dp=qe(),Ra=Ca(),mp=sn(),wa=an(),Ta=un();function gp(r,e,t){if(!e.stats&&mp.IS_SUPPORT_READDIR_WITH_FILE_TYPES){ka(r,e,t);return}$a(r,e,t)}Ne.read=gp;function ka(r,e,t){e.fs.readdir(r,{withFileTypes:!0},(n,i)=>{if(n!==null){Wt(t,n);return}let s=i.map(a=>({dirent:a,name:a.name,path:Ta.joinPathSegments(r,a.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){ln(t,s);return}let o=s.map(a=>_p(a,e));Ra(o,(a,l)=>{if(a!==null){Wt(t,a);return}ln(t,l)})})}Ne.readdirWithFileTypes=ka;function _p(r,e){return t=>{if(!r.dirent.isSymbolicLink()){t(null,r);return}e.fs.stat(r.path,(n,i)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){t(n);return}t(null,r);return}r.dirent=wa.fs.createDirentFromStats(r.name,i),t(null,r)})}}function $a(r,e,t){e.fs.readdir(r,(n,i)=>{if(n!==null){Wt(t,n);return}let s=i.map(o=>{let a=Ta.joinPathSegments(r,o,e.pathSegmentSeparator);return l=>{dp.stat(a,e.fsStatSettings,(h,u)=>{if(h!==null){l(h);return}let f={name:o,path:a,dirent:wa.fs.createDirentFromStats(o,u)};e.stats&&(f.stats=u),l(null,f)})}});Ra(s,(o,a)=>{if(o!==null){Wt(t,o);return}ln(t,a)})})}Ne.readdir=$a;function Wt(r,e){r(e)}function ln(r,e){r(null,e)}});var Ia=y(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.readdir=He.readdirWithFileTypes=He.read=void 0;var yp=qe(),bp=sn(),Ma=an(),Na=un();function Sp(r,e){return!e.stats&&bp.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Ha(r,e):Fa(r,e)}He.read=Sp;function Ha(r,e){return e.fs.readdirSync(r,{withFileTypes:!0}).map(n=>{let i={dirent:n,name:n.name,path:Na.joinPathSegments(r,n.name,e.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let s=e.fs.statSync(i.path);i.dirent=Ma.fs.createDirentFromStats(i.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return i})}He.readdirWithFileTypes=Ha;function Fa(r,e){return e.fs.readdirSync(r).map(n=>{let i=Na.joinPathSegments(r,n,e.pathSegmentSeparator),s=yp.statSync(i,e.fsStatSettings),o={name:n,path:i,dirent:Ma.fs.createDirentFromStats(n,s)};return e.stats&&(o.stats=s),o})}He.readdir=Fa});var Da=y(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.createFileSystemAdapter=Fe.FILE_SYSTEM_ADAPTER=void 0;var Je=require("fs");Fe.FILE_SYSTEM_ADAPTER={lstat:Je.lstat,stat:Je.stat,lstatSync:Je.lstatSync,statSync:Je.statSync,readdir:Je.readdir,readdirSync:Je.readdirSync};function vp(r){return r===void 0?Fe.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Fe.FILE_SYSTEM_ADAPTER),r)}Fe.createFileSystemAdapter=vp});var Ba=y(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});var Ep=require("path"),Ap=qe(),Cp=Da(),cn=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=Cp.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Ep.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new Ap.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e??t}};fn.default=cn});var Gt=y(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.Settings=Ie.scandirSync=Ie.scandir=void 0;var ja=La(),Op=Ia(),pn=Ba();Ie.Settings=pn.default;function xp(r,e,t){if(typeof e=="function"){ja.read(r,hn(),e);return}ja.read(r,hn(e),t)}Ie.scandir=xp;function Pp(r,e){let t=hn(e);return Op.read(r,t)}Ie.scandirSync=Pp;function hn(r={}){return r instanceof pn.default?r:new pn.default(r)}});var Va=y((ig,qa)=>{"use strict";function Rp(r){var e=new r,t=e;function n(){var s=e;return s.next?e=s.next:(e=new r,t=e),s.next=null,s}function i(s){t.next=s,t=s}return{get:n,release:i}}qa.exports=Rp});var Ga=y((sg,dn)=>{"use strict";var wp=Va();function Wa(r,e,t){if(typeof r=="function"&&(t=e,e=r,r=null),t<1)throw new Error("fastqueue concurrency must be greater than 1");var n=wp(Tp),i=null,s=null,o=0,a=null,l={push:g,drain:he,saturated:he,pause:u,paused:!1,concurrency:t,running:h,resume:E,idle:_,length:f,getQueue:c,unshift:A,empty:he,kill:V,killAndDrain:I,error:Q};return l;function h(){return o}function u(){l.paused=!0}function f(){for(var R=i,j=0;R;)R=R.next,j++;return j}function c(){for(var R=i,j=[];R;)j.push(R.value),R=R.next;return j}function E(){if(l.paused){l.paused=!1;for(var R=0;R<l.concurrency;R++)o++,$()}}function _(){return o===0&&l.length()===0}function g(R,j){var P=n.get();P.context=r,P.release=$,P.value=R,P.callback=j||he,P.errorHandler=a,o===l.concurrency||l.paused?s?(s.next=P,s=P):(i=P,s=P,l.saturated()):(o++,e.call(r,P.value,P.worked))}function A(R,j){var P=n.get();P.context=r,P.release=$,P.value=R,P.callback=j||he,o===l.concurrency||l.paused?i?(P.next=i,i=P):(i=P,s=P,l.saturated()):(o++,e.call(r,P.value,P.worked))}function $(R){R&&n.release(R);var j=i;j?l.paused?o--:(s===i&&(s=null),i=j.next,j.next=null,e.call(r,j.value,j.worked),s===null&&l.empty()):--o===0&&l.drain()}function V(){i=null,s=null,l.drain=he}function I(){i=null,s=null,l.drain(),l.drain=he}function Q(R){a=R}}function he(){}function Tp(){this.value=null,this.callback=he,this.next=null,this.release=he,this.context=null,this.errorHandler=null;var r=this;this.worked=function(t,n){var i=r.callback,s=r.errorHandler,o=r.value;r.value=null,r.callback=he,r.errorHandler&&s(t,o),i.call(r.context,t,n),r.release(r)}}function kp(r,e,t){typeof r=="function"&&(t=e,e=r,r=null);function n(u,f){e.call(this,u).then(function(c){f(null,c)},f)}var i=Wa(r,n,t),s=i.push,o=i.unshift;return i.push=a,i.unshift=l,i.drained=h,i;function a(u){var f=new Promise(function(c,E){s(u,function(_,g){if(_){E(_);return}c(g)})});return f.catch(he),f}function l(u){var f=new Promise(function(c,E){o(u,function(_,g){if(_){E(_);return}c(g)})});return f.catch(he),f}function h(){var u=i.drain,f=new Promise(function(c){i.drain=function(){u(),c()}});return f}}dn.exports=Wa;dn.exports.promise=kp});var Ut=y(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.joinPathSegments=Ce.replacePathSegmentSeparator=Ce.isAppliedFilter=Ce.isFatalError=void 0;function $p(r,e){return r.errorFilter===null?!0:!r.errorFilter(e)}Ce.isFatalError=$p;function Lp(r,e){return r===null||r(e)}Ce.isAppliedFilter=Lp;function Mp(r,e){return r.split(/[/\\]/).join(e)}Ce.replacePathSegmentSeparator=Mp;function Np(r,e,t){return r===""?e:r.endsWith(t)?r+e:r+t+e}Ce.joinPathSegments=Np});var _n=y(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});var Hp=Ut(),mn=class{constructor(e,t){this._root=e,this._settings=t,this._root=Hp.replacePathSegmentSeparator(e,t.pathSegmentSeparator)}};gn.default=mn});var Sn=y(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});var Fp=require("events"),Ip=Gt(),Dp=Ga(),Kt=Ut(),Bp=_n(),yn=class extends Bp.default{constructor(e,t){super(e,t),this._settings=t,this._scandir=Ip.scandir,this._emitter=new Fp.EventEmitter,this._queue=Dp(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){let n={directory:e,base:t};this._queue.push(n,i=>{i!==null&&this._handleError(i)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(n,i)=>{if(n!==null){t(n,void 0);return}for(let s of i)this._handleEntry(s,e.base);t(null,void 0)})}_handleError(e){this._isDestroyed||!Kt.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;let n=e.path;t!==void 0&&(e.path=Kt.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),Kt.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&Kt.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,t===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};bn.default=yn});var Ua=y(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});var jp=Sn(),vn=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new jp.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{qp(e,t)}),this._reader.onEntry(t=>{this._storage.push(t)}),this._reader.onEnd(()=>{Vp(e,this._storage)}),this._reader.read()}};En.default=vn;function qp(r,e){r(e)}function Vp(r,e){r(null,e)}});var Ka=y(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});var Wp=require("stream"),Gp=Sn(),An=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new Gp.default(this._root,this._settings),this._stream=new Wp.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};Cn.default=An});var Ya=y(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});var Up=Gt(),Yt=Ut(),Kp=_n(),On=class extends Kp.default{constructor(){super(...arguments),this._scandir=Up.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{let n=this._scandir(e,this._settings.fsScandirSettings);for(let i of n)this._handleEntry(i,t)}catch(n){this._handleError(n)}}_handleError(e){if(Yt.isFatalError(this._settings,e))throw e}_handleEntry(e,t){let n=e.path;t!==void 0&&(e.path=Yt.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),Yt.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&Yt.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,t===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};xn.default=On});var Qa=y(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});var Yp=Ya(),Pn=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new Yp.default(this._root,this._settings)}read(){return this._reader.read()}};Rn.default=Pn});var Xa=y(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});var Qp=require("path"),Xp=Gt(),wn=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Qp.sep),this.fsScandirSettings=new Xp.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e??t}};Tn.default=wn});var Xt=y(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.Settings=Oe.walkStream=Oe.walkSync=Oe.walk=void 0;var Ja=Ua(),Jp=Ka(),zp=Qa(),kn=Xa();Oe.Settings=kn.default;function Zp(r,e,t){if(typeof e=="function"){new Ja.default(r,Qt()).read(e);return}new Ja.default(r,Qt(e)).read(t)}Oe.walk=Zp;function eh(r,e){let t=Qt(e);return new zp.default(r,t).read()}Oe.walkSync=eh;function th(r,e){let t=Qt(e);return new Jp.default(r,t).read()}Oe.walkStream=th;function Qt(r={}){return r instanceof kn.default?r:new kn.default(r)}});var Jt=y(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});var rh=require("path"),nh=qe(),za=Re(),$n=class{constructor(e){this._settings=e,this._fsStatSettings=new nh.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return rh.resolve(this._settings.cwd,e)}_makeEntry(e,t){let n={name:t,path:t,dirent:za.fs.createDirentFromStats(t,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!za.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};Ln.default=$n});var Hn=y(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});var ih=require("stream"),sh=qe(),oh=Xt(),ah=Jt(),Mn=class extends ah.default{constructor(){super(...arguments),this._walkStream=oh.walkStream,this._stat=sh.stat}dynamic(e,t){return this._walkStream(e,t)}static(e,t){let n=e.map(this._getFullEntryPath,this),i=new ih.PassThrough({objectMode:!0});i._write=(s,o,a)=>this._getEntry(n[s],e[s],t).then(l=>{l!==null&&t.entryFilter(l)&&i.push(l),s===n.length-1&&i.end(),a()}).catch(a);for(let s=0;s<n.length;s++)i.write(s);return i}_getEntry(e,t,n){return this._getStat(e).then(i=>this._makeEntry(i,t)).catch(i=>{if(n.errorFilter(i))return null;throw i})}_getStat(e){return new Promise((t,n)=>{this._stat(e,this._fsStatSettings,(i,s)=>i===null?t(s):n(i))})}};Nn.default=Mn});var Za=y(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});var uh=Xt(),lh=Jt(),ch=Hn(),Fn=class extends lh.default{constructor(){super(...arguments),this._walkAsync=uh.walk,this._readerStream=new ch.default(this._settings)}dynamic(e,t){return new Promise((n,i)=>{this._walkAsync(e,t,(s,o)=>{s===null?n(o):i(s)})})}async static(e,t){let n=[],i=this._readerStream.static(e,t);return new Promise((s,o)=>{i.once("error",o),i.on("data",a=>n.push(a)),i.once("end",()=>s(n))})}};In.default=Fn});var eu=y(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});var ft=Re(),Dn=class{constructor(e,t,n){this._patterns=e,this._settings=t,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let t=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(t);this._storage.push({complete:n.length<=1,pattern:e,segments:t,sections:n})}}_getPatternSegments(e){return ft.pattern.getPatternParts(e,this._micromatchOptions).map(n=>ft.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:ft.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(e){return ft.array.splitWhen(e,t=>t.dynamic&&ft.pattern.hasGlobStar(t.pattern))}};Bn.default=Dn});var tu=y(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});var fh=eu(),jn=class extends fh.default{match(e){let t=e.split("/"),n=t.length,i=this._storage.filter(s=>!s.complete||s.segments.length>n);for(let s of i){let o=s.sections[0];if(!s.complete&&n>o.length||t.every((l,h)=>{let u=s.segments[h];return!!(u.dynamic&&u.patternRe.test(l)||!u.dynamic&&u.pattern===l)}))return!0}return!1}};qn.default=jn});var ru=y(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});var zt=Re(),ph=tu(),Vn=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,n){let i=this._getMatcher(t),s=this._getNegativePatternsRe(n);return o=>this._filter(e,o,i,s)}_getMatcher(e){return new ph.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let t=e.filter(zt.pattern.isAffectDepthOfReadingPattern);return zt.pattern.convertPatternsToRe(t,this._micromatchOptions)}_filter(e,t,n,i){if(this._isSkippedByDeep(e,t.path)||this._isSkippedSymbolicLink(t))return!1;let s=zt.path.removeLeadingDotSegment(t.path);return this._isSkippedByPositivePatterns(s,n)?!1:this._isSkippedByNegativePatterns(s,i)}_isSkippedByDeep(e,t){return this._settings.deep===1/0?!1:this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){let n=t.split("/").length;if(e==="")return n;let i=e.split("/").length;return n-i}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(e,t){return!zt.pattern.matchAny(e,t)}};Wn.default=Vn});var nu=y(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});var De=Re(),Gn=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(e,t){let[n,i]=De.pattern.partitionAbsoluteAndRelative(t),s={positive:{all:De.pattern.convertPatternsToRe(e,this._micromatchOptions)},negative:{absolute:De.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:De.pattern.convertPatternsToRe(i,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return o=>this._filter(o,s)}_filter(e,t){let n=De.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(n)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;let i=this._isMatchToPatternsSet(n,t,e.dirent.isDirectory());return this._settings.unique&&i&&this._createIndexRecord(n),i}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,n){return!(!this._isMatchToPatterns(e,t.positive.all,n)||this._isMatchToPatterns(e,t.negative.relative,n)||this._isMatchToAbsoluteNegative(e,t.negative.absolute,n))}_isMatchToAbsoluteNegative(e,t,n){if(t.length===0)return!1;let i=De.path.makeAbsolute(this._settings.cwd,e);return this._isMatchToPatterns(i,t,n)}_isMatchToPatterns(e,t,n){if(t.length===0)return!1;let i=De.pattern.matchAny(e,t);return!i&&n?De.pattern.matchAny(e+"/",t):i}};Un.default=Gn});var iu=y(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});var hh=Re(),Kn=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return hh.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};Yn.default=Kn});var ou=y(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});var su=Re(),Qn=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let t=e.path;return this._settings.absolute&&(t=su.path.makeAbsolute(this._settings.cwd,t),t=su.path.unixify(t)),this._settings.markDirectories&&e.dirent.isDirectory()&&(t+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:t}):t}};Xn.default=Qn});var Zt=y(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});var dh=require("path"),mh=ru(),gh=nu(),_h=iu(),yh=ou(),Jn=class{constructor(e){this._settings=e,this.errorFilter=new _h.default(this._settings),this.entryFilter=new gh.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new mh.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new yh.default(this._settings)}_getRootDirectory(e){return dh.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let t=e.base==="."?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};zn.default=Jn});var au=y(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});var bh=Za(),Sh=Zt(),Zn=class extends Sh.default{constructor(){super(...arguments),this._reader=new bh.default(this._settings)}async read(e){let t=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(t,e,n)).map(s=>n.transform(s))}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}};ei.default=Zn});var uu=y(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});var vh=require("stream"),Eh=Hn(),Ah=Zt(),ti=class extends Ah.default{constructor(){super(...arguments),this._reader=new Eh.default(this._settings)}read(e){let t=this._getRootDirectory(e),n=this._getReaderOptions(e),i=this.api(t,e,n),s=new vh.Readable({objectMode:!0,read:()=>{}});return i.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",n.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>i.destroy()),s}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}};ri.default=ti});var lu=y(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});var Ch=qe(),Oh=Xt(),xh=Jt(),ni=class extends xh.default{constructor(){super(...arguments),this._walkSync=Oh.walkSync,this._statSync=Ch.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){let n=[];for(let i of e){let s=this._getFullEntryPath(i),o=this._getEntry(s,i,t);o===null||!t.entryFilter(o)||n.push(o)}return n}_getEntry(e,t,n){try{let i=this._getStat(e);return this._makeEntry(i,t)}catch(i){if(n.errorFilter(i))return null;throw i}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};ii.default=ni});var cu=y(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});var Ph=lu(),Rh=Zt(),si=class extends Rh.default{constructor(){super(...arguments),this._reader=new Ph.default(this._settings)}read(e){let t=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(t,e,n).map(n.transform)}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}};oi.default=si});var fu=y(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var ze=require("fs"),wh=require("os"),Th=Math.max(wh.cpus().length,1);Ze.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:ze.lstat,lstatSync:ze.lstatSync,stat:ze.stat,statSync:ze.statSync,readdir:ze.readdir,readdirSync:ze.readdirSync};var ai=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,Th),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return e===void 0?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},Ze.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};Ze.default=ai});var du=y((Tg,hu)=>{"use strict";var pu=ha(),kh=au(),$h=uu(),Lh=cu(),ui=fu(),de=Re();async function li(r,e){ye(r);let t=ci(r,kh.default,e),n=await Promise.all(t);return de.array.flatten(n)}(function(r){r.glob=r,r.globSync=e,r.globStream=t,r.async=r;function e(h,u){ye(h);let f=ci(h,Lh.default,u);return de.array.flatten(f)}r.sync=e;function t(h,u){ye(h);let f=ci(h,$h.default,u);return de.stream.merge(f)}r.stream=t;function n(h,u){ye(h);let f=[].concat(h),c=new ui.default(u);return pu.generate(f,c)}r.generateTasks=n;function i(h,u){ye(h);let f=new ui.default(u);return de.pattern.isDynamicPattern(h,f)}r.isDynamicPattern=i;function s(h){return ye(h),de.path.escape(h)}r.escapePath=s;function o(h){return ye(h),de.path.convertPathToPattern(h)}r.convertPathToPattern=o;let a;(function(h){function u(c){return ye(c),de.path.escapePosixPath(c)}h.escapePath=u;function f(c){return ye(c),de.path.convertPosixPathToPattern(c)}h.convertPathToPattern=f})(a=r.posix||(r.posix={}));let l;(function(h){function u(c){return ye(c),de.path.escapeWindowsPath(c)}h.escapePath=u;function f(c){return ye(c),de.path.convertWindowsPathToPattern(c)}h.convertPathToPattern=f})(l=r.win32||(r.win32={}))})(li||(li={}));function ci(r,e,t){let n=[].concat(r),i=new ui.default(t),s=pu.generate(n,i),o=new e(i);return s.map(o.read,o)}function ye(r){if(![].concat(r).every(n=>de.string.isString(n)&&!de.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}hu.exports=li});var Ri=ee(Pi(),1),{program:Vh,createCommand:Wh,createArgument:Gh,createOption:Uh,CommanderError:Kh,InvalidArgumentError:Yh,InvalidOptionArgumentError:Qh,Command:wi,Argument:Xh,Option:Jh,Help:zh}=Ri.default;var us=require("@rsbuild/core");var $i=require("@rsbuild/plugin-react"),Li=require("@rsbuild/plugin-sass"),Mi=require("@rsbuild/plugin-css-minimizer"),Ni=require("@rsbuild/plugin-assets-retry"),Hi=require("@rsbuild/plugin-svgr"),Fi=require("@rsbuild/core");function rt(r,e){let t=Object.keys({...r.dependencies,...r.devDependencies});return Array.isArray(e)?t.filter(n=>e.some(i=>i instanceof RegExp?i.test(n):i===n)):e instanceof RegExp?t.some(n=>e.test(n)):t.includes(e)}var ke=ee(require("fs")),Ti=ee(require("path")),bt=require("util"),Qu=(0,bt.promisify)(ke.readFile),Xu=(0,bt.promisify)(ke.writeFile),Ju=(0,bt.promisify)(ke.unlink),D={resolvePath(r){return Ti.resolve(r)},hasFile(r){return ke.existsSync(this.resolvePath(r))},async readFile(r){let e=this.resolvePath(r);try{return await Qu(e,{encoding:"utf-8"})}catch(t){if(t.code==="ENOENT")return null;throw t}},async writeFile(r,e){let t=this.resolvePath(r);await Xu(t,e,{encoding:"utf-8"})},async deleteFile(r){let e=this.resolvePath(r);await Ju(e)}};var ki=(r="4.2")=>{let e=new URL(`https://style.tobit.cloud/css/v${r}`);return(["development","qa","staging"].includes(process.env.BUILD_ENV)||process.env.NODE_ENV==="development")&&(e.host="style-staging.tobit.cloud"),`<script>(${zu.toString().replace("##url##",e.toString())})()</script>`},zu=()=>{let r=new URL("##url##"),e=new URLSearchParams(window.location.search.toLowerCase());r.searchParams.set("siteId",e.get("stylesiteid")||e.get("siteid")||""),e.has("colormode")&&r.searchParams.set("colormode",e.get("colormode")||""),e.has("color")&&r.searchParams.set("color",e.get("color")||"");let t=document.createElement("style");document.head.appendChild(t),t.sheet.insertRule("html.chayns-toolkit-css-loading { overflow: hidden; opacity: 0; }");let n=o=>{o?(document.documentElement.classList.remove("chayns-toolkit-css-loading"),t.remove()):document.documentElement.classList.add("chayns-toolkit-css-loading")};n(!1);let i=document.getElementsByTagName("HEAD")[0],s=document.createElement("link");return s.rel="stylesheet",s.type="text/css",s.href=r.toString(),s.onload=()=>{n(!0)},s.onerror=()=>{n(!0)},i.appendChild(s),""};var Ii=require("@module-federation/enhanced/rspack"),Di=require("@rsbuild/plugin-node-polyfill"),Bi=require("@rsbuild/plugin-babel"),ji=require("webpack-bundle-analyzer"),Zu=()=>process.env.NODE_ENV==="production"?{html:"[name].html",js:"[name].[contenthash:8].im.js",css:"[name].[contenthash:8].im.css",svg:"[name].[contenthash:8].im.svg",font:"[name].[contenthash:8].im[ext]",image:"[name].[contenthash:8].im[ext]",media:"[name].[contenthash:8].im[ext]"}:{};function el(r,e){return e||((r.dependencies?.react??r.peerDependencies?.react??r.devDependencies?.react)?.match(/\d+/)?.[0]??"18")}async function St({mode:r,analyze:e,outputFilename:t,injectDevtoolsScript:n,path:i,packageJson:s,prefixCss:o=!1,cssVersion:a="4.2",exposeModules:l,entryPoints:h,target:u,serverSideRendering:f,reactRuntime:c,reactCompiler:E,disableReactSharing:_=!1,manifest:g={}}){let A=s.name,$=process.env.BUILD_ENV||(r==="production"?"production":"development"),V=process.env.BUILD_VERSION||`${$}-fallback-${new Date().toISOString()}`,{parsed:I,publicVars:Q}=(0,Fi.loadEnv)({mode:$}),R=rt(s,"@linaria/core"),j=rt(s,"babel-plugin-react-compiler"),P=typeof E=="boolean"?E:E!==void 0?!0:j,O=typeof E=="object"&&E!==null?E.target:void 0,M=[],X=[(0,$i.pluginReact)({swcReactOptions:{runtime:c}}),(0,Li.pluginSass)(),(0,Ni.pluginAssetsRetry)(),(0,Mi.pluginCssMinimizer)(),(0,Hi.pluginSvgr)({svgrOptions:{exportType:"default"}})];f&&u==="client"&&X.push((0,Di.pluginNodePolyfill)()),(I.BUNDLE_ANALYZE==="true"||e)&&M.push(new ji.BundleAnalyzerPlugin);let m={};if(Object.entries(h).forEach(([p,{pathHtml:d,pathIndex:T}])=>{d?m[p]=T:m[p]={import:T,html:!1}}),!A)throw Error("The name field in package.json has to be provided.");if(l){Object.keys(m).length===0&&(m.index={import:void 0,html:!1});let p={react:{requiredVersion:s.peerDependencies?.react||s?.dependencies?.react},"react-dom":{requiredVersion:s.peerDependencies?.["react-dom"]||s?.dependencies?.["react-dom"]}};try{require.resolve("react-dom/client",{paths:[D.resolvePath("node_modules")]}),p["react-dom/client"]=p["react-dom"]}catch{}let d={dts:!1,manifest:g?.module?{additionalData:T=>{g?.externalAssets&&(T.stats.metaData.externalAssets=g.externalAssets),g?.textStringLibraries&&(T.stats.metaData.textStringLibraries=g.textStringLibraries),T.stats.metaData.buildInfo.buildVersion=V}}:!1,name:A?.split("-").join("_"),filename:"v2.remoteEntry.js",runtimePlugins:u==="server"?[require.resolve("@module-federation/node/runtimePlugin")]:void 0,exposes:l,library:u==="server"?{type:"commonjs-module"}:void 0,shared:r!=="development"&&_!==!0?p:void 0};M.push(new Ii.ModuleFederationPlugin(d))}let B={rspack:{resolve:{fallback:{"react-dom/client":!1}},output:{uniqueName:l?`${A}__${$}__${process.env.BUILD_VERSION||1}`:A},plugins:M,module:{parser:{javascript:{exportsPresence:"warn"}}}},postcss:o?p=>{if(!p.postcssOptions)return;let d=T=>{T.plugins||(T.plugins=[]),T.plugins.push(require("postcss-prefix-selector")({prefix:`.${A}`,ignoreFiles:[/\.module\.s?css$/i],exclude:[":root","html","body"]}))};if(typeof p.postcssOptions=="function"){let T=p.postcssOptions;p.postcssOptions=L=>{let ae=T(L);return d(ae),ae};return}d(p.postcssOptions)}:void 0};(R||P)&&X.push((0,Bi.pluginBabel)({babelLoaderOptions:(p,{addPresets:d})=>{p.sourceMaps=!1,P&&(p.plugins??=[],p.plugins.unshift(["babel-plugin-react-compiler",{target:el(s,O)}])),d(["@babel/preset-react"])}})),R&&(B.bundlerChain=(p,{CHAIN_ID:d})=>{p.module.rule(d.RULE.JS).use(d.USE.SWC).after(d.USE.BABEL).loader("@wyw-in-js/webpack-loader")});let F=n&&u!=="server"?[{tag:"script",attrs:{src:"http://localhost:8097"},append:!1}]:void 0,me=process.env.RUNTIME_VARS?.split(",").map(p=>p.trim());return me&&(Object.keys(Q).forEach(p=>{let d=p.replace(/^(process\.env\.|import\.meta\.env\.)/,"");if(me.includes(d)){let T=Q[p];Q[p]=`((typeof window !== 'undefined' && window._env_ && window._env_["${A}"] && window._env_["${A}"].${d}) || ${T})`}}),F??=[],F.push({tag:"script",head:!0,append:!1,attrs:{src:"./env-config.js"}})),{source:{tsconfigPath:D.hasFile("tsconfig.json")?D.resolvePath("tsconfig.json"):void 0,define:{"process.env.VERSION":JSON.stringify(V),"import.meta.env.VERSION":JSON.stringify(V),"process.env.BUILD_VERSION":JSON.stringify(V),"import.meta.env.BUILD_VERSION":JSON.stringify(V),"process.env.BUILD_ENV":JSON.stringify($),"import.meta.env.BUILD_ENV":JSON.stringify($),"process.env.__PACKAGE_NAME__":JSON.stringify(s.name?.replace(/-/g,"_")),"import.meta.env.__PACKAGE_NAME__":JSON.stringify(s.name?.replace(/-/g,"_")),__REQUIRED_REACT_VERSION__:JSON.stringify(s.peerDependencies?.react||s?.dependencies?.react),...Q},entry:m},plugins:X,html:{template:({value:p,entryName:d})=>h[d]?.pathHtml??p,templateParameters:(p,{entryName:d})=>({...p,CHAYNS_TOOLKIT_CSS_TAG:ki(a),...h[d]?.templateParameters}),tags:F},tools:B,output:{target:u==="server"?"node":"web",sourceMap:{js:r==="development"?"cheap-module-source-map":"hidden-source-map"},cleanDistPath:r==="production",assetPrefix:u==="server"?void 0:"auto",overrideBrowserslist:r==="production"?["cover 90%","not dead","not op_mini all","Firefox ESR","not android < 5"]:void 0,filename:{...Zu(),...t},distPath:{root:i||"build"},manifest:g?.host&&u!=="server"?{generate:({manifestData:p})=>{let d=T=>T.filter(L=>!L.endsWith(".map"));return p.allFiles=d(p.allFiles),Object.values(p.entries).forEach(T=>{T.assets&&(T.assets=d(T.assets))}),g?.externalAssets&&(p.staticFiles=g.externalAssets),g?.textStringLibraries&&(p.textStringLibraries=g.textStringLibraries),p.buildVersion=V,p}}:!1},dev:{assetPrefix:"auto"}}}var ns=require("zod"),is=require("node:fs"),ss=ee(require("node:module"));var v=require("zod"),tl=v.z.object({host:v.z.string().max(255).default("adaptive"),port:v.z.coerce.number().positive().max(65535).default(1234),ports:v.z.object({client:v.z.coerce.number().positive().max(65535).default(1234),server:v.z.coerce.number().positive().max(65535).default(1235)}).default({}),strictPort:v.z.boolean().default(!1),cert:v.z.string().optional(),key:v.z.string().optional()}),rl=v.z.object({singleBundle:v.z.boolean().default(!1),filename:v.z.object({html:v.z.string().optional(),js:v.z.string().optional(),css:v.z.string().optional(),svg:v.z.string().optional(),font:v.z.string().optional(),image:v.z.string().optional(),media:v.z.string().optional()}).optional(),path:v.z.string().default("build"),serverSideRendering:v.z.union([v.z.literal("all"),v.z.literal("build-only"),v.z.boolean()]).default(!1),prefixCss:v.z.boolean().default(!1),cssVersion:v.z.string().regex(/^\d+\.\d+$/).default("4.2"),exposeModules:v.z.record(v.z.string(),v.z.string()).optional(),disableReactSharing:v.z.boolean().default(!1),reactRuntime:v.z.union([v.z.literal("automatic"),v.z.literal("classic")]).default("classic"),reactCompiler:v.z.union([v.z.boolean(),v.z.object({target:v.z.string().optional()})]).optional(),entryPoints:v.z.record(v.z.string(),v.z.object({pathIndex:v.z.string(),pathHtml:v.z.string().optional(),templateParameters:v.z.record(v.z.string(),v.z.string()).optional()})).default({})}).refine(r=>Object.keys(r.entryPoints).length||Object.keys(r.exposeModules??{}).length,"Need to define at least one key for either output.entryPoints or output.exposeModules"),nl=v.z.object({host:v.z.boolean().default(!1),module:v.z.boolean().default(!1),externalAssets:v.z.array(v.z.string()).optional(),textStringLibraries:v.z.array(v.z.string()).optional()}),qi=v.z.object({development:tl.default({}),output:rl.default({entryPoints:{index:{pathIndex:"./src/index",pathHtml:"./src/index.html"}}}),manifest:nl.default({}),webpack:v.z.function().args(v.z.custom(),v.z.object({dev:v.z.boolean(),target:v.z.union([v.z.literal("server"),v.z.literal("client"),v.z.null()]),watch:v.z.boolean().default(!1)})).returns(v.z.custom()).optional()});var Vi=(r=0)=>e=>`\x1B[${e+r}m`,Wi=(r=0)=>e=>`\x1B[${38+r};5;${e}m`,Gi=(r=0)=>(e,t,n)=>`\x1B[${38+r};2;${e};${t};${n}m`,K={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},cd=Object.keys(K.modifier),il=Object.keys(K.color),sl=Object.keys(K.bgColor),fd=[...il,...sl];function ol(){let r=new Map;for(let[e,t]of Object.entries(K)){for(let[n,i]of Object.entries(t))K[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},t[n]=K[n],r.set(i[0],i[1]);Object.defineProperty(K,e,{value:t,enumerable:!1})}return Object.defineProperty(K,"codes",{value:r,enumerable:!1}),K.color.close="\x1B[39m",K.bgColor.close="\x1B[49m",K.color.ansi=Vi(),K.color.ansi256=Wi(),K.color.ansi16m=Gi(),K.bgColor.ansi=Vi(10),K.bgColor.ansi256=Wi(10),K.bgColor.ansi16m=Gi(10),Object.defineProperties(K,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>K.rgbToAnsi256(...K.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,i;if(e>=232)t=((e-232)*10+8)/255,n=t,i=t;else{e-=16;let a=e%36;t=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(t,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(t));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>K.ansi256ToAnsi(K.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>K.ansi256ToAnsi(K.hexToAnsi256(e)),enumerable:!1}}),K}var al=ol(),ge=al;var Et=ee(require("node:process"),1),Ki=ee(require("node:os"),1),br=ee(require("node:tty"),1);function fe(r,e=globalThis.Deno?globalThis.Deno.args:Et.default.argv){let t=r.startsWith("-")?"":r.length===1?"-":"--",n=e.indexOf(t+r),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:Y}=Et.default,vt;fe("no-color")||fe("no-colors")||fe("color=false")||fe("color=never")?vt=0:(fe("color")||fe("colors")||fe("color=true")||fe("color=always"))&&(vt=1);function ul(){if("FORCE_COLOR"in Y)return Y.FORCE_COLOR==="true"?1:Y.FORCE_COLOR==="false"?0:Y.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Y.FORCE_COLOR,10),3)}function ll(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function cl(r,{streamIsTTY:e,sniffFlags:t=!0}={}){let n=ul();n!==void 0&&(vt=n);let i=t?vt:n;if(i===0)return 0;if(t){if(fe("color=16m")||fe("color=full")||fe("color=truecolor"))return 3;if(fe("color=256"))return 2}if("TF_BUILD"in Y&&"AGENT_NAME"in Y)return 1;if(r&&!e&&i===void 0)return 0;let s=i||0;if(Y.TERM==="dumb")return s;if(Et.default.platform==="win32"){let o=Ki.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Y)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in Y)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in Y)||Y.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in Y)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Y.TEAMCITY_VERSION)?1:0;if(Y.COLORTERM==="truecolor"||Y.TERM==="xterm-kitty"||Y.TERM==="xterm-ghostty"||Y.TERM==="wezterm")return 3;if("TERM_PROGRAM"in Y){let o=Number.parseInt((Y.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Y.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Y.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Y.TERM)||"COLORTERM"in Y?1:s}function Ui(r,e={}){let t=cl(r,{streamIsTTY:r&&r.isTTY,...e});return ll(t)}var fl={stdout:Ui({isTTY:br.default.isatty(1)}),stderr:Ui({isTTY:br.default.isatty(2)})},Yi=fl;function Qi(r,e,t){let n=r.indexOf(e);if(n===-1)return r;let i=e.length,s=0,o="";do o+=r.slice(s,n)+e+t,s=n+i,n=r.indexOf(e,s);while(n!==-1);return o+=r.slice(s),o}function Xi(r,e,t,n){let i=0,s="";do{let o=r[n-1]==="\r";s+=r.slice(i,o?n-1:n)+e+(o?`\r
26
+ `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Ri(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?i=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],n=s[3],i=s[4]),t&&i!=="0"?`${t}=${n}:${parseInt(i)+1}`:e})}function br(){if(H.env.NO_COLOR||H.env.FORCE_COLOR==="0"||H.env.FORCE_COLOR==="false")return!1;if(H.env.FORCE_COLOR||H.env.CLICOLOR_FORCE!==void 0)return!0}Sr.Command=yr;Sr.useColor=br});var $i=b(ce=>{var{Argument:Pi}=yt(),{Command:vr}=wi(),{CommanderError:el,InvalidArgumentError:Ti}=rt(),{Help:tl}=fr(),{Option:ki}=mr();ce.program=new vr;ce.createCommand=r=>new vr(r);ce.createOption=(r,e)=>new ki(r,e);ce.createArgument=(r,e)=>new Pi(r,e);ce.Command=vr;ce.Option=ki;ce.Argument=Pi;ce.Help=tl;ce.CommanderError=el;ce.InvalidArgumentError=Ti;ce.InvalidOptionArgumentError=Ti});var Ps=b(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.splitWhen=Ye.flatten=void 0;function Fl(r){return r.reduce((e,t)=>[].concat(e,t),[])}Ye.flatten=Fl;function Dl(r,e){let t=[[]],n=0;for(let i of r)e(i)?(n++,t[n]=[]):t[n].push(i);return t}Ye.splitWhen=Dl});var Ts=b(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.isEnoentCodeError=void 0;function Il(r){return r.code==="ENOENT"}Pt.isEnoentCodeError=Il});var ks=b(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.createDirentFromStats=void 0;var kr=class{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}};function jl(r,e){return new kr(r,e)}Tt.createDirentFromStats=jl});var Ns=b(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.convertPosixPathToPattern=z.convertWindowsPathToPattern=z.convertPathToPattern=z.escapePosixPath=z.escapeWindowsPath=z.escape=z.removeLeadingDotSegment=z.makeAbsolute=z.unixify=void 0;var Bl=require("os"),ql=require("path"),$s=Bl.platform()==="win32",Vl=2,Wl=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,Gl=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,Ul=/^\\\\([.?])/,Kl=/\\(?![!()+@[\]{}])/g;function Yl(r){return r.replace(/\\/g,"/")}z.unixify=Yl;function Ql(r,e){return ql.resolve(r,e)}z.makeAbsolute=Ql;function Jl(r){if(r.charAt(0)==="."){let e=r.charAt(1);if(e==="/"||e==="\\")return r.slice(Vl)}return r}z.removeLeadingDotSegment=Jl;z.escape=$s?$r:Lr;function $r(r){return r.replace(Gl,"\\$2")}z.escapeWindowsPath=$r;function Lr(r){return r.replace(Wl,"\\$2")}z.escapePosixPath=Lr;z.convertPathToPattern=$s?Ls:Ms;function Ls(r){return $r(r).replace(Ul,"//$1").replace(Kl,"/")}z.convertWindowsPathToPattern=Ls;function Ms(r){return Lr(r)}z.convertPosixPathToPattern=Ms});var Fs=b((Mm,Hs)=>{Hs.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}});var js=b((Nm,Is)=>{var Xl=Fs(),Ds={"{":"}","(":")","[":"]"},zl=function(r){if(r[0]==="!")return!0;for(var e=0,t=-2,n=-2,i=-2,s=-2,o=-2;e<r.length;){if(r[e]==="*"||r[e+1]==="?"&&/[\].+)]/.test(r[e])||n!==-1&&r[e]==="["&&r[e+1]!=="]"&&(n<e&&(n=r.indexOf("]",e)),n>e&&(o===-1||o>n||(o=r.indexOf("\\",e),o===-1||o>n)))||i!==-1&&r[e]==="{"&&r[e+1]!=="}"&&(i=r.indexOf("}",e),i>e&&(o=r.indexOf("\\",e),o===-1||o>i))||s!==-1&&r[e]==="("&&r[e+1]==="?"&&/[:!=]/.test(r[e+2])&&r[e+3]!==")"&&(s=r.indexOf(")",e),s>e&&(o=r.indexOf("\\",e),o===-1||o>s))||t!==-1&&r[e]==="("&&r[e+1]!=="|"&&(t<e&&(t=r.indexOf("|",e)),t!==-1&&r[t+1]!==")"&&(s=r.indexOf(")",t),s>t&&(o=r.indexOf("\\",t),o===-1||o>s))))return!0;if(r[e]==="\\"){var a=r[e+1];e+=2;var l=Ds[a];if(l){var p=r.indexOf(l,e);p!==-1&&(e=p+1)}if(r[e]==="!")return!0}else e++}return!1},Zl=function(r){if(r[0]==="!")return!0;for(var e=0;e<r.length;){if(/[*?{}()[\]]/.test(r[e]))return!0;if(r[e]==="\\"){var t=r[e+1];e+=2;var n=Ds[t];if(n){var i=r.indexOf(n,e);i!==-1&&(e=i+1)}if(r[e]==="!")return!0}else e++}return!1};Is.exports=function(e,t){if(typeof e!="string"||e==="")return!1;if(Xl(e))return!0;var n=zl;return t&&t.strict===!1&&(n=Zl),n(e)}});var qs=b((Hm,Bs)=>{"use strict";var ec=js(),tc=require("path").posix.dirname,rc=require("os").platform()==="win32",Mr="/",nc=/\\/g,ic=/[\{\[].*[\}\]]$/,sc=/(^|[^\\])([\{\[]|\([^\)]+$)/,oc=/\\([\!\*\?\|\[\]\(\)\{\}])/g;Bs.exports=function(e,t){var n=Object.assign({flipBackslashes:!0},t);n.flipBackslashes&&rc&&e.indexOf(Mr)<0&&(e=e.replace(nc,Mr)),ic.test(e)&&(e+=Mr),e+="a";do e=tc(e);while(ec(e)||sc.test(e));return e.replace(oc,"$1")}});var kt=b(pe=>{"use strict";pe.isInteger=r=>typeof r=="number"?Number.isInteger(r):typeof r=="string"&&r.trim()!==""?Number.isInteger(Number(r)):!1;pe.find=(r,e)=>r.nodes.find(t=>t.type===e);pe.exceedsLimit=(r,e,t=1,n)=>n===!1||!pe.isInteger(r)||!pe.isInteger(e)?!1:(Number(e)-Number(r))/Number(t)>=n;pe.escapeNode=(r,e=0,t)=>{let n=r.nodes[e];n&&(t&&n.type===t||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};pe.encloseBrace=r=>r.type!=="brace"?!1:r.commas>>0+r.ranges>>0===0?(r.invalid=!0,!0):!1;pe.isInvalidBrace=r=>r.type!=="brace"?!1:r.invalid===!0||r.dollar?!0:r.commas>>0+r.ranges>>0===0||r.open!==!0||r.close!==!0?(r.invalid=!0,!0):!1;pe.isOpenOrClose=r=>r.type==="open"||r.type==="close"?!0:r.open===!0||r.close===!0;pe.reduce=r=>r.reduce((e,t)=>(t.type==="text"&&e.push(t.value),t.type==="range"&&(t.type="text"),e),[]);pe.flatten=(...r)=>{let e=[],t=n=>{for(let i=0;i<n.length;i++){let s=n[i];if(Array.isArray(s)){t(s);continue}s!==void 0&&e.push(s)}return e};return t(r),e}});var $t=b((Dm,Ws)=>{"use strict";var Vs=kt();Ws.exports=(r,e={})=>{let t=(n,i={})=>{let s=e.escapeInvalid&&Vs.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a="";if(n.value)return(s||o)&&Vs.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let l of n.nodes)a+=t(l);return a};return t(r)}});var Us=b((Im,Gs)=>{"use strict";Gs.exports=function(r){return typeof r=="number"?r-r===0:typeof r=="string"&&r.trim()!==""?Number.isFinite?Number.isFinite(+r):isFinite(+r):!1}});var to=b((jm,eo)=>{"use strict";var Ks=Us(),Be=(r,e,t)=>{if(Ks(r)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||r===e)return String(r);if(Ks(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...t};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let i=String(n.relaxZeros),s=String(n.shorthand),o=String(n.capture),a=String(n.wrap),l=r+":"+e+"="+i+s+o+a;if(Be.cache.hasOwnProperty(l))return Be.cache[l].result;let p=Math.min(r,e),u=Math.max(r,e);if(Math.abs(p-u)===1){let _=r+"|"+e;return n.capture?`(${_})`:n.wrap===!1?_:`(?:${_})`}let f=Zs(r)||Zs(e),c={min:r,max:e,a:p,b:u},y=[],g=[];if(f&&(c.isPadded=f,c.maxLen=String(c.max).length),p<0){let _=u<0?Math.abs(u):1;g=Ys(_,Math.abs(p),c,n),p=c.a=0}return u>=0&&(y=Ys(p,u,c,n)),c.negatives=g,c.positives=y,c.result=ac(g,y,n),n.capture===!0?c.result=`(${c.result})`:n.wrap!==!1&&y.length+g.length>1&&(c.result=`(?:${c.result})`),Be.cache[l]=c,c.result};function ac(r,e,t){let n=Nr(r,e,"-",!1,t)||[],i=Nr(e,r,"",!1,t)||[],s=Nr(r,e,"-?",!0,t)||[];return n.concat(s).concat(i).join("|")}function uc(r,e){let t=1,n=1,i=Js(r,t),s=new Set([e]);for(;r<=i&&i<=e;)s.add(i),t+=1,i=Js(r,t);for(i=Xs(e+1,n)-1;r<i&&i<=e;)s.add(i),n+=1,i=Xs(e+1,n)-1;return s=[...s],s.sort(fc),s}function lc(r,e,t){if(r===e)return{pattern:r,count:[],digits:0};let n=cc(r,e),i=n.length,s="",o=0;for(let a=0;a<i;a++){let[l,p]=n[a];l===p?s+=l:l!=="0"||p!=="9"?s+=pc(l,p,t):o++}return o&&(s+=t.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:i}}function Ys(r,e,t,n){let i=uc(r,e),s=[],o=r,a;for(let l=0;l<i.length;l++){let p=i[l],u=lc(String(o),String(p),n),f="";if(!t.isPadded&&a&&a.pattern===u.pattern){a.count.length>1&&a.count.pop(),a.count.push(u.count[0]),a.string=a.pattern+zs(a.count),o=p+1;continue}t.isPadded&&(f=hc(p,t,n)),u.string=f+u.pattern+zs(u.count),s.push(u),o=p+1,a=u}return s}function Nr(r,e,t,n,i){let s=[];for(let o of r){let{string:a}=o;!n&&!Qs(e,"string",a)&&s.push(t+a),n&&Qs(e,"string",a)&&s.push(t+a)}return s}function cc(r,e){let t=[];for(let n=0;n<r.length;n++)t.push([r[n],e[n]]);return t}function fc(r,e){return r>e?1:e>r?-1:0}function Qs(r,e,t){return r.some(n=>n[e]===t)}function Js(r,e){return Number(String(r).slice(0,-e)+"9".repeat(e))}function Xs(r,e){return r-r%Math.pow(10,e)}function zs(r){let[e=0,t=""]=r;return t||e>1?`{${e+(t?","+t:"")}}`:""}function pc(r,e,t){return`[${r}${e-r===1?"":"-"}${e}]`}function Zs(r){return/^-?(0+)\d/.test(r)}function hc(r,e,t){if(!e.isPadded)return r;let n=Math.abs(e.maxLen-String(r).length),i=t.relaxZeros!==!1;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${n}}`:`0{${n}}`}}Be.cache={};Be.clearCache=()=>Be.cache={};eo.exports=Be});var Dr=b((Bm,uo)=>{"use strict";var dc=require("util"),no=to(),ro=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),mc=r=>e=>r===!0?Number(e):String(e),Hr=r=>typeof r=="number"||typeof r=="string"&&r!=="",at=r=>Number.isInteger(+r),Fr=r=>{let e=`${r}`,t=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++t]==="0";);return t>0},gc=(r,e,t)=>typeof r=="string"||typeof e=="string"?!0:t.stringify===!0,_c=(r,e,t)=>{if(e>0){let n=r[0]==="-"?"-":"";n&&(r=r.slice(1)),r=n+r.padStart(n?e-1:e,"0")}return t===!1?String(r):r},Mt=(r,e)=>{let t=r[0]==="-"?"-":"";for(t&&(r=r.slice(1),e--);r.length<e;)r="0"+r;return t?"-"+r:r},yc=(r,e,t)=>{r.negatives.sort((a,l)=>a<l?-1:a>l?1:0),r.positives.sort((a,l)=>a<l?-1:a>l?1:0);let n=e.capture?"":"?:",i="",s="",o;return r.positives.length&&(i=r.positives.map(a=>Mt(String(a),t)).join("|")),r.negatives.length&&(s=`-(${n}${r.negatives.map(a=>Mt(String(a),t)).join("|")})`),i&&s?o=`${i}|${s}`:o=i||s,e.wrap?`(${n}${o})`:o},io=(r,e,t,n)=>{if(t)return no(r,e,{wrap:!1,...n});let i=String.fromCharCode(r);if(r===e)return i;let s=String.fromCharCode(e);return`[${i}-${s}]`},so=(r,e,t)=>{if(Array.isArray(r)){let n=t.wrap===!0,i=t.capture?"":"?:";return n?`(${i}${r.join("|")})`:r.join("|")}return no(r,e,t)},oo=(...r)=>new RangeError("Invalid range arguments: "+dc.inspect(...r)),ao=(r,e,t)=>{if(t.strictRanges===!0)throw oo([r,e]);return[]},bc=(r,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${r}" to be a number`);return[]},Sc=(r,e,t=1,n={})=>{let i=Number(r),s=Number(e);if(!Number.isInteger(i)||!Number.isInteger(s)){if(n.strictRanges===!0)throw oo([r,e]);return[]}i===0&&(i=0),s===0&&(s=0);let o=i>s,a=String(r),l=String(e),p=String(t);t=Math.max(Math.abs(t),1);let u=Fr(a)||Fr(l)||Fr(p),f=u?Math.max(a.length,l.length,p.length):0,c=u===!1&&gc(r,e,n)===!1,y=n.transform||mc(c);if(n.toRegex&&t===1)return io(Mt(r,f),Mt(e,f),!0,n);let g={negatives:[],positives:[]},_=A=>g[A<0?"negatives":"positives"].push(Math.abs(A)),C=[],w=0;for(;o?i>=s:i<=s;)n.toRegex===!0&&t>1?_(i):C.push(_c(y(i,w),f,c)),i=o?i-t:i+t,w++;return n.toRegex===!0?t>1?yc(g,n,f):so(C,null,{wrap:!1,...n}):C},vc=(r,e,t=1,n={})=>{if(!at(r)&&r.length>1||!at(e)&&e.length>1)return ao(r,e,n);let i=n.transform||(c=>String.fromCharCode(c)),s=`${r}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,l=Math.min(s,o),p=Math.max(s,o);if(n.toRegex&&t===1)return io(l,p,!1,n);let u=[],f=0;for(;a?s>=o:s<=o;)u.push(i(s,f)),s=a?s-t:s+t,f++;return n.toRegex===!0?so(u,null,{wrap:!1,options:n}):u},Lt=(r,e,t,n={})=>{if(e==null&&Hr(r))return[r];if(!Hr(r)||!Hr(e))return ao(r,e,n);if(typeof t=="function")return Lt(r,e,1,{transform:t});if(ro(t))return Lt(r,e,0,t);let i={...n};return i.capture===!0&&(i.wrap=!0),t=t||i.step||1,at(t)?at(r)&&at(e)?Sc(r,e,t,i):vc(r,e,Math.max(Math.abs(t),1),i):t!=null&&!ro(t)?bc(t,i):Lt(r,e,1,t)};uo.exports=Lt});var fo=b((qm,co)=>{"use strict";var Ec=Dr(),lo=kt(),Ac=(r,e={})=>{let t=(n,i={})=>{let s=lo.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,l=e.escapeInvalid===!0?"\\":"",p="";if(n.isOpen===!0)return l+n.value;if(n.isClose===!0)return console.log("node.isClose",l,n.value),l+n.value;if(n.type==="open")return a?l+n.value:"(";if(n.type==="close")return a?l+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let u=lo.reduce(n.nodes),f=Ec(...u,{...e,wrap:!1,toRegex:!0,strictZeros:!0});if(f.length!==0)return u.length>1&&f.length>1?`(${f})`:f}if(n.nodes)for(let u of n.nodes)p+=t(u,n);return p};return t(r)};co.exports=Ac});var mo=b((Vm,ho)=>{"use strict";var Cc=Dr(),po=$t(),Qe=kt(),qe=(r="",e="",t=!1)=>{let n=[];if(r=[].concat(r),e=[].concat(e),!e.length)return r;if(!r.length)return t?Qe.flatten(e).map(i=>`{${i}}`):e;for(let i of r)if(Array.isArray(i))for(let s of i)n.push(qe(s,e,t));else for(let s of e)t===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?qe(i,s,t):i+s);return Qe.flatten(n)},Oc=(r,e={})=>{let t=e.rangeLimit===void 0?1e3:e.rangeLimit,n=(i,s={})=>{i.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(i.invalid||i.dollar){a.push(qe(a.pop(),po(i,e)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(qe(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let f=Qe.reduce(i.nodes);if(Qe.exceedsLimit(...f,e.step,t))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=Cc(...f,e);c.length===0&&(c=po(i,e)),a.push(qe(a.pop(),c)),i.nodes=[];return}let l=Qe.encloseBrace(i),p=i.queue,u=i;for(;u.type!=="brace"&&u.type!=="root"&&u.parent;)u=u.parent,p=u.queue;for(let f=0;f<i.nodes.length;f++){let c=i.nodes[f];if(c.type==="comma"&&i.type==="brace"){f===1&&p.push(""),p.push("");continue}if(c.type==="close"){a.push(qe(a.pop(),p,l));continue}if(c.value&&c.type!=="open"){p.push(qe(p.pop(),c.value));continue}c.nodes&&n(c,i)}return p};return Qe.flatten(n(r))};ho.exports=Oc});var _o=b((Wm,go)=>{"use strict";go.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
27
+ `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Eo=b((Gm,vo)=>{"use strict";var xc=$t(),{MAX_LENGTH:yo,CHAR_BACKSLASH:Ir,CHAR_BACKTICK:Rc,CHAR_COMMA:wc,CHAR_DOT:Pc,CHAR_LEFT_PARENTHESES:Tc,CHAR_RIGHT_PARENTHESES:kc,CHAR_LEFT_CURLY_BRACE:$c,CHAR_RIGHT_CURLY_BRACE:Lc,CHAR_LEFT_SQUARE_BRACKET:bo,CHAR_RIGHT_SQUARE_BRACKET:So,CHAR_DOUBLE_QUOTE:Mc,CHAR_SINGLE_QUOTE:Nc,CHAR_NO_BREAK_SPACE:Hc,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Fc}=_o(),Dc=(r,e={})=>{if(typeof r!="string")throw new TypeError("Expected a string");let t=e||{},n=typeof t.maxLength=="number"?Math.min(yo,t.maxLength):yo;if(r.length>n)throw new SyntaxError(`Input length (${r.length}), exceeds max characters (${n})`);let i={type:"root",input:r,nodes:[]},s=[i],o=i,a=i,l=0,p=r.length,u=0,f=0,c,y=()=>r[u++],g=_=>{if(_.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&_.type==="text"){a.value+=_.value;return}return o.nodes.push(_),_.parent=o,_.prev=a,a=_,_};for(g({type:"bos"});u<p;)if(o=s[s.length-1],c=y(),!(c===Fc||c===Hc)){if(c===Ir){g({type:"text",value:(e.keepEscaping?c:"")+y()});continue}if(c===So){g({type:"text",value:"\\"+c});continue}if(c===bo){l++;let _;for(;u<p&&(_=y());){if(c+=_,_===bo){l++;continue}if(_===Ir){c+=y();continue}if(_===So&&(l--,l===0))break}g({type:"text",value:c});continue}if(c===Tc){o=g({type:"paren",nodes:[]}),s.push(o),g({type:"text",value:c});continue}if(c===kc){if(o.type!=="paren"){g({type:"text",value:c});continue}o=s.pop(),g({type:"text",value:c}),o=s[s.length-1];continue}if(c===Mc||c===Nc||c===Rc){let _=c,C;for(e.keepQuotes!==!0&&(c="");u<p&&(C=y());){if(C===Ir){c+=C+y();continue}if(C===_){e.keepQuotes===!0&&(c+=C);break}c+=C}g({type:"text",value:c});continue}if(c===$c){f++;let C={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:f,commas:0,ranges:0,nodes:[]};o=g(C),s.push(o),g({type:"open",value:c});continue}if(c===Lc){if(o.type!=="brace"){g({type:"text",value:c});continue}let _="close";o=s.pop(),o.close=!0,g({type:_,value:c}),f--,o=s[s.length-1];continue}if(c===wc&&f>0){if(o.ranges>0){o.ranges=0;let _=o.nodes.shift();o.nodes=[_,{type:"text",value:xc(o)}]}g({type:"comma",value:c}),o.commas++;continue}if(c===Pc&&f>0&&o.commas===0){let _=o.nodes;if(f===0||_.length===0){g({type:"text",value:c});continue}if(a.type==="dot"){if(o.range=[],a.value+=c,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){_.pop();let C=_[_.length-1];C.value+=a.value+c,a=C,o.ranges--;continue}g({type:"dot",value:c});continue}g({type:"text",value:c})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(w=>{w.nodes||(w.type==="open"&&(w.isOpen=!0),w.type==="close"&&(w.isClose=!0),w.nodes||(w.type="text"),w.invalid=!0)});let _=s[s.length-1],C=_.nodes.indexOf(o);_.nodes.splice(C,1,...o.nodes)}while(s.length>0);return g({type:"eos"}),i};vo.exports=Dc});var Oo=b((Um,Co)=>{"use strict";var Ao=$t(),Ic=fo(),jc=mo(),Bc=Eo(),le=(r,e={})=>{let t=[];if(Array.isArray(r))for(let n of r){let i=le.create(n,e);Array.isArray(i)?t.push(...i):t.push(i)}else t=[].concat(le.create(r,e));return e&&e.expand===!0&&e.nodupes===!0&&(t=[...new Set(t)]),t};le.parse=(r,e={})=>Bc(r,e);le.stringify=(r,e={})=>Ao(typeof r=="string"?le.parse(r,e):r,e);le.compile=(r,e={})=>(typeof r=="string"&&(r=le.parse(r,e)),Ic(r,e));le.expand=(r,e={})=>{typeof r=="string"&&(r=le.parse(r,e));let t=jc(r,e);return e.noempty===!0&&(t=t.filter(Boolean)),e.nodupes===!0&&(t=[...new Set(t)]),t};le.create=(r,e={})=>r===""||r.length<3?[r]:e.expand!==!0?le.compile(r,e):le.expand(r,e);Co.exports=le});var ut=b((Km,To)=>{"use strict";var qc=require("path"),Ee="\\\\/",xo=`[^${Ee}]`,Vc=0,Re="\\.",Wc="\\+",Gc="\\?",Nt="\\/",Uc="(?=.)",Ro="[^/]",jr=`(?:${Nt}|$)`,wo=`(?:^|${Nt})`,Br=`${Re}{1,2}${jr}`,Kc=`(?!${Re})`,Yc=`(?!${wo}${Br})`,Qc=`(?!${Re}{0,1}${jr})`,Jc=`(?!${Br})`,Xc=`[^.${Nt}]`,zc=`${Ro}*?`,Po={DOT_LITERAL:Re,PLUS_LITERAL:Wc,QMARK_LITERAL:Gc,SLASH_LITERAL:Nt,ONE_CHAR:Uc,QMARK:Ro,END_ANCHOR:jr,DOTS_SLASH:Br,NO_DOT:Kc,NO_DOTS:Yc,NO_DOT_SLASH:Qc,NO_DOTS_SLASH:Jc,QMARK_NO_DOT:Xc,STAR:zc,START_ANCHOR:wo},Zc={...Po,SLASH_LITERAL:`[${Ee}]`,QMARK:xo,STAR:`${xo}*?`,DOTS_SLASH:`${Re}{1,2}(?:[${Ee}]|$)`,NO_DOT:`(?!${Re})`,NO_DOTS:`(?!(?:^|[${Ee}])${Re}{1,2}(?:[${Ee}]|$))`,NO_DOT_SLASH:`(?!${Re}{0,1}(?:[${Ee}]|$))`,NO_DOTS_SLASH:`(?!${Re}{1,2}(?:[${Ee}]|$))`,QMARK_NO_DOT:`[^.${Ee}]`,START_ANCHOR:`(?:^|[${Ee}])`,END_ANCHOR:`(?:[${Ee}]|$)`},ef={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};To.exports={DEFAULT_MAX_EXTGLOB_RECURSION:Vc,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:ef,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:qc.sep,extglobChars(r){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${r.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(r){return r===!0?Zc:Po}}});var lt=b(ae=>{"use strict";var tf=require("path"),rf=process.platform==="win32",{REGEX_BACKSLASH:nf,REGEX_REMOVE_BACKSLASH:sf,REGEX_SPECIAL_CHARS:of,REGEX_SPECIAL_CHARS_GLOBAL:af}=ut();ae.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r);ae.hasRegexChars=r=>of.test(r);ae.isRegexChar=r=>r.length===1&&ae.hasRegexChars(r);ae.escapeRegex=r=>r.replace(af,"\\$1");ae.toPosixSlashes=r=>r.replace(nf,"/");ae.removeBackslashes=r=>r.replace(sf,e=>e==="\\"?"":e);ae.supportsLookbehinds=()=>{let r=process.version.slice(1).split(".").map(Number);return r.length===3&&r[0]>=9||r[0]===8&&r[1]>=10};ae.isWindows=r=>r&&typeof r.windows=="boolean"?r.windows:rf===!0||tf.sep==="\\";ae.escapeLast=(r,e,t)=>{let n=r.lastIndexOf(e,t);return n===-1?r:r[n-1]==="\\"?ae.escapeLast(r,e,n-1):`${r.slice(0,n)}\\${r.slice(n)}`};ae.removePrefix=(r,e={})=>{let t=r;return t.startsWith("./")&&(t=t.slice(2),e.prefix="./"),t};ae.wrapOutput=(r,e={},t={})=>{let n=t.contains?"":"^",i=t.contains?"":"$",s=`${n}(?:${r})${i}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var Do=b((Qm,Fo)=>{"use strict";var ko=lt(),{CHAR_ASTERISK:qr,CHAR_AT:uf,CHAR_BACKWARD_SLASH:ct,CHAR_COMMA:lf,CHAR_DOT:Vr,CHAR_EXCLAMATION_MARK:Wr,CHAR_FORWARD_SLASH:Ho,CHAR_LEFT_CURLY_BRACE:Gr,CHAR_LEFT_PARENTHESES:Ur,CHAR_LEFT_SQUARE_BRACKET:cf,CHAR_PLUS:ff,CHAR_QUESTION_MARK:$o,CHAR_RIGHT_CURLY_BRACE:pf,CHAR_RIGHT_PARENTHESES:Lo,CHAR_RIGHT_SQUARE_BRACKET:hf}=ut(),Mo=r=>r===Ho||r===ct,No=r=>{r.isPrefix!==!0&&(r.depth=r.isGlobstar?1/0:1)},df=(r,e)=>{let t=e||{},n=r.length-1,i=t.parts===!0||t.scanToEnd===!0,s=[],o=[],a=[],l=r,p=-1,u=0,f=0,c=!1,y=!1,g=!1,_=!1,C=!1,w=!1,A=!1,k=!1,q=!1,P=!1,j=0,T,x,N={value:"",depth:0,isGlob:!1},X=()=>p>=n,m=()=>l.charCodeAt(p+1),B=()=>(T=x,l.charCodeAt(++p));for(;p<n;){x=B();let te;if(x===ct){A=N.backslashes=!0,x=B(),x===Gr&&(w=!0);continue}if(w===!0||x===Gr){for(j++;X()!==!0&&(x=B());){if(x===ct){A=N.backslashes=!0,B();continue}if(x===Gr){j++;continue}if(w!==!0&&x===Vr&&(x=B())===Vr){if(c=N.isBrace=!0,g=N.isGlob=!0,P=!0,i===!0)continue;break}if(w!==!0&&x===lf){if(c=N.isBrace=!0,g=N.isGlob=!0,P=!0,i===!0)continue;break}if(x===pf&&(j--,j===0)){w=!1,c=N.isBrace=!0,P=!0;break}}if(i===!0)continue;break}if(x===Ho){if(s.push(p),o.push(N),N={value:"",depth:0,isGlob:!1},P===!0)continue;if(T===Vr&&p===u+1){u+=2;continue}f=p+1;continue}if(t.noext!==!0&&(x===ff||x===uf||x===qr||x===$o||x===Wr)===!0&&m()===Ur){if(g=N.isGlob=!0,_=N.isExtglob=!0,P=!0,x===Wr&&p===u&&(q=!0),i===!0){for(;X()!==!0&&(x=B());){if(x===ct){A=N.backslashes=!0,x=B();continue}if(x===Lo){g=N.isGlob=!0,P=!0;break}}continue}break}if(x===qr){if(T===qr&&(C=N.isGlobstar=!0),g=N.isGlob=!0,P=!0,i===!0)continue;break}if(x===$o){if(g=N.isGlob=!0,P=!0,i===!0)continue;break}if(x===cf){for(;X()!==!0&&(te=B());){if(te===ct){A=N.backslashes=!0,B();continue}if(te===hf){y=N.isBracket=!0,g=N.isGlob=!0,P=!0;break}}if(i===!0)continue;break}if(t.nonegate!==!0&&x===Wr&&p===u){k=N.negated=!0,u++;continue}if(t.noparen!==!0&&x===Ur){if(g=N.isGlob=!0,i===!0){for(;X()!==!0&&(x=B());){if(x===Ur){A=N.backslashes=!0,x=B();continue}if(x===Lo){P=!0;break}}continue}break}if(g===!0){if(P=!0,i===!0)continue;break}}t.noext===!0&&(_=!1,g=!1);let D=l,V="",h="";u>0&&(V=l.slice(0,u),l=l.slice(u),f-=u),D&&g===!0&&f>0?(D=l.slice(0,f),h=l.slice(f)):g===!0?(D="",h=l):D=l,D&&D!==""&&D!=="/"&&D!==l&&Mo(D.charCodeAt(D.length-1))&&(D=D.slice(0,-1)),t.unescape===!0&&(h&&(h=ko.removeBackslashes(h)),D&&A===!0&&(D=ko.removeBackslashes(D)));let d={prefix:V,input:r,start:u,base:D,glob:h,isBrace:c,isBracket:y,isGlob:g,isExtglob:_,isGlobstar:C,negated:k,negatedExtglob:q};if(t.tokens===!0&&(d.maxDepth=0,Mo(x)||o.push(N),d.tokens=o),t.parts===!0||t.tokens===!0){let te;for(let M=0;M<s.length;M++){let ye=te?te+1:u,be=s[M],ue=r.slice(ye,be);t.tokens&&(M===0&&u!==0?(o[M].isPrefix=!0,o[M].value=V):o[M].value=ue,No(o[M]),d.maxDepth+=o[M].depth),(M!==0||ue!=="")&&a.push(ue),te=be}if(te&&te+1<r.length){let M=r.slice(te+1);a.push(M),t.tokens&&(o[o.length-1].value=M,No(o[o.length-1]),d.maxDepth+=o[o.length-1].depth)}d.slashes=s,d.parts=a}return d};Fo.exports=df});var Vo=b((Jm,qo)=>{"use strict";var ft=ut(),ie=lt(),{MAX_LENGTH:Ht,POSIX_REGEX_SOURCE:mf,REGEX_NON_SPECIAL_CHARS:gf,REGEX_SPECIAL_CHARS_BACKREF:_f,REPLACEMENTS:Io}=ft,yf=(r,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...r,e);r.sort();let t=`[${r.join("-")}]`;try{new RegExp(t)}catch{return r.map(i=>ie.escapeRegex(i)).join("..")}return t},Je=(r,e)=>`Missing ${r}: "${e}" - use "\\\\${e}" to match literal characters`,jo=r=>{let e=[],t=0,n=0,i=0,s="",o=!1;for(let a of r){if(o===!0){s+=a,o=!1;continue}if(a==="\\"){s+=a,o=!0;continue}if(a==='"'){i=i===1?0:1,s+=a;continue}if(i===0){if(a==="[")t++;else if(a==="]"&&t>0)t--;else if(t===0){if(a==="(")n++;else if(a===")"&&n>0)n--;else if(a==="|"&&n===0){e.push(s),s="";continue}}}s+=a}return e.push(s),e},bf=r=>{let e=!1;for(let t of r){if(e===!0){e=!1;continue}if(t==="\\"){e=!0;continue}if(/[?*+@!()[\]{}]/.test(t))return!1}return!0},Bo=r=>{let e=r.trim(),t=!0;for(;t===!0;)t=!1,/^@\([^\\()[\]{}|]+\)$/.test(e)&&(e=e.slice(2,-1),t=!0);if(bf(e))return e.replace(/\\(.)/g,"$1")},Sf=r=>{let e=r.map(Bo).filter(Boolean);for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++){let i=e[t],s=e[n],o=i[0];if(!(!o||i!==o.repeat(i.length)||s!==o.repeat(s.length))&&(i===s||i.startsWith(s)||s.startsWith(i)))return!0}return!1},Kr=(r,e=!0)=>{if(r[0]!=="+"&&r[0]!=="*"||r[1]!=="(")return;let t=0,n=0,i=0,s=!1;for(let o=1;o<r.length;o++){let a=r[o];if(s===!0){s=!1;continue}if(a==="\\"){s=!0;continue}if(a==='"'){i=i===1?0:1;continue}if(i!==1){if(a==="["){t++;continue}if(a==="]"&&t>0){t--;continue}if(!(t>0)){if(a==="("){n++;continue}if(a===")"&&(n--,n===0))return e===!0&&o!==r.length-1?void 0:{type:r[0],body:r.slice(2,o),end:o}}}}},vf=r=>{let e=0,t=[];for(;e<r.length;){let i=Kr(r.slice(e),!1);if(!i||i.type!=="*")return;let s=jo(i.body).map(a=>a.trim());if(s.length!==1)return;let o=Bo(s[0]);if(!o||o.length!==1)return;t.push(o),e+=i.end+1}return t.length<1?void 0:`${t.length===1?ie.escapeRegex(t[0]):`[${t.map(i=>ie.escapeRegex(i)).join("")}]`}*`},Ef=r=>{let e=0,t=r.trim(),n=Kr(t);for(;n;)e++,t=n.body.trim(),n=Kr(t);return e},Af=(r,e)=>{if(e.maxExtglobRecursion===!1)return{risky:!1};let t=typeof e.maxExtglobRecursion=="number"?e.maxExtglobRecursion:ft.DEFAULT_MAX_EXTGLOB_RECURSION,n=jo(r).map(i=>i.trim());if(n.length>1&&(n.some(i=>i==="")||n.some(i=>/^[*?]+$/.test(i))||Sf(n)))return{risky:!0};for(let i of n){let s=vf(i);if(s)return{risky:!0,safeOutput:s};if(Ef(i)>t)return{risky:!0}}return{risky:!1}},Yr=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");r=Io[r]||r;let t={...e},n=typeof t.maxLength=="number"?Math.min(Ht,t.maxLength):Ht,i=r.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:t.prepend||""},o=[s],a=t.capture?"":"?:",l=ie.isWindows(e),p=ft.globChars(l),u=ft.extglobChars(p),{DOT_LITERAL:f,PLUS_LITERAL:c,SLASH_LITERAL:y,ONE_CHAR:g,DOTS_SLASH:_,NO_DOT:C,NO_DOT_SLASH:w,NO_DOTS_SLASH:A,QMARK:k,QMARK_NO_DOT:q,STAR:P,START_ANCHOR:j}=p,T=v=>`(${a}(?:(?!${j}${v.dot?_:f}).)*?)`,x=t.dot?"":C,N=t.dot?k:q,X=t.bash===!0?T(t):P;t.capture&&(X=`(${X})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);let m={input:r,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};r=ie.removePrefix(r,m),i=r.length;let B=[],D=[],V=[],h=s,d,te=()=>m.index===i-1,M=m.peek=(v=1)=>r[m.index+v],ye=m.advance=()=>r[++m.index]||"",be=()=>r.slice(m.index+1),ue=(v="",K=0)=>{m.consumed+=v,m.index+=K},dt=v=>{m.output+=v.output!=null?v.output:v.value,ue(v.value)},Lu=()=>{let v=1;for(;M()==="!"&&(M(2)!=="("||M(3)==="?");)ye(),m.start++,v++;return v%2===0?!1:(m.negated=!0,m.start++,!0)},mt=v=>{m[v]++,V.push(v)},Te=v=>{m[v]--,V.pop()},L=v=>{if(h.type==="globstar"){let K=m.braces>0&&(v.type==="comma"||v.type==="brace"),S=v.extglob===!0||B.length&&(v.type==="pipe"||v.type==="paren");v.type!=="slash"&&v.type!=="paren"&&!K&&!S&&(m.output=m.output.slice(0,-h.output.length),h.type="star",h.value="*",h.output=X,m.output+=h.output)}if(B.length&&v.type!=="paren"&&(B[B.length-1].inner+=v.value),(v.value||v.output)&&dt(v),h&&h.type==="text"&&v.type==="text"){h.value+=v.value,h.output=(h.output||"")+v.value;return}v.prev=h,o.push(v),h=v},gt=(v,K)=>{let S={...u[K],conditions:1,inner:""};S.prev=h,S.parens=m.parens,S.output=m.output,S.startIndex=m.index,S.tokensIndex=o.length;let $=(t.capture?"(":"")+S.open;mt("parens"),L({type:v,value:K,output:m.output?"":g}),L({type:"paren",extglob:!0,value:ye(),output:$}),B.push(S)},Mu=v=>{let K=r.slice(v.startIndex,m.index+1),S=r.slice(v.startIndex+2,m.index),$=Af(S,t);if((v.type==="plus"||v.type==="star")&&$.risky){let W=$.safeOutput?(v.output?"":g)+(t.capture?`(${$.safeOutput})`:$.safeOutput):void 0,Se=o[v.tokensIndex];Se.type="text",Se.value=K,Se.output=W||ie.escapeRegex(K);for(let ve=v.tokensIndex+1;ve<o.length;ve++)o[ve].value="",o[ve].output="",delete o[ve].suffix;m.output=v.output+Se.output,m.backtrack=!0,L({type:"paren",extglob:!0,value:d,output:""}),Te("parens");return}let G=v.close+(t.capture?")":""),Z;if(v.type==="negate"){let W=X;if(v.inner&&v.inner.length>1&&v.inner.includes("/")&&(W=T(t)),(W!==X||te()||/^\)+$/.test(be()))&&(G=v.close=`)$))${W}`),v.inner.includes("*")&&(Z=be())&&/^\.[^\\/.]+$/.test(Z)){let Se=Yr(Z,{...e,fastpaths:!1}).output;G=v.close=`)${Se})${W})`}v.prev.type==="bos"&&(m.negatedExtglob=!0)}L({type:"paren",extglob:!0,value:d,output:G}),Te("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(r)){let v=!1,K=r.replace(_f,(S,$,G,Z,W,Se)=>Z==="\\"?(v=!0,S):Z==="?"?$?$+Z+(W?k.repeat(W.length):""):Se===0?N+(W?k.repeat(W.length):""):k.repeat(G.length):Z==="."?f.repeat(G.length):Z==="*"?$?$+Z+(W?X:""):X:$?S:`\\${S}`);return v===!0&&(t.unescape===!0?K=K.replace(/\\/g,""):K=K.replace(/\\+/g,S=>S.length%2===0?"\\\\":S?"\\":"")),K===r&&t.contains===!0?(m.output=r,m):(m.output=ie.wrapOutput(K,m,e),m)}for(;!te();){if(d=ye(),d==="\0")continue;if(d==="\\"){let S=M();if(S==="/"&&t.bash!==!0||S==="."||S===";")continue;if(!S){d+="\\",L({type:"text",value:d});continue}let $=/^\\+/.exec(be()),G=0;if($&&$[0].length>2&&(G=$[0].length,m.index+=G,G%2!==0&&(d+="\\")),t.unescape===!0?d=ye():d+=ye(),m.brackets===0){L({type:"text",value:d});continue}}if(m.brackets>0&&(d!=="]"||h.value==="["||h.value==="[^")){if(t.posix!==!1&&d===":"){let S=h.value.slice(1);if(S.includes("[")&&(h.posix=!0,S.includes(":"))){let $=h.value.lastIndexOf("["),G=h.value.slice(0,$),Z=h.value.slice($+2),W=mf[Z];if(W){h.value=G+W,m.backtrack=!0,ye(),!s.output&&o.indexOf(h)===1&&(s.output=g);continue}}}(d==="["&&M()!==":"||d==="-"&&M()==="]")&&(d=`\\${d}`),d==="]"&&(h.value==="["||h.value==="[^")&&(d=`\\${d}`),t.posix===!0&&d==="!"&&h.value==="["&&(d="^"),h.value+=d,dt({value:d});continue}if(m.quotes===1&&d!=='"'){d=ie.escapeRegex(d),h.value+=d,dt({value:d});continue}if(d==='"'){m.quotes=m.quotes===1?0:1,t.keepQuotes===!0&&L({type:"text",value:d});continue}if(d==="("){mt("parens"),L({type:"paren",value:d});continue}if(d===")"){if(m.parens===0&&t.strictBrackets===!0)throw new SyntaxError(Je("opening","("));let S=B[B.length-1];if(S&&m.parens===S.parens+1){Mu(B.pop());continue}L({type:"paren",value:d,output:m.parens?")":"\\)"}),Te("parens");continue}if(d==="["){if(t.nobracket===!0||!be().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(Je("closing","]"));d=`\\${d}`}else mt("brackets");L({type:"bracket",value:d});continue}if(d==="]"){if(t.nobracket===!0||h&&h.type==="bracket"&&h.value.length===1){L({type:"text",value:d,output:`\\${d}`});continue}if(m.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(Je("opening","["));L({type:"text",value:d,output:`\\${d}`});continue}Te("brackets");let S=h.value.slice(1);if(h.posix!==!0&&S[0]==="^"&&!S.includes("/")&&(d=`/${d}`),h.value+=d,dt({value:d}),t.literalBrackets===!1||ie.hasRegexChars(S))continue;let $=ie.escapeRegex(h.value);if(m.output=m.output.slice(0,-h.value.length),t.literalBrackets===!0){m.output+=$,h.value=$;continue}h.value=`(${a}${$}|${h.value})`,m.output+=h.value;continue}if(d==="{"&&t.nobrace!==!0){mt("braces");let S={type:"brace",value:d,output:"(",outputIndex:m.output.length,tokensIndex:m.tokens.length};D.push(S),L(S);continue}if(d==="}"){let S=D[D.length-1];if(t.nobrace===!0||!S){L({type:"text",value:d,output:d});continue}let $=")";if(S.dots===!0){let G=o.slice(),Z=[];for(let W=G.length-1;W>=0&&(o.pop(),G[W].type!=="brace");W--)G[W].type!=="dots"&&Z.unshift(G[W].value);$=yf(Z,t),m.backtrack=!0}if(S.comma!==!0&&S.dots!==!0){let G=m.output.slice(0,S.outputIndex),Z=m.tokens.slice(S.tokensIndex);S.value=S.output="\\{",d=$="\\}",m.output=G;for(let W of Z)m.output+=W.output||W.value}L({type:"brace",value:d,output:$}),Te("braces"),D.pop();continue}if(d==="|"){B.length>0&&B[B.length-1].conditions++,L({type:"text",value:d});continue}if(d===","){let S=d,$=D[D.length-1];$&&V[V.length-1]==="braces"&&($.comma=!0,S="|"),L({type:"comma",value:d,output:S});continue}if(d==="/"){if(h.type==="dot"&&m.index===m.start+1){m.start=m.index+1,m.consumed="",m.output="",o.pop(),h=s;continue}L({type:"slash",value:d,output:y});continue}if(d==="."){if(m.braces>0&&h.type==="dot"){h.value==="."&&(h.output=f);let S=D[D.length-1];h.type="dots",h.output+=d,h.value+=d,S.dots=!0;continue}if(m.braces+m.parens===0&&h.type!=="bos"&&h.type!=="slash"){L({type:"text",value:d,output:f});continue}L({type:"dot",value:d,output:f});continue}if(d==="?"){if(!(h&&h.value==="(")&&t.noextglob!==!0&&M()==="("&&M(2)!=="?"){gt("qmark",d);continue}if(h&&h.type==="paren"){let $=M(),G=d;if($==="<"&&!ie.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(h.value==="("&&!/[!=<:]/.test($)||$==="<"&&!/<([!=]|\w+>)/.test(be()))&&(G=`\\${d}`),L({type:"text",value:d,output:G});continue}if(t.dot!==!0&&(h.type==="slash"||h.type==="bos")){L({type:"qmark",value:d,output:q});continue}L({type:"qmark",value:d,output:k});continue}if(d==="!"){if(t.noextglob!==!0&&M()==="("&&(M(2)!=="?"||!/[!=<:]/.test(M(3)))){gt("negate",d);continue}if(t.nonegate!==!0&&m.index===0){Lu();continue}}if(d==="+"){if(t.noextglob!==!0&&M()==="("&&M(2)!=="?"){gt("plus",d);continue}if(h&&h.value==="("||t.regex===!1){L({type:"plus",value:d,output:c});continue}if(h&&(h.type==="bracket"||h.type==="paren"||h.type==="brace")||m.parens>0){L({type:"plus",value:d});continue}L({type:"plus",value:c});continue}if(d==="@"){if(t.noextglob!==!0&&M()==="("&&M(2)!=="?"){L({type:"at",extglob:!0,value:d,output:""});continue}L({type:"text",value:d});continue}if(d!=="*"){(d==="$"||d==="^")&&(d=`\\${d}`);let S=gf.exec(be());S&&(d+=S[0],m.index+=S[0].length),L({type:"text",value:d});continue}if(h&&(h.type==="globstar"||h.star===!0)){h.type="star",h.star=!0,h.value+=d,h.output=X,m.backtrack=!0,m.globstar=!0,ue(d);continue}let v=be();if(t.noextglob!==!0&&/^\([^?]/.test(v)){gt("star",d);continue}if(h.type==="star"){if(t.noglobstar===!0){ue(d);continue}let S=h.prev,$=S.prev,G=S.type==="slash"||S.type==="bos",Z=$&&($.type==="star"||$.type==="globstar");if(t.bash===!0&&(!G||v[0]&&v[0]!=="/")){L({type:"star",value:d,output:""});continue}let W=m.braces>0&&(S.type==="comma"||S.type==="brace"),Se=B.length&&(S.type==="pipe"||S.type==="paren");if(!G&&S.type!=="paren"&&!W&&!Se){L({type:"star",value:d,output:""});continue}for(;v.slice(0,3)==="/**";){let ve=r[m.index+4];if(ve&&ve!=="/")break;v=v.slice(3),ue("/**",3)}if(S.type==="bos"&&te()){h.type="globstar",h.value+=d,h.output=T(t),m.output=h.output,m.globstar=!0,ue(d);continue}if(S.type==="slash"&&S.prev.type!=="bos"&&!Z&&te()){m.output=m.output.slice(0,-(S.output+h.output).length),S.output=`(?:${S.output}`,h.type="globstar",h.output=T(t)+(t.strictSlashes?")":"|$)"),h.value+=d,m.globstar=!0,m.output+=S.output+h.output,ue(d);continue}if(S.type==="slash"&&S.prev.type!=="bos"&&v[0]==="/"){let ve=v[1]!==void 0?"|$":"";m.output=m.output.slice(0,-(S.output+h.output).length),S.output=`(?:${S.output}`,h.type="globstar",h.output=`${T(t)}${y}|${y}${ve})`,h.value+=d,m.output+=S.output+h.output,m.globstar=!0,ue(d+ye()),L({type:"slash",value:"/",output:""});continue}if(S.type==="bos"&&v[0]==="/"){h.type="globstar",h.value+=d,h.output=`(?:^|${y}|${T(t)}${y})`,m.output=h.output,m.globstar=!0,ue(d+ye()),L({type:"slash",value:"/",output:""});continue}m.output=m.output.slice(0,-h.output.length),h.type="globstar",h.output=T(t),h.value+=d,m.output+=h.output,m.globstar=!0,ue(d);continue}let K={type:"star",value:d,output:X};if(t.bash===!0){K.output=".*?",(h.type==="bos"||h.type==="slash")&&(K.output=x+K.output),L(K);continue}if(h&&(h.type==="bracket"||h.type==="paren")&&t.regex===!0){K.output=d,L(K);continue}(m.index===m.start||h.type==="slash"||h.type==="dot")&&(h.type==="dot"?(m.output+=w,h.output+=w):t.dot===!0?(m.output+=A,h.output+=A):(m.output+=x,h.output+=x),M()!=="*"&&(m.output+=g,h.output+=g)),L(K)}for(;m.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(Je("closing","]"));m.output=ie.escapeLast(m.output,"["),Te("brackets")}for(;m.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(Je("closing",")"));m.output=ie.escapeLast(m.output,"("),Te("parens")}for(;m.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(Je("closing","}"));m.output=ie.escapeLast(m.output,"{"),Te("braces")}if(t.strictSlashes!==!0&&(h.type==="star"||h.type==="bracket")&&L({type:"maybe_slash",value:"",output:`${y}?`}),m.backtrack===!0){m.output="";for(let v of m.tokens)m.output+=v.output!=null?v.output:v.value,v.suffix&&(m.output+=v.suffix)}return m};Yr.fastpaths=(r,e)=>{let t={...e},n=typeof t.maxLength=="number"?Math.min(Ht,t.maxLength):Ht,i=r.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);r=Io[r]||r;let s=ie.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:l,DOTS_SLASH:p,NO_DOT:u,NO_DOTS:f,NO_DOTS_SLASH:c,STAR:y,START_ANCHOR:g}=ft.globChars(s),_=t.dot?f:u,C=t.dot?c:u,w=t.capture?"":"?:",A={negated:!1,prefix:""},k=t.bash===!0?".*?":y;t.capture&&(k=`(${k})`);let q=x=>x.noglobstar===!0?k:`(${w}(?:(?!${g}${x.dot?p:o}).)*?)`,P=x=>{switch(x){case"*":return`${_}${l}${k}`;case".*":return`${o}${l}${k}`;case"*.*":return`${_}${k}${o}${l}${k}`;case"*/*":return`${_}${k}${a}${l}${C}${k}`;case"**":return _+q(t);case"**/*":return`(?:${_}${q(t)}${a})?${C}${l}${k}`;case"**/*.*":return`(?:${_}${q(t)}${a})?${C}${k}${o}${l}${k}`;case"**/.*":return`(?:${_}${q(t)}${a})?${o}${l}${k}`;default:{let N=/^(.*?)\.(\w+)$/.exec(x);if(!N)return;let X=P(N[1]);return X?X+o+N[2]:void 0}}},j=ie.removePrefix(r,A),T=P(j);return T&&t.strictSlashes!==!0&&(T+=`${a}?`),T};qo.exports=Yr});var Go=b((Xm,Wo)=>{"use strict";var Cf=require("path"),Of=Do(),Qr=Vo(),Jr=lt(),xf=ut(),Rf=r=>r&&typeof r=="object"&&!Array.isArray(r),J=(r,e,t=!1)=>{if(Array.isArray(r)){let u=r.map(c=>J(c,e,t));return c=>{for(let y of u){let g=y(c);if(g)return g}return!1}}let n=Rf(r)&&r.tokens&&r.input;if(r===""||typeof r!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},s=Jr.isWindows(e),o=n?J.compileRe(r,e):J.makeRe(r,e,!1,!0),a=o.state;delete o.state;let l=()=>!1;if(i.ignore){let u={...e,ignore:null,onMatch:null,onResult:null};l=J(i.ignore,u,t)}let p=(u,f=!1)=>{let{isMatch:c,match:y,output:g}=J.test(u,o,e,{glob:r,posix:s}),_={glob:r,state:a,regex:o,posix:s,input:u,output:g,match:y,isMatch:c};return typeof i.onResult=="function"&&i.onResult(_),c===!1?(_.isMatch=!1,f?_:!1):l(u)?(typeof i.onIgnore=="function"&&i.onIgnore(_),_.isMatch=!1,f?_:!1):(typeof i.onMatch=="function"&&i.onMatch(_),f?_:!0)};return t&&(p.state=a),p};J.test=(r,e,t,{glob:n,posix:i}={})=>{if(typeof r!="string")throw new TypeError("Expected input to be a string");if(r==="")return{isMatch:!1,output:""};let s=t||{},o=s.format||(i?Jr.toPosixSlashes:null),a=r===n,l=a&&o?o(r):r;return a===!1&&(l=o?o(r):r,a=l===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=J.matchBase(r,e,t,i):a=e.exec(l)),{isMatch:!!a,match:a,output:l}};J.matchBase=(r,e,t,n=Jr.isWindows(t))=>(e instanceof RegExp?e:J.makeRe(e,t)).test(Cf.basename(r));J.isMatch=(r,e,t)=>J(e,t)(r);J.parse=(r,e)=>Array.isArray(r)?r.map(t=>J.parse(t,e)):Qr(r,{...e,fastpaths:!1});J.scan=(r,e)=>Of(r,e);J.compileRe=(r,e,t=!1,n=!1)=>{if(t===!0)return r.output;let i=e||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${r.output})${o}`;r&&r.negated===!0&&(a=`^(?!${a}).*$`);let l=J.toRegex(a,e);return n===!0&&(l.state=r),l};J.makeRe=(r,e={},t=!1,n=!1)=>{if(!r||typeof r!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(r[0]==="."||r[0]==="*")&&(i.output=Qr.fastpaths(r,e)),i.output||(i=Qr(r,e)),J.compileRe(i,e,t,n)};J.toRegex=(r,e)=>{try{let t=e||{};return new RegExp(r,t.flags||(t.nocase?"i":""))}catch(t){if(e&&e.debug===!0)throw t;return/$^/}};J.constants=xf;Wo.exports=J});var Ko=b((zm,Uo)=>{"use strict";Uo.exports=Go()});var Zo=b((Zm,zo)=>{"use strict";var Qo=require("util"),Jo=Oo(),Ae=Ko(),Xr=lt(),Yo=r=>r===""||r==="./",Xo=r=>{let e=r.indexOf("{");return e>-1&&r.indexOf("}",e)>-1},U=(r,e,t)=>{e=[].concat(e),r=[].concat(r);let n=new Set,i=new Set,s=new Set,o=0,a=u=>{s.add(u.output),t&&t.onResult&&t.onResult(u)};for(let u=0;u<e.length;u++){let f=Ae(String(e[u]),{...t,onResult:a},!0),c=f.state.negated||f.state.negatedExtglob;c&&o++;for(let y of r){let g=f(y,!0);(c?!g.isMatch:g.isMatch)&&(c?n.add(g.output):(n.delete(g.output),i.add(g.output)))}}let p=(o===e.length?[...s]:[...i]).filter(u=>!n.has(u));if(t&&p.length===0){if(t.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(t.nonull===!0||t.nullglob===!0)return t.unescape?e.map(u=>u.replace(/\\/g,"")):e}return p};U.match=U;U.matcher=(r,e)=>Ae(r,e);U.isMatch=(r,e,t)=>Ae(e,t)(r);U.any=U.isMatch;U.not=(r,e,t={})=>{e=[].concat(e).map(String);let n=new Set,i=[],s=a=>{t.onResult&&t.onResult(a),i.push(a.output)},o=new Set(U(r,e,{...t,onResult:s}));for(let a of i)o.has(a)||n.add(a);return[...n]};U.contains=(r,e,t)=>{if(typeof r!="string")throw new TypeError(`Expected a string: "${Qo.inspect(r)}"`);if(Array.isArray(e))return e.some(n=>U.contains(r,n,t));if(typeof e=="string"){if(Yo(r)||Yo(e))return!1;if(r.includes(e)||r.startsWith("./")&&r.slice(2).includes(e))return!0}return U.isMatch(r,e,{...t,contains:!0})};U.matchKeys=(r,e,t)=>{if(!Xr.isObject(r))throw new TypeError("Expected the first argument to be an object");let n=U(Object.keys(r),e,t),i={};for(let s of n)i[s]=r[s];return i};U.some=(r,e,t)=>{let n=[].concat(r);for(let i of[].concat(e)){let s=Ae(String(i),t);if(n.some(o=>s(o)))return!0}return!1};U.every=(r,e,t)=>{let n=[].concat(r);for(let i of[].concat(e)){let s=Ae(String(i),t);if(!n.every(o=>s(o)))return!1}return!0};U.all=(r,e,t)=>{if(typeof r!="string")throw new TypeError(`Expected a string: "${Qo.inspect(r)}"`);return[].concat(e).every(n=>Ae(n,t)(r))};U.capture=(r,e,t)=>{let n=Xr.isWindows(t),s=Ae.makeRe(String(r),{...t,capture:!0}).exec(n?Xr.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};U.makeRe=(...r)=>Ae.makeRe(...r);U.scan=(...r)=>Ae.scan(...r);U.parse=(r,e)=>{let t=[];for(let n of[].concat(r||[]))for(let i of Jo(String(n),e))t.push(Ae.parse(i,e));return t};U.braces=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!Xo(r)?[r]:Jo(r,e)};U.braceExpand=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");return U.braces(r,{...e,expand:!0})};U.hasBraces=Xo;zo.exports=U});var la=b(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.isAbsolute=O.partitionAbsoluteAndRelative=O.removeDuplicateSlashes=O.matchAny=O.convertPatternsToRe=O.makeRe=O.getPatternParts=O.expandBraceExpansion=O.expandPatternsWithBraceExpansion=O.isAffectDepthOfReadingPattern=O.endsWithSlashGlobStar=O.hasGlobStar=O.getBaseDirectory=O.isPatternRelatedToParentDirectory=O.getPatternsOutsideCurrentDirectory=O.getPatternsInsideCurrentDirectory=O.getPositivePatterns=O.getNegativePatterns=O.isPositivePattern=O.isNegativePattern=O.convertToNegativePattern=O.convertToPositivePattern=O.isDynamicPattern=O.isStaticPattern=void 0;var ea=require("path"),wf=qs(),zr=Zo(),ta="**",Pf="\\",Tf=/[*?]|^!/,kf=/\[[^[]*]/,$f=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,Lf=/[!*+?@]\([^(]*\)/,Mf=/,|\.\./,Nf=/(?!^)\/{2,}/g;function ra(r,e={}){return!na(r,e)}O.isStaticPattern=ra;function na(r,e={}){return r===""?!1:!!(e.caseSensitiveMatch===!1||r.includes(Pf)||Tf.test(r)||kf.test(r)||$f.test(r)||e.extglob!==!1&&Lf.test(r)||e.braceExpansion!==!1&&Hf(r))}O.isDynamicPattern=na;function Hf(r){let e=r.indexOf("{");if(e===-1)return!1;let t=r.indexOf("}",e+1);if(t===-1)return!1;let n=r.slice(e,t);return Mf.test(n)}function Ff(r){return Ft(r)?r.slice(1):r}O.convertToPositivePattern=Ff;function Df(r){return"!"+r}O.convertToNegativePattern=Df;function Ft(r){return r.startsWith("!")&&r[1]!=="("}O.isNegativePattern=Ft;function ia(r){return!Ft(r)}O.isPositivePattern=ia;function If(r){return r.filter(Ft)}O.getNegativePatterns=If;function jf(r){return r.filter(ia)}O.getPositivePatterns=jf;function Bf(r){return r.filter(e=>!Zr(e))}O.getPatternsInsideCurrentDirectory=Bf;function qf(r){return r.filter(Zr)}O.getPatternsOutsideCurrentDirectory=qf;function Zr(r){return r.startsWith("..")||r.startsWith("./..")}O.isPatternRelatedToParentDirectory=Zr;function Vf(r){return wf(r,{flipBackslashes:!1})}O.getBaseDirectory=Vf;function Wf(r){return r.includes(ta)}O.hasGlobStar=Wf;function sa(r){return r.endsWith("/"+ta)}O.endsWithSlashGlobStar=sa;function Gf(r){let e=ea.basename(r);return sa(r)||ra(e)}O.isAffectDepthOfReadingPattern=Gf;function Uf(r){return r.reduce((e,t)=>e.concat(oa(t)),[])}O.expandPatternsWithBraceExpansion=Uf;function oa(r){let e=zr.braces(r,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((t,n)=>t.length-n.length),e.filter(t=>t!=="")}O.expandBraceExpansion=oa;function Kf(r,e){let{parts:t}=zr.scan(r,Object.assign(Object.assign({},e),{parts:!0}));return t.length===0&&(t=[r]),t[0].startsWith("/")&&(t[0]=t[0].slice(1),t.unshift("")),t}O.getPatternParts=Kf;function aa(r,e){return zr.makeRe(r,e)}O.makeRe=aa;function Yf(r,e){return r.map(t=>aa(t,e))}O.convertPatternsToRe=Yf;function Qf(r,e){return e.some(t=>t.test(r))}O.matchAny=Qf;function Jf(r){return r.replace(Nf,"/")}O.removeDuplicateSlashes=Jf;function Xf(r){let e=[],t=[];for(let n of r)ua(n)?e.push(n):t.push(n);return[e,t]}O.partitionAbsoluteAndRelative=Xf;function ua(r){return ea.isAbsolute(r)}O.isAbsolute=ua});var ha=b((tg,pa)=>{"use strict";var zf=require("stream"),ca=zf.PassThrough,Zf=Array.prototype.slice;pa.exports=ep;function ep(){let r=[],e=Zf.call(arguments),t=!1,n=e[e.length-1];n&&!Array.isArray(n)&&n.pipe==null?e.pop():n={};let i=n.end!==!1,s=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let o=ca(n);function a(){for(let u=0,f=arguments.length;u<f;u++)r.push(fa(arguments[u],n));return l(),this}function l(){if(t)return;t=!0;let u=r.shift();if(!u){process.nextTick(p);return}Array.isArray(u)||(u=[u]);let f=u.length+1;function c(){--f>0||(t=!1,l())}function y(g){function _(){g.removeListener("merge2UnpipeEnd",_),g.removeListener("end",_),s&&g.removeListener("error",C),c()}function C(w){o.emit("error",w)}if(g._readableState.endEmitted)return c();g.on("merge2UnpipeEnd",_),g.on("end",_),s&&g.on("error",C),g.pipe(o,{end:!1}),g.resume()}for(let g=0;g<u.length;g++)y(u[g]);c()}function p(){t=!1,o.emit("queueDrain"),i&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(u){u.emit("merge2UnpipeEnd")}),e.length&&a.apply(null,e),o}function fa(r,e){if(Array.isArray(r))for(let t=0,n=r.length;t<n;t++)r[t]=fa(r[t],e);else{if(!r._readableState&&r.pipe&&(r=r.pipe(ca(e))),!r._readableState||!r.pause||!r.pipe)throw new Error("Only readable stream can be merged.");r.pause()}return r}});var ma=b(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.merge=void 0;var tp=ha();function rp(r){let e=tp(r);return r.forEach(t=>{t.once("error",n=>e.emit("error",n))}),e.once("close",()=>da(r)),e.once("end",()=>da(r)),e}Dt.merge=rp;function da(r){r.forEach(e=>e.emit("close"))}});var ga=b(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.isEmpty=Xe.isString=void 0;function np(r){return typeof r=="string"}Xe.isString=np;function ip(r){return r===""}Xe.isEmpty=ip});var we=b(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.string=se.stream=se.pattern=se.path=se.fs=se.errno=se.array=void 0;var sp=Ps();se.array=sp;var op=Ts();se.errno=op;var ap=ks();se.fs=ap;var up=Ns();se.path=up;var lp=la();se.pattern=lp;var cp=ma();se.stream=cp;var fp=ga();se.string=fp});var Sa=b(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.convertPatternGroupToTask=oe.convertPatternGroupsToTasks=oe.groupPatternsByBaseDirectory=oe.getNegativePatternsAsPositive=oe.getPositivePatterns=oe.convertPatternsToTasks=oe.generate=void 0;var ge=we();function pp(r,e){let t=_a(r,e),n=_a(e.ignore,e),i=ya(t),s=ba(t,n),o=i.filter(u=>ge.pattern.isStaticPattern(u,e)),a=i.filter(u=>ge.pattern.isDynamicPattern(u,e)),l=en(o,s,!1),p=en(a,s,!0);return l.concat(p)}oe.generate=pp;function _a(r,e){let t=r;return e.braceExpansion&&(t=ge.pattern.expandPatternsWithBraceExpansion(t)),e.baseNameMatch&&(t=t.map(n=>n.includes("/")?n:`**/${n}`)),t.map(n=>ge.pattern.removeDuplicateSlashes(n))}function en(r,e,t){let n=[],i=ge.pattern.getPatternsOutsideCurrentDirectory(r),s=ge.pattern.getPatternsInsideCurrentDirectory(r),o=tn(i),a=tn(s);return n.push(...rn(o,e,t)),"."in a?n.push(nn(".",s,e,t)):n.push(...rn(a,e,t)),n}oe.convertPatternsToTasks=en;function ya(r){return ge.pattern.getPositivePatterns(r)}oe.getPositivePatterns=ya;function ba(r,e){return ge.pattern.getNegativePatterns(r).concat(e).map(ge.pattern.convertToPositivePattern)}oe.getNegativePatternsAsPositive=ba;function tn(r){let e={};return r.reduce((t,n)=>{let i=ge.pattern.getBaseDirectory(n);return i in t?t[i].push(n):t[i]=[n],t},e)}oe.groupPatternsByBaseDirectory=tn;function rn(r,e,t){return Object.keys(r).map(n=>nn(n,r[n],e,t))}oe.convertPatternGroupsToTasks=rn;function nn(r,e,t,n){return{dynamic:n,positive:e,negative:t,base:r,patterns:[].concat(e,t.map(ge.pattern.convertToNegativePattern))}}oe.convertPatternGroupToTask=nn});var Ea=b(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.read=void 0;function hp(r,e,t){e.fs.lstat(r,(n,i)=>{if(n!==null){va(t,n);return}if(!i.isSymbolicLink()||!e.followSymbolicLink){sn(t,i);return}e.fs.stat(r,(s,o)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){va(t,s);return}sn(t,i);return}e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),sn(t,o)})})}It.read=hp;function va(r,e){r(e)}function sn(r,e){r(null,e)}});var Aa=b(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.read=void 0;function dp(r,e){let t=e.fs.lstatSync(r);if(!t.isSymbolicLink()||!e.followSymbolicLink)return t;try{let n=e.fs.statSync(r);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!e.throwErrorOnBrokenSymbolicLink)return t;throw n}}jt.read=dp});var Ca=b(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.createFileSystemAdapter=Me.FILE_SYSTEM_ADAPTER=void 0;var Bt=require("fs");Me.FILE_SYSTEM_ADAPTER={lstat:Bt.lstat,stat:Bt.stat,lstatSync:Bt.lstatSync,statSync:Bt.statSync};function mp(r){return r===void 0?Me.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Me.FILE_SYSTEM_ADAPTER),r)}Me.createFileSystemAdapter=mp});var Oa=b(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});var gp=Ca(),on=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=gp.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return e??t}};an.default=on});var Ve=b(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.statSync=Ne.stat=Ne.Settings=void 0;var xa=Ea(),_p=Aa(),un=Oa();Ne.Settings=un.default;function yp(r,e,t){if(typeof e=="function"){xa.read(r,ln(),e);return}xa.read(r,ln(e),t)}Ne.stat=yp;function bp(r,e){let t=ln(e);return _p.read(r,t)}Ne.statSync=bp;function ln(r={}){return r instanceof un.default?r:new un.default(r)}});var Pa=b((fg,wa)=>{var Ra;wa.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):r=>(Ra||(Ra=Promise.resolve())).then(r).catch(e=>setTimeout(()=>{throw e},0))});var ka=b((pg,Ta)=>{Ta.exports=vp;var Sp=Pa();function vp(r,e){let t,n,i,s=!0;Array.isArray(r)?(t=[],n=r.length):(i=Object.keys(r),t={},n=i.length);function o(l){function p(){e&&e(l,t),e=null}s?Sp(p):p()}function a(l,p,u){t[l]=u,(--n===0||p)&&o(p)}n?i?i.forEach(function(l){r[l](function(p,u){a(l,p,u)})}):r.forEach(function(l,p){l(function(u,f){a(p,u,f)})}):o(null),s=!1}});var cn=b(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var qt=process.versions.node.split(".");if(qt[0]===void 0||qt[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var $a=Number.parseInt(qt[0],10),Ep=Number.parseInt(qt[1],10),La=10,Ap=10,Cp=$a>La,Op=$a===La&&Ep>=Ap;Vt.IS_SUPPORT_READDIR_WITH_FILE_TYPES=Cp||Op});var Ma=b(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.createDirentFromStats=void 0;var fn=class{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}};function xp(r,e){return new fn(r,e)}Wt.createDirentFromStats=xp});var pn=b(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.fs=void 0;var Rp=Ma();Gt.fs=Rp});var hn=b(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.joinPathSegments=void 0;function wp(r,e,t){return r.endsWith(t)?r+e:r+t+e}Ut.joinPathSegments=wp});var ja=b(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.readdir=He.readdirWithFileTypes=He.read=void 0;var Pp=Ve(),Na=ka(),Tp=cn(),Ha=pn(),Fa=hn();function kp(r,e,t){if(!e.stats&&Tp.IS_SUPPORT_READDIR_WITH_FILE_TYPES){Da(r,e,t);return}Ia(r,e,t)}He.read=kp;function Da(r,e,t){e.fs.readdir(r,{withFileTypes:!0},(n,i)=>{if(n!==null){Kt(t,n);return}let s=i.map(a=>({dirent:a,name:a.name,path:Fa.joinPathSegments(r,a.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){dn(t,s);return}let o=s.map(a=>$p(a,e));Na(o,(a,l)=>{if(a!==null){Kt(t,a);return}dn(t,l)})})}He.readdirWithFileTypes=Da;function $p(r,e){return t=>{if(!r.dirent.isSymbolicLink()){t(null,r);return}e.fs.stat(r.path,(n,i)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){t(n);return}t(null,r);return}r.dirent=Ha.fs.createDirentFromStats(r.name,i),t(null,r)})}}function Ia(r,e,t){e.fs.readdir(r,(n,i)=>{if(n!==null){Kt(t,n);return}let s=i.map(o=>{let a=Fa.joinPathSegments(r,o,e.pathSegmentSeparator);return l=>{Pp.stat(a,e.fsStatSettings,(p,u)=>{if(p!==null){l(p);return}let f={name:o,path:a,dirent:Ha.fs.createDirentFromStats(o,u)};e.stats&&(f.stats=u),l(null,f)})}});Na(s,(o,a)=>{if(o!==null){Kt(t,o);return}dn(t,a)})})}He.readdir=Ia;function Kt(r,e){r(e)}function dn(r,e){r(null,e)}});var Ga=b(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.readdir=Fe.readdirWithFileTypes=Fe.read=void 0;var Lp=Ve(),Mp=cn(),Ba=pn(),qa=hn();function Np(r,e){return!e.stats&&Mp.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Va(r,e):Wa(r,e)}Fe.read=Np;function Va(r,e){return e.fs.readdirSync(r,{withFileTypes:!0}).map(n=>{let i={dirent:n,name:n.name,path:qa.joinPathSegments(r,n.name,e.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let s=e.fs.statSync(i.path);i.dirent=Ba.fs.createDirentFromStats(i.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return i})}Fe.readdirWithFileTypes=Va;function Wa(r,e){return e.fs.readdirSync(r).map(n=>{let i=qa.joinPathSegments(r,n,e.pathSegmentSeparator),s=Lp.statSync(i,e.fsStatSettings),o={name:n,path:i,dirent:Ba.fs.createDirentFromStats(n,s)};return e.stats&&(o.stats=s),o})}Fe.readdir=Wa});var Ua=b(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.createFileSystemAdapter=De.FILE_SYSTEM_ADAPTER=void 0;var ze=require("fs");De.FILE_SYSTEM_ADAPTER={lstat:ze.lstat,stat:ze.stat,lstatSync:ze.lstatSync,statSync:ze.statSync,readdir:ze.readdir,readdirSync:ze.readdirSync};function Hp(r){return r===void 0?De.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},De.FILE_SYSTEM_ADAPTER),r)}De.createFileSystemAdapter=Hp});var Ka=b(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});var Fp=require("path"),Dp=Ve(),Ip=Ua(),mn=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=Ip.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Fp.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new Dp.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e??t}};gn.default=mn});var Yt=b(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.Settings=Ie.scandirSync=Ie.scandir=void 0;var Ya=ja(),jp=Ga(),_n=Ka();Ie.Settings=_n.default;function Bp(r,e,t){if(typeof e=="function"){Ya.read(r,yn(),e);return}Ya.read(r,yn(e),t)}Ie.scandir=Bp;function qp(r,e){let t=yn(e);return jp.read(r,t)}Ie.scandirSync=qp;function yn(r={}){return r instanceof _n.default?r:new _n.default(r)}});var Ja=b((Eg,Qa)=>{"use strict";function Vp(r){var e=new r,t=e;function n(){var s=e;return s.next?e=s.next:(e=new r,t=e),s.next=null,s}function i(s){t.next=s,t=s}return{get:n,release:i}}Qa.exports=Vp});var za=b((Ag,bn)=>{"use strict";var Wp=Ja();function Xa(r,e,t){if(typeof r=="function"&&(t=e,e=r,r=null),t<1)throw new Error("fastqueue concurrency must be greater than 1");var n=Wp(Gp),i=null,s=null,o=0,a=null,l={push:_,drain:he,saturated:he,pause:u,paused:!1,concurrency:t,running:p,resume:y,idle:g,length:f,getQueue:c,unshift:C,empty:he,kill:A,killAndDrain:k,error:q};return l;function p(){return o}function u(){l.paused=!0}function f(){for(var P=i,j=0;P;)P=P.next,j++;return j}function c(){for(var P=i,j=[];P;)j.push(P.value),P=P.next;return j}function y(){if(l.paused){l.paused=!1;for(var P=0;P<l.concurrency;P++)o++,w()}}function g(){return o===0&&l.length()===0}function _(P,j){var T=n.get();T.context=r,T.release=w,T.value=P,T.callback=j||he,T.errorHandler=a,o===l.concurrency||l.paused?s?(s.next=T,s=T):(i=T,s=T,l.saturated()):(o++,e.call(r,T.value,T.worked))}function C(P,j){var T=n.get();T.context=r,T.release=w,T.value=P,T.callback=j||he,o===l.concurrency||l.paused?i?(T.next=i,i=T):(i=T,s=T,l.saturated()):(o++,e.call(r,T.value,T.worked))}function w(P){P&&n.release(P);var j=i;j?l.paused?o--:(s===i&&(s=null),i=j.next,j.next=null,e.call(r,j.value,j.worked),s===null&&l.empty()):--o===0&&l.drain()}function A(){i=null,s=null,l.drain=he}function k(){i=null,s=null,l.drain(),l.drain=he}function q(P){a=P}}function he(){}function Gp(){this.value=null,this.callback=he,this.next=null,this.release=he,this.context=null,this.errorHandler=null;var r=this;this.worked=function(t,n){var i=r.callback,s=r.errorHandler,o=r.value;r.value=null,r.callback=he,r.errorHandler&&s(t,o),i.call(r.context,t,n),r.release(r)}}function Up(r,e,t){typeof r=="function"&&(t=e,e=r,r=null);function n(u,f){e.call(this,u).then(function(c){f(null,c)},f)}var i=Xa(r,n,t),s=i.push,o=i.unshift;return i.push=a,i.unshift=l,i.drained=p,i;function a(u){var f=new Promise(function(c,y){s(u,function(g,_){if(g){y(g);return}c(_)})});return f.catch(he),f}function l(u){var f=new Promise(function(c,y){o(u,function(g,_){if(g){y(g);return}c(_)})});return f.catch(he),f}function p(){var u=i.drain,f=new Promise(function(c){i.drain=function(){u(),c()}});return f}}bn.exports=Xa;bn.exports.promise=Up});var Qt=b(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.joinPathSegments=Ce.replacePathSegmentSeparator=Ce.isAppliedFilter=Ce.isFatalError=void 0;function Kp(r,e){return r.errorFilter===null?!0:!r.errorFilter(e)}Ce.isFatalError=Kp;function Yp(r,e){return r===null||r(e)}Ce.isAppliedFilter=Yp;function Qp(r,e){return r.split(/[/\\]/).join(e)}Ce.replacePathSegmentSeparator=Qp;function Jp(r,e,t){return r===""?e:r.endsWith(t)?r+e:r+t+e}Ce.joinPathSegments=Jp});var En=b(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});var Xp=Qt(),Sn=class{constructor(e,t){this._root=e,this._settings=t,this._root=Xp.replacePathSegmentSeparator(e,t.pathSegmentSeparator)}};vn.default=Sn});var On=b(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});var zp=require("events"),Zp=Yt(),eh=za(),Jt=Qt(),th=En(),An=class extends th.default{constructor(e,t){super(e,t),this._settings=t,this._scandir=Zp.scandir,this._emitter=new zp.EventEmitter,this._queue=eh(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){let n={directory:e,base:t};this._queue.push(n,i=>{i!==null&&this._handleError(i)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(n,i)=>{if(n!==null){t(n,void 0);return}for(let s of i)this._handleEntry(s,e.base);t(null,void 0)})}_handleError(e){this._isDestroyed||!Jt.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;let n=e.path;t!==void 0&&(e.path=Jt.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),Jt.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&Jt.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,t===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};Cn.default=An});var Za=b(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});var rh=On(),xn=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new rh.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{nh(e,t)}),this._reader.onEntry(t=>{this._storage.push(t)}),this._reader.onEnd(()=>{ih(e,this._storage)}),this._reader.read()}};Rn.default=xn;function nh(r,e){r(e)}function ih(r,e){r(null,e)}});var eu=b(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});var sh=require("stream"),oh=On(),wn=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new oh.default(this._root,this._settings),this._stream=new sh.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};Pn.default=wn});var tu=b(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});var ah=Yt(),Xt=Qt(),uh=En(),Tn=class extends uh.default{constructor(){super(...arguments),this._scandir=ah.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{let n=this._scandir(e,this._settings.fsScandirSettings);for(let i of n)this._handleEntry(i,t)}catch(n){this._handleError(n)}}_handleError(e){if(Xt.isFatalError(this._settings,e))throw e}_handleEntry(e,t){let n=e.path;t!==void 0&&(e.path=Xt.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),Xt.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&Xt.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,t===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};kn.default=Tn});var ru=b(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});var lh=tu(),$n=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new lh.default(this._root,this._settings)}read(){return this._reader.read()}};Ln.default=$n});var nu=b(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});var ch=require("path"),fh=Yt(),Mn=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,ch.sep),this.fsScandirSettings=new fh.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e??t}};Nn.default=Mn});var Zt=b(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.Settings=Oe.walkStream=Oe.walkSync=Oe.walk=void 0;var iu=Za(),ph=eu(),hh=ru(),Hn=nu();Oe.Settings=Hn.default;function dh(r,e,t){if(typeof e=="function"){new iu.default(r,zt()).read(e);return}new iu.default(r,zt(e)).read(t)}Oe.walk=dh;function mh(r,e){let t=zt(e);return new hh.default(r,t).read()}Oe.walkSync=mh;function gh(r,e){let t=zt(e);return new ph.default(r,t).read()}Oe.walkStream=gh;function zt(r={}){return r instanceof Hn.default?r:new Hn.default(r)}});var er=b(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});var _h=require("path"),yh=Ve(),su=we(),Fn=class{constructor(e){this._settings=e,this._fsStatSettings=new yh.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return _h.resolve(this._settings.cwd,e)}_makeEntry(e,t){let n={name:t,path:t,dirent:su.fs.createDirentFromStats(t,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!su.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};Dn.default=Fn});var Bn=b(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});var bh=require("stream"),Sh=Ve(),vh=Zt(),Eh=er(),In=class extends Eh.default{constructor(){super(...arguments),this._walkStream=vh.walkStream,this._stat=Sh.stat}dynamic(e,t){return this._walkStream(e,t)}static(e,t){let n=e.map(this._getFullEntryPath,this),i=new bh.PassThrough({objectMode:!0});i._write=(s,o,a)=>this._getEntry(n[s],e[s],t).then(l=>{l!==null&&t.entryFilter(l)&&i.push(l),s===n.length-1&&i.end(),a()}).catch(a);for(let s=0;s<n.length;s++)i.write(s);return i}_getEntry(e,t,n){return this._getStat(e).then(i=>this._makeEntry(i,t)).catch(i=>{if(n.errorFilter(i))return null;throw i})}_getStat(e){return new Promise((t,n)=>{this._stat(e,this._fsStatSettings,(i,s)=>i===null?t(s):n(i))})}};jn.default=In});var ou=b(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});var Ah=Zt(),Ch=er(),Oh=Bn(),qn=class extends Ch.default{constructor(){super(...arguments),this._walkAsync=Ah.walk,this._readerStream=new Oh.default(this._settings)}dynamic(e,t){return new Promise((n,i)=>{this._walkAsync(e,t,(s,o)=>{s===null?n(o):i(s)})})}async static(e,t){let n=[],i=this._readerStream.static(e,t);return new Promise((s,o)=>{i.once("error",o),i.on("data",a=>n.push(a)),i.once("end",()=>s(n))})}};Vn.default=qn});var au=b(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});var pt=we(),Wn=class{constructor(e,t,n){this._patterns=e,this._settings=t,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let t=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(t);this._storage.push({complete:n.length<=1,pattern:e,segments:t,sections:n})}}_getPatternSegments(e){return pt.pattern.getPatternParts(e,this._micromatchOptions).map(n=>pt.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:pt.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(e){return pt.array.splitWhen(e,t=>t.dynamic&&pt.pattern.hasGlobStar(t.pattern))}};Gn.default=Wn});var uu=b(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});var xh=au(),Un=class extends xh.default{match(e){let t=e.split("/"),n=t.length,i=this._storage.filter(s=>!s.complete||s.segments.length>n);for(let s of i){let o=s.sections[0];if(!s.complete&&n>o.length||t.every((l,p)=>{let u=s.segments[p];return!!(u.dynamic&&u.patternRe.test(l)||!u.dynamic&&u.pattern===l)}))return!0}return!1}};Kn.default=Un});var lu=b(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});var tr=we(),Rh=uu(),Yn=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,n){let i=this._getMatcher(t),s=this._getNegativePatternsRe(n);return o=>this._filter(e,o,i,s)}_getMatcher(e){return new Rh.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let t=e.filter(tr.pattern.isAffectDepthOfReadingPattern);return tr.pattern.convertPatternsToRe(t,this._micromatchOptions)}_filter(e,t,n,i){if(this._isSkippedByDeep(e,t.path)||this._isSkippedSymbolicLink(t))return!1;let s=tr.path.removeLeadingDotSegment(t.path);return this._isSkippedByPositivePatterns(s,n)?!1:this._isSkippedByNegativePatterns(s,i)}_isSkippedByDeep(e,t){return this._settings.deep===1/0?!1:this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){let n=t.split("/").length;if(e==="")return n;let i=e.split("/").length;return n-i}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(e,t){return!tr.pattern.matchAny(e,t)}};Qn.default=Yn});var cu=b(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});var je=we(),Jn=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(e,t){let[n,i]=je.pattern.partitionAbsoluteAndRelative(t),s={positive:{all:je.pattern.convertPatternsToRe(e,this._micromatchOptions)},negative:{absolute:je.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:je.pattern.convertPatternsToRe(i,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return o=>this._filter(o,s)}_filter(e,t){let n=je.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(n)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;let i=this._isMatchToPatternsSet(n,t,e.dirent.isDirectory());return this._settings.unique&&i&&this._createIndexRecord(n),i}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,n){return!(!this._isMatchToPatterns(e,t.positive.all,n)||this._isMatchToPatterns(e,t.negative.relative,n)||this._isMatchToAbsoluteNegative(e,t.negative.absolute,n))}_isMatchToAbsoluteNegative(e,t,n){if(t.length===0)return!1;let i=je.path.makeAbsolute(this._settings.cwd,e);return this._isMatchToPatterns(i,t,n)}_isMatchToPatterns(e,t,n){if(t.length===0)return!1;let i=je.pattern.matchAny(e,t);return!i&&n?je.pattern.matchAny(e+"/",t):i}};Xn.default=Jn});var fu=b(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});var wh=we(),zn=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return wh.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};Zn.default=zn});var hu=b(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});var pu=we(),ei=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let t=e.path;return this._settings.absolute&&(t=pu.path.makeAbsolute(this._settings.cwd,t),t=pu.path.unixify(t)),this._settings.markDirectories&&e.dirent.isDirectory()&&(t+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:t}):t}};ti.default=ei});var rr=b(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});var Ph=require("path"),Th=lu(),kh=cu(),$h=fu(),Lh=hu(),ri=class{constructor(e){this._settings=e,this.errorFilter=new $h.default(this._settings),this.entryFilter=new kh.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new Th.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new Lh.default(this._settings)}_getRootDirectory(e){return Ph.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let t=e.base==="."?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};ni.default=ri});var du=b(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});var Mh=ou(),Nh=rr(),ii=class extends Nh.default{constructor(){super(...arguments),this._reader=new Mh.default(this._settings)}async read(e){let t=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(t,e,n)).map(s=>n.transform(s))}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}};si.default=ii});var mu=b(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});var Hh=require("stream"),Fh=Bn(),Dh=rr(),oi=class extends Dh.default{constructor(){super(...arguments),this._reader=new Fh.default(this._settings)}read(e){let t=this._getRootDirectory(e),n=this._getReaderOptions(e),i=this.api(t,e,n),s=new Hh.Readable({objectMode:!0,read:()=>{}});return i.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",n.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>i.destroy()),s}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}};ai.default=oi});var gu=b(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});var Ih=Ve(),jh=Zt(),Bh=er(),ui=class extends Bh.default{constructor(){super(...arguments),this._walkSync=jh.walkSync,this._statSync=Ih.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){let n=[];for(let i of e){let s=this._getFullEntryPath(i),o=this._getEntry(s,i,t);o===null||!t.entryFilter(o)||n.push(o)}return n}_getEntry(e,t,n){try{let i=this._getStat(e);return this._makeEntry(i,t)}catch(i){if(n.errorFilter(i))return null;throw i}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};li.default=ui});var _u=b(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});var qh=gu(),Vh=rr(),ci=class extends Vh.default{constructor(){super(...arguments),this._reader=new qh.default(this._settings)}read(e){let t=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(t,e,n).map(n.transform)}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}};fi.default=ci});var yu=b(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var Ze=require("fs"),Wh=require("os"),Gh=Math.max(Wh.cpus().length,1);et.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:Ze.lstat,lstatSync:Ze.lstatSync,stat:Ze.stat,statSync:Ze.statSync,readdir:Ze.readdir,readdirSync:Ze.readdirSync};var pi=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,Gh),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return e===void 0?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},et.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};et.default=pi});var vu=b((Yg,Su)=>{"use strict";var bu=Sa(),Uh=du(),Kh=mu(),Yh=_u(),hi=yu(),de=we();async function di(r,e){_e(r);let t=mi(r,Uh.default,e),n=await Promise.all(t);return de.array.flatten(n)}(function(r){r.glob=r,r.globSync=e,r.globStream=t,r.async=r;function e(p,u){_e(p);let f=mi(p,Yh.default,u);return de.array.flatten(f)}r.sync=e;function t(p,u){_e(p);let f=mi(p,Kh.default,u);return de.stream.merge(f)}r.stream=t;function n(p,u){_e(p);let f=[].concat(p),c=new hi.default(u);return bu.generate(f,c)}r.generateTasks=n;function i(p,u){_e(p);let f=new hi.default(u);return de.pattern.isDynamicPattern(p,f)}r.isDynamicPattern=i;function s(p){return _e(p),de.path.escape(p)}r.escapePath=s;function o(p){return _e(p),de.path.convertPathToPattern(p)}r.convertPathToPattern=o;let a;(function(p){function u(c){return _e(c),de.path.escapePosixPath(c)}p.escapePath=u;function f(c){return _e(c),de.path.convertPosixPathToPattern(c)}p.convertPathToPattern=f})(a=r.posix||(r.posix={}));let l;(function(p){function u(c){return _e(c),de.path.escapeWindowsPath(c)}p.escapePath=u;function f(c){return _e(c),de.path.convertWindowsPathToPattern(c)}p.convertPathToPattern=f})(l=r.win32||(r.win32={}))})(di||(di={}));function mi(r,e,t){let n=[].concat(r),i=new hi.default(t),s=bu.generate(n,i),o=new e(i);return s.map(o.read,o)}function _e(r){if(![].concat(r).every(n=>de.string.isString(n)&&!de.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}Su.exports=di});var Li=ee($i(),1),{program:id,createCommand:sd,createArgument:od,createOption:ad,CommanderError:ud,InvalidArgumentError:ld,InvalidOptionArgumentError:cd,Command:Mi,Argument:fd,Option:pd,Help:hd}=Li.default;var ms=require("@rsbuild/core"),Rr=ee(require("fs"));var Di=require("@rsbuild/plugin-react"),Ii=require("@rsbuild/plugin-sass"),ji=require("@rsbuild/plugin-css-minimizer"),Bi=require("@rsbuild/plugin-assets-retry"),qi=require("@rsbuild/plugin-svgr"),Vi=require("@rsbuild/core");function nt(r,e){let t=Object.keys({...r.dependencies,...r.devDependencies});return Array.isArray(e)?t.filter(n=>e.some(i=>i instanceof RegExp?i.test(n):i===n)):e instanceof RegExp?t.some(n=>e.test(n)):t.includes(e)}var ke=ee(require("fs")),Ni=ee(require("path")),St=require("util"),rl=(0,St.promisify)(ke.readFile),nl=(0,St.promisify)(ke.writeFile),il=(0,St.promisify)(ke.unlink),I={resolvePath(r){return Ni.resolve(r)},hasFile(r){return ke.existsSync(this.resolvePath(r))},async readFile(r){let e=this.resolvePath(r);try{return await rl(e,{encoding:"utf-8"})}catch(t){if(t.code==="ENOENT")return null;throw t}},async writeFile(r,e){let t=this.resolvePath(r);await nl(t,e,{encoding:"utf-8"})},async deleteFile(r){let e=this.resolvePath(r);await il(e)}};var Hi=(r="4.2")=>{let e=new URL(`https://style.tobit.cloud/css/v${r}`);return(["development","qa","staging"].includes(process.env.BUILD_ENV)||process.env.NODE_ENV==="development")&&(e.host="style-staging.tobit.cloud"),`<script>(${sl.toString().replace("##url##",e.toString())})()</script>`},sl=()=>{let r=new URL("##url##"),e=new URLSearchParams(window.location.search.toLowerCase());r.searchParams.set("siteId",e.get("stylesiteid")||e.get("siteid")||""),e.has("colormode")&&r.searchParams.set("colormode",e.get("colormode")||""),e.has("color")&&r.searchParams.set("color",e.get("color")||"");let t=document.createElement("style");document.head.appendChild(t),t.sheet.insertRule("html.chayns-toolkit-css-loading { overflow: hidden; opacity: 0; }");let n=o=>{o?(document.documentElement.classList.remove("chayns-toolkit-css-loading"),t.remove()):document.documentElement.classList.add("chayns-toolkit-css-loading")};n(!1);let i=document.getElementsByTagName("HEAD")[0],s=document.createElement("link");return s.rel="stylesheet",s.type="text/css",s.href=r.toString(),s.onload=()=>{n(!0)},s.onerror=()=>{n(!0)},i.appendChild(s),""};var Wi=require("@module-federation/enhanced/rspack"),Gi=require("@rsbuild/plugin-node-polyfill"),Ui=require("@rsbuild/plugin-babel"),Ki=require("webpack-bundle-analyzer"),ol=()=>process.env.NODE_ENV==="production"?{html:"[name].html",js:"[name].[contenthash:8].im.js",css:"[name].[contenthash:8].im.css",svg:"[name].[contenthash:8].im.svg",font:"[name].[contenthash:8].im[ext]",image:"[name].[contenthash:8].im[ext]",media:"[name].[contenthash:8].im[ext]"}:{},al=(r,e)=>{if(!e)return;let t=`${e}static`,n=r==="node"?`${t}/js`:`${t}/js`,i=`${t}/js/async`,s=`${t}/css`,o=`${t}/css/async`;return{js:n,jsAsync:i,css:s,cssAsync:o,svg:`${t}/svg`,font:`${t}/font`,html:e,wasm:`${t}/wasm`,image:`${t}/image`,media:`${t}/media`,assets:`${t}/assets`,favicon:e}},Fi=(r,e)=>!r||!e||r.startsWith(e)?r:`${e}${r}`,ul=(r,e)=>e==="web-worker"?r.target==="web-worker":!r.target||r.target===e,ll=(r,e,t,n)=>{let i={};return Object.entries(r).forEach(([s,o])=>{if(!ul(o,e))return;if(e==="web"&&o.pathHtml&&!o.filename){i[s]=o.pathIndex;return}let a={import:o.pathIndex};o.pathHtml||(a.html=!1);let l=Fi(o.filename,t)??(e==="web"?void 0:Fi(n?.js??"[name].js",t));l&&(a.filename=l),i[s]=a}),i},cl=r=>{let e="v2.remoteEntry.js";return r?`${r}${e}`:e};function fl(r,e){return e||((r.dependencies?.react??r.peerDependencies?.react??r.devDependencies?.react)?.match(/\d+/)?.[0]??"18")}function pl(r,e){let t=r.peerDependencies?.react??r.dependencies?.react,n=r.peerDependencies?.["react-dom"]??r.dependencies?.["react-dom"];return typeof e=="string"?{react:e,reactDom:e}:{react:e?.react??t,reactDom:e?.reactDom??e?.react??n}}var $e=(r,e)=>e&&r.startsWith(e)?r.slice(e.length):r,hl=(r,e)=>{r.allFiles=r.allFiles.map(t=>$e(t,e)),Object.values(r.entries).forEach(t=>{t.initial?.js&&(t.initial.js=t.initial.js.map(n=>$e(n,e))),t.initial?.css&&(t.initial.css=t.initial.css.map(n=>$e(n,e))),t.async?.js&&(t.async.js=t.async.js.map(n=>$e(n,e))),t.async?.css&&(t.async.css=t.async.css.map(n=>$e(n,e))),t.html&&(t.html=t.html.map(n=>$e(n,e))),t.assets&&(t.assets=t.assets.map(n=>$e(n,e)))}),r.integrity&&(r.integrity=Object.fromEntries(Object.entries(r.integrity).map(([t,n])=>[$e(t,e),n])))};async function Er({analyze:r,buildVersion:e,cssVersion:t,disableReactSharing:n=!1,entryPoints:i,exposeModules:s,injectDevtoolsScript:o=!1,manifest:a={},mode:l,outputFilename:p,packageName:u,pathPrefix:f,reactRequiredVersions:c,env:y}){let g=ll(i,y,f,p),_=y!=="web-worker";if(Object.keys(g).length===0&&!(s&&_))return{};let C=[];if((r||process.env.BUNDLE_ANALYZE==="true")&&C.push(new Ki.BundleAnalyzerPlugin),s&&_){Object.keys(g).length===0&&(g.index={import:void 0,html:!1});let A={react:{requiredVersion:c.react},"react-dom":{requiredVersion:c.reactDom}};try{require.resolve("react-dom/client",{paths:[I.resolvePath("node_modules")]}),A["react-dom/client"]=A["react-dom"]}catch{}let k={dts:!1,manifest:a?.module?{additionalData:q=>{a?.externalAssets&&(q.stats.metaData.externalAssets=a.externalAssets),a?.textStringLibraries&&(q.stats.metaData.textStringLibraries=a.textStringLibraries),q.stats.metaData.buildInfo.buildVersion=e}}:!1,name:u?.replace(/^@/,"").replace(/\//g,"__").replace(/-/g,"_"),filename:cl(f),runtimePlugins:y==="node"?[require.resolve("@module-federation/node/runtimePlugin")]:void 0,exposes:s,library:y==="node"?{type:"commonjs-module"}:void 0,shared:l!=="development"&&n!==!0?A:void 0};C.push(new Wi.ModuleFederationPlugin(k))}let w=y==="web"&&o?[{tag:"script",attrs:{src:"http://localhost:8097"},append:!1}]:void 0;return y==="web"&&process.env.RUNTIME_VARS&&(w??=[],w.push({tag:"script",head:!0,append:!1,attrs:{src:"./env-config.js"}})),{[y]:{source:{entry:g},dev:{assetPrefix:y==="node"?!1:void 0},html:y==="web"?{template:({value:A,entryName:k})=>i[k]?.pathHtml??A,templateParameters:(A,{entryName:k})=>({...A,CHAYNS_TOOLKIT_CSS_TAG:Hi(t),...i[k]?.templateParameters}),tags:w}:void 0,tools:C.length>0?{rspack:{plugins:C}}:void 0,output:{target:y,module:y==="node"&&s?!1:void 0,assetPrefix:y==="node"?void 0:"auto",distPath:al(y,f),manifest:a?.host&&y==="web"?{filename:f?`${f}static/manifest.json`:void 0,generate:({manifestData:A})=>{let k=q=>q.filter(P=>!P.endsWith(".map"));return A.allFiles=k(A.allFiles),Object.values(A.entries).forEach(q=>{q.assets&&(q.assets=k(q.assets))}),hl(A,f),a?.externalAssets&&(A.staticFiles=a.externalAssets),a?.textStringLibraries&&(A.textStringLibraries=a.textStringLibraries),A.buildVersion=e,A}}:!1},plugins:y==="web"&&f?[(0,Gi.pluginNodePolyfill)()]:void 0}}}async function vt({mode:r,analyze:e,outputFilename:t,injectDevtoolsScript:n,path:i,packageJson:s,prefixCss:o=!1,cssVersion:a="4.2",exposeModules:l,reactRequiredVersions:p,entryPoints:u,serverSideRendering:f,reactRuntime:c,reactCompiler:y,disableReactSharing:g=!1,manifest:_={}}){let C=s.name,w=process.env.BUILD_ENV||(r==="production"?"production":"development"),A=process.env.BUILD_VERSION||`${w}-fallback-${new Date().toISOString()}`,{publicVars:k}=(0,Vi.loadEnv)({mode:w}),q=nt(s,"@linaria/core"),P=nt(s,"babel-plugin-react-compiler"),j=typeof y=="boolean"?y:y!==void 0?!0:P,T=typeof y=="object"&&y!==null?y.target:void 0,x=pl(s,p),N=process.env.BUNDLE_ANALYZE==="true"||e,X=[(0,Di.pluginReact)({swcReactOptions:{runtime:c}}),(0,Ii.pluginSass)(),(0,Bi.pluginAssetsRetry)(),(0,ji.pluginCssMinimizer)(),(0,qi.pluginSvgr)({svgrOptions:{exportType:"default"}})];if(!C)throw Error("The name field in package.json has to be provided.");let m={};f&&Object.assign(m,await Er({analyze:N,buildVersion:A,cssVersion:a,disableReactSharing:g,entryPoints:u,exposeModules:l,manifest:_,mode:r,outputFilename:t,packageName:C,pathPrefix:"server/",reactRequiredVersions:x,env:"node"})),Object.assign(m,await Er({analyze:N,buildVersion:A,cssVersion:a,disableReactSharing:g,entryPoints:u,exposeModules:l,injectDevtoolsScript:n,manifest:_,mode:r,outputFilename:t,packageName:C,pathPrefix:f?"client/":void 0,reactRequiredVersions:x,env:"web"})),Object.assign(m,await Er({analyze:N,buildVersion:A,cssVersion:a,disableReactSharing:g,entryPoints:u,exposeModules:l,manifest:_,mode:r,outputFilename:t,packageName:C,pathPrefix:f?"client/":void 0,reactRequiredVersions:x,env:"web-worker"}));let B={rspack:{resolve:{fallback:{"react-dom/client":!1}},output:{uniqueName:l?`${C}__${w}__${process.env.BUILD_VERSION||1}`:C},module:{parser:{javascript:{exportsPresence:"warn"}}}},postcss:o?V=>{if(!V.postcssOptions)return;let h=d=>{d.plugins||(d.plugins=[]),d.plugins.push(require("postcss-prefix-selector")({prefix:`.${C}`,ignoreFiles:[/\.module\.s?css$/i],exclude:[":root","html","body"]}))};if(typeof V.postcssOptions=="function"){let d=V.postcssOptions;V.postcssOptions=te=>{let M=d(te);return h(M),M};return}h(V.postcssOptions)}:void 0};(q||j)&&X.push((0,Ui.pluginBabel)({babelLoaderOptions:(V,{addPresets:h})=>{V.sourceMaps=!1,j&&(V.plugins??=[],V.plugins.unshift(["babel-plugin-react-compiler",{target:fl(s,T)}])),h(["@babel/preset-react"])}})),q&&(B.bundlerChain=(V,{CHAIN_ID:h})=>{V.module.rule(h.RULE.JS).use(h.USE.SWC).after(h.USE.BABEL).loader("@wyw-in-js/webpack-loader")});let D=process.env.RUNTIME_VARS?.split(",").map(V=>V.trim());return D&&Object.keys(k).forEach(V=>{let h=V.replace(/^(process\.env\.|import\.meta\.env\.)/,"");if(D.includes(h)){let d=k[V];k[V]=`((typeof window !== 'undefined' && window._env_ && window._env_["${C}"] && window._env_["${C}"].${h}) || ${d})`}}),{source:{tsconfigPath:I.hasFile("tsconfig.json")?I.resolvePath("tsconfig.json"):void 0,define:{"process.env.VERSION":JSON.stringify(A),"import.meta.env.VERSION":JSON.stringify(A),"process.env.BUILD_VERSION":JSON.stringify(A),"import.meta.env.BUILD_VERSION":JSON.stringify(A),"process.env.BUILD_ENV":JSON.stringify(w),"import.meta.env.BUILD_ENV":JSON.stringify(w),"process.env.__PACKAGE_NAME__":JSON.stringify(s.name?.replace(/-/g,"_")),"import.meta.env.__PACKAGE_NAME__":JSON.stringify(s.name?.replace(/-/g,"_")),__REQUIRED_REACT_VERSION__:JSON.stringify(x.react),...k}},plugins:X,tools:B,output:{sourceMap:{js:r==="development"?"cheap-module-source-map":"hidden-source-map"},cleanDistPath:r==="production",overrideBrowserslist:r==="production"?["cover 90%","not dead","not op_mini all","Firefox ESR","not android < 5"]:void 0,filename:{...ol(),...t},distPath:{root:i||"build"}},dev:{assetPrefix:"auto"},environments:m}}var Ot=require("child_process");var Yi=(r=0)=>e=>`\x1B[${e+r}m`,Qi=(r=0)=>e=>`\x1B[${38+r};5;${e}m`,Ji=(r=0)=>(e,t,n)=>`\x1B[${38+r};2;${e};${t};${n}m`,Y={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Cd=Object.keys(Y.modifier),dl=Object.keys(Y.color),ml=Object.keys(Y.bgColor),Od=[...dl,...ml];function gl(){let r=new Map;for(let[e,t]of Object.entries(Y)){for(let[n,i]of Object.entries(t))Y[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},t[n]=Y[n],r.set(i[0],i[1]);Object.defineProperty(Y,e,{value:t,enumerable:!1})}return Object.defineProperty(Y,"codes",{value:r,enumerable:!1}),Y.color.close="\x1B[39m",Y.bgColor.close="\x1B[49m",Y.color.ansi=Yi(),Y.color.ansi256=Qi(),Y.color.ansi16m=Ji(),Y.bgColor.ansi=Yi(10),Y.bgColor.ansi256=Qi(10),Y.bgColor.ansi16m=Ji(10),Object.defineProperties(Y,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>Y.rgbToAnsi256(...Y.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,i;if(e>=232)t=((e-232)*10+8)/255,n=t,i=t;else{e-=16;let a=e%36;t=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(t,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(t));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>Y.ansi256ToAnsi(Y.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>Y.ansi256ToAnsi(Y.hexToAnsi256(e)),enumerable:!1}}),Y}var _l=gl(),me=_l;var At=ee(require("node:process"),1),zi=ee(require("node:os"),1),Ar=ee(require("node:tty"),1);function fe(r,e=globalThis.Deno?globalThis.Deno.args:At.default.argv){let t=r.startsWith("-")?"":r.length===1?"-":"--",n=e.indexOf(t+r),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:Q}=At.default,Et;fe("no-color")||fe("no-colors")||fe("color=false")||fe("color=never")?Et=0:(fe("color")||fe("colors")||fe("color=true")||fe("color=always"))&&(Et=1);function yl(){if("FORCE_COLOR"in Q)return Q.FORCE_COLOR==="true"?1:Q.FORCE_COLOR==="false"?0:Q.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Q.FORCE_COLOR,10),3)}function bl(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function Sl(r,{streamIsTTY:e,sniffFlags:t=!0}={}){let n=yl();n!==void 0&&(Et=n);let i=t?Et:n;if(i===0)return 0;if(t){if(fe("color=16m")||fe("color=full")||fe("color=truecolor"))return 3;if(fe("color=256"))return 2}if("TF_BUILD"in Q&&"AGENT_NAME"in Q)return 1;if(r&&!e&&i===void 0)return 0;let s=i||0;if(Q.TERM==="dumb")return s;if(At.default.platform==="win32"){let o=zi.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Q)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in Q)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in Q)||Q.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in Q)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Q.TEAMCITY_VERSION)?1:0;if(Q.COLORTERM==="truecolor"||Q.TERM==="xterm-kitty"||Q.TERM==="xterm-ghostty"||Q.TERM==="wezterm")return 3;if("TERM_PROGRAM"in Q){let o=Number.parseInt((Q.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Q.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Q.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Q.TERM)||"COLORTERM"in Q?1:s}function Xi(r,e={}){let t=Sl(r,{streamIsTTY:r&&r.isTTY,...e});return bl(t)}var vl={stdout:Xi({isTTY:Ar.default.isatty(1)}),stderr:Xi({isTTY:Ar.default.isatty(2)})},Zi=vl;function es(r,e,t){let n=r.indexOf(e);if(n===-1)return r;let i=e.length,s=0,o="";do o+=r.slice(s,n)+e+t,s=n+i,n=r.indexOf(e,s);while(n!==-1);return o+=r.slice(s),o}function ts(r,e,t,n){let i=0,s="";do{let o=r[n-1]==="\r";s+=r.slice(i,o?n-1:n)+e+(o?`\r
28
28
  `:`
29
29
  `)+t,i=n+1,n=r.indexOf(`
30
- `,i)}while(n!==-1);return s+=r.slice(i),s}var{stdout:Ji,stderr:zi}=Yi,Sr=Symbol("GENERATOR"),Ve=Symbol("STYLER"),nt=Symbol("IS_EMPTY"),Zi=["ansi","ansi","ansi256","ansi16m"],We=Object.create(null),pl=(r,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let t=Ji?Ji.level:0;r.level=e.level===void 0?t:e.level};var hl=r=>{let e=(...t)=>t.join(" ");return pl(e,r),Object.setPrototypeOf(e,it.prototype),e};function it(r){return hl(r)}Object.setPrototypeOf(it.prototype,Function.prototype);for(let[r,e]of Object.entries(ge))We[r]={get(){let t=At(this,Er(e.open,e.close,this[Ve]),this[nt]);return Object.defineProperty(this,r,{value:t}),t}};We.visible={get(){let r=At(this,this[Ve],!0);return Object.defineProperty(this,"visible",{value:r}),r}};var vr=(r,e,t,...n)=>r==="rgb"?e==="ansi16m"?ge[t].ansi16m(...n):e==="ansi256"?ge[t].ansi256(ge.rgbToAnsi256(...n)):ge[t].ansi(ge.rgbToAnsi(...n)):r==="hex"?vr("rgb",e,t,...ge.hexToRgb(...n)):ge[t][r](...n),dl=["rgb","hex","ansi256"];for(let r of dl){We[r]={get(){let{level:t}=this;return function(...n){let i=Er(vr(r,Zi[t],"color",...n),ge.color.close,this[Ve]);return At(this,i,this[nt])}}};let e="bg"+r[0].toUpperCase()+r.slice(1);We[e]={get(){let{level:t}=this;return function(...n){let i=Er(vr(r,Zi[t],"bgColor",...n),ge.bgColor.close,this[Ve]);return At(this,i,this[nt])}}}}var ml=Object.defineProperties(()=>{},{...We,level:{enumerable:!0,get(){return this[Sr].level},set(r){this[Sr].level=r}}}),Er=(r,e,t)=>{let n,i;return t===void 0?(n=r,i=e):(n=t.openAll+r,i=e+t.closeAll),{open:r,close:e,openAll:n,closeAll:i,parent:t}},At=(r,e,t)=>{let n=(...i)=>gl(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,ml),n[Sr]=r,n[Ve]=e,n[nt]=t,n},gl=(r,e)=>{if(r.level<=0||!e)return r[nt]?"":e;let t=r[Ve];if(t===void 0)return e;let{openAll:n,closeAll:i}=t;if(e.includes("\x1B"))for(;t!==void 0;)e=Qi(e,t.close,t.open),t=t.parent;let s=e.indexOf(`
31
- `);return s!==-1&&(e=Xi(e,i,n,s)),n+e+i};Object.defineProperties(it.prototype,We);var _l=it(),yd=it({level:zi?zi.level:0});var re=_l;var x={info(r){console.info(`${re.hex("#76A9FA")("info ")} - ${r}`)},hint(r){console.info(`${re.hex("#31C48D")("hint ")} - ${r}`)},warn(r){console.info(`${re.hex("#FACA15")("warn ")} - ${r}`)},error(r){console.info(`${re.hex("#F98080")("error")} - ${r}`)},blank(r){console.info(` ${r}`)},exit(r){console.info(""),r?process.exit(r):process.exit()}};var H={path(r){return re.hex("#16BDCA")(`\`${Ct(r)}\``)},command(r){return re.hex("#AC94FA")(`\`${Ct(r)}\``)},code(r){return re.hex("#76A9FA")(`\`${Ct(r)}\``)},alt(r){return re.hex("#97A6BA")(Ct(r))},number(r){return re.hex("#F17EB8")(r)}};function Ct(r){return yl(r)?r[0]:r}function yl(r){return Array.isArray(r)}var es="toolkit.config.js",ts="toolkit.config.cjs",rs="toolkit.config.mjs",Ge="toolkit.config.ts",te;async function os(){let r={};if(D.hasFile(Ge)?te=Ge:D.hasFile(rs)?te=rs:D.hasFile(ts)?te=ts:D.hasFile(es)?te=es:te=void 0,te)if(x.info(`loading ${H.path(te)}...`),te===Ge){let{default:e}=await import("typescript"),t=e.transpile((0,is.readFileSync)(Ge,"utf-8"),{esModuleInterop:!0}),n=new ss.default(Ge);n.paths=[D.resolvePath("node_modules")],n._compile(t,Ge),r=n.exports.default}else delete require.cache[D.resolvePath(te)],r=(await import(`file://${D.resolvePath(te)}?update=${Date.now()}`)).default;try{let e=qi.parse(r),{host:t,cert:n,key:i}=e.development;if(t==="adaptive"){let s=!!(n&&i);e.development.host=s?"0.0.0.0":"localhost"}return e}catch(e){if(e instanceof ns.ZodError){let t=e.errors.map(({path:n,message:i})=>`- ${n.join(".")}: ${i}
32
- `).join("");throw new Error(t)}throw console.error(e),e}}function Ot({config:r,dev:e,modifier:t,target:n,watch:i}){if(!t||!te)return r;let s=t(r,{dev:e,target:n,watch:i});if(s===void 0)throw Error(`The webpack customization function in your ${H.path(te)} returned nothing.`);if(typeof s!="object")throw Error(`The webpack customization function in your ${H.path(te)} returned an invalid configuration.`);return s}async function as(r,e){return(await r.build(e)).stats}function ls({analyze:r,watch:e}){return async({config:t,packageJson:n})=>{let i=t.output.serverSideRendering?["server","client"]:[null];for(let s of i){let o=await St({mode:"production",analyze:r,outputFilename:t.output.filename,singleBundle:t.output.singleBundle,serverSideRendering:t.output.serverSideRendering!==!1,path:s?`${t.output.path}/${s}`:t.output.path,packageJson:n,prefixCss:t.output.prefixCss,cssVersion:t.output.cssVersion,exposeModules:t.output.exposeModules,disableReactSharing:t.output.disableReactSharing,reactRuntime:t.output.reactRuntime,reactCompiler:t.output.reactCompiler,manifest:t.manifest,entryPoints:t.output.entryPoints,target:s});if(typeof t.webpack=="function"){let h=t.webpack;o=Ot({config:o,dev:!1,modifier:h,target:s??"client",watch:e})}let a=await(0,us.createRsbuild)({rsbuildConfig:o});x.info("Bundling your code...");let l=await as(a,{watch:e});l?.hasErrors()&&(x.error(`Compilation failed.
33
- `),("stats"in l?l.stats.flatMap(u=>u.compilation.errors):l.compilation.errors).forEach(u=>{console.error(u)}),x.exit(1))}}}var yu=require("child_process"),bu=require("@rsbuild/core"),pt=ee(require("fs")),Su=require("node:fs");var bl={npm:"npm i",pnpm:"pnpm add",yarn:"yarn add"},Sl={npm:"npm remove",pnpm:"pnpm remove",yarn:"yarn remove"},$e={install(r,e,t=!1,n=!1){let i=[];return i.push(bl[r??"npm"]),t?i.push("-D"):n&&i.push("-P"),i.push(Array.isArray(e)?e.join(" "):e),H.command(i.join(" "))},remove(r,e){let t=[];return t.push(Sl[r??"npm"]),t.push(Array.isArray(e)?e.join(" "):e),H.command(t.join(" "))},move(r,e,t){return $e.install(r,e,t==="dev",!0)}};var cs="package-lock.json",fs="yarn.lock",ps="pnpm-lock.yaml",Ar=r=>D.hasFile(`./${r}`)||D.hasFile(`../${r}`)||D.hasFile(`../../${r}`);function hs(){let r=Ar(cs),e=Ar(fs),t=Ar(ps),n=[r&&cs,e&&fs,t&&ps].filter(Boolean);if(n.length>1&&(x.warn(`Multiple lockfiles detected: ${n.map(i=>H.path(i)).join(", ")}.
34
- `),x.blank("Using priority order: pnpm > yarn > npm. Consider removing unused lockfiles.")),t)return"pnpm";if(e)return"yarn";if(r)return"npm"}async function ds(){let r=await D.readFile("package.json");if(r===null)throw Error("No package.json file was found.");return JSON.parse(r)}async function Ue(...r){let e;try{e=await os()}catch(s){let o=s;x.error(`An error occured while loading the toolkit config:
35
- `),x.blank(o.message),x.exit(1);return}let[t,n]=await Promise.all([ds(),hs()]),i=!0;for(let s of r)if(i){for(let o of s)await o({config:e,packageJson:t,packageManager:n})&&(i=!1);r.indexOf(s)!==r.length-1&&x.blank("")}}var ms=require("@rsbuild/core");var Cr={...process.env};function st(r=!1){r?(process.env.BABEL_ENV="development",process.env.NODE_ENV="development",process.env.BUILD_ENV||="development"):(process.env.BABEL_ENV="production",process.env.NODE_ENV="production",process.env.BUILD_ENV||="production");let e=process.env.BUILD_ENV;x.info(`Loading environment ${re.yellow(e)}`),(0,ms.loadEnv)({mode:e})}function gs(){Object.keys(process.env).forEach(r=>{r in Cr?Cr[r]!==process.env[r]&&(process.env[r]=Cr[r]):delete process.env[r]})}var _s=ee(require("fs")),ys=ee(require("path")),bs=require("util"),vl=(0,bs.promisify)(_s.readFile);async function Or(r){let e=ys.resolve("package.json"),t=await vl(e,{encoding:"utf-8"}),n=JSON.parse(t),i=Object.keys({...n.dependencies,...n.devDependencies});return Array.isArray(r)?i.filter(s=>r.some(o=>o instanceof RegExp?o.test(s):o===s)):r instanceof RegExp?i.some(s=>r.test(s)):i.includes(r)}async function Ss(r){let e=await Or("@types/react"),t=await Or("@types/react-dom"),n=[!e&&"@types/react",!t&&"@types/react-dom"].filter(Boolean);if(n.length>0){let i=n.map(s=>H.code(s)).join(" and ");x.hint(`You should install the ${i} package${n.length>0?"s":""} to get TypeScript support for React.
36
- `),r!==void 0&&x.blank(`Install them by running ${$e.install(r,n,!0)}`)}}async function vs(){if(!D.hasFile("tsconfig.json"))return!0;let t=(await D.readFile("tsconfig.json")??"").replace(/\s/gi,"");return t===""||t==="{}"}var mu=ee(du());async function gu(){return D.hasFile("tsconfig.json")?!0:(await(0,mu.default)("src/**/*.{ts,tsx}")).length>0}async function er({packageJson:r,packageManager:e}){let t=rt(r,"typescript"),n=await vs();return t?(await Ss(e),n&&await _u(),!1):await gu()?(n&&await _u(),x.error(`To use TypeScript, you have to install the ${H.code`typescript`} package by running ${$e.install(e,"typescript",!0)}.`),!0):!1}async function _u(){await D.writeFile("tsconfig.json",JSON.stringify(Mh,void 0,4)),x.info(`Seems like you want to use TypeScript. A ${H.path`tsconfig.json`} file has been set up for you.`)}var Mh={compilerOptions:{allowJs:!0,allowSyntheticDefaultImports:!0,checkJs:!1,esModuleInterop:!0,experimentalDecorators:!0,isolatedModules:!0,jsx:"react",lib:["DOM","ESNext"],noEmit:!0,skipLibCheck:!0,strict:!0}};var fi=ee(require("fs"));function tr({config:r}){let{cert:e,key:t}=r.development,n=!1;return t&&!e||!t&&e?(x.error(`You have specified the ${H.code(t?"key":"cert")} field in your ${H.path`chayns-toolkit.json`} file, but not ${H.code(t?"cert":"key")}. You need to specify paths in both fields for SSL to work.`),n=!0):(t&&(fi.existsSync(t)||(x.error(`No file exists at the ${H.code`key`} path specified in ${H.path`chayns-toolkit.json`}.`),n=!0)),e&&(fi.existsSync(e)||(x.error(`No file exists at the ${H.code`cert`} path specified in ${H.path`chayns-toolkit.json`}.`),n=!0))),n}function pi({devtools:r}){return async({config:e,packageJson:t,packageManager:n})=>{let{port:i,ports:s,host:o,cert:a,key:l}=e.development,h=e.output.serverSideRendering==="all"?["server","client"]:[null],u=[];for(let g of h){let A=await St({analyze:!1,mode:"development",outputFilename:e.output.filename,singleBundle:e.output.singleBundle,serverSideRendering:e.output.serverSideRendering==="all",packageJson:t,injectDevtoolsScript:r,prefixCss:e.output.prefixCss,cssVersion:e.output.cssVersion,exposeModules:e.output.exposeModules,disableReactSharing:e.output.disableReactSharing,reactRuntime:e.output.reactRuntime,reactCompiler:e.output.reactCompiler,manifest:e.manifest,entryPoints:e.output.entryPoints,target:g});if(r){"react-devtools"in(t.dependencies||{})?(x.error(`You added ${H.code`react-devtools`} as a regular dependency.`),x.blank(`Install it under ${H.code`devDependencies`} by running ${$e.move(n,"react-devtools","dev")}.
37
- `),process.exit(1)):"react-devtools"in(t.devDependencies||{})||(x.error(`You need to install the ${H.code`react-devtools`} package to use the ${H.command`--devtools`} option.`),x.blank(`Run ${$e.install(n,"react-devtools",!0)} to add it as a ${H.code`devDependency`}.
38
- `),process.exit(1));let Q=process.env.PORT;process.env.PORT=void 0,(0,yu.exec)("npx react-devtools"),process.env.PORT=Q}if(A.server||={},A.server.host=o,A.server.port=i,A.server.strictPort=e.development.strictPort,e.output.serverSideRendering==="all"&&s&&(g==="server"?A.server.port=s.server:A.server.port=s.client),A.server.headers={"Access-Control-Allow-Headers":"Authorization, Content-Type, X-Requested-With","Access-Control-Allow-Private-Network":"true"},A.server.cors={credentials:!0,origin:!0},A.server.htmlFallback=!1,A.dev??={},A.dev.lazyCompilation=!1,a&&l&&(A.server.https={cert:pt.default.readFileSync(a),key:pt.default.readFileSync(l)}),typeof e.webpack=="function"){let Q=e.webpack;A=Ot({config:A,dev:!0,modifier:Q,target:g,watch:!0})}let $=await(0,bu.createRsbuild)({rsbuildConfig:A}),{server:V,urls:I}=await $.startDevServer();u.push(V),I.forEach(Q=>{x.info(`Project is running at: ${Q}`)})}let f=!1,c=process.env.BUILD_ENV||"development",E=[".env",".env.local",`.env.${c}`,`.env.${c}.local`];te&&E.unshift(te),Object.values(e.output.entryPoints??{}).forEach(({pathHtml:g})=>{g&&!E.includes(g)&&E.push(g)}),E=E.map(g=>D.resolvePath(g)).filter(g=>D.hasFile(g));let _=()=>{f||(f=!0,console.log("Restarting dev server"),Promise.all(u.map(g=>g.close())).then(()=>{gs(),st(!0),f=!1,Ue([er,tr],[pi({})]),E.forEach(g=>(0,Su.unwatchFile)(g,_))}))};E.forEach(g=>{x.info(`Watching for file changes of ${H.path(g)}`),(0,pt.watchFile)(g,_)})}}var hi=require("eslint");var we=require("node:fs");async function vu(){x.info("Linting your code...");try{!(0,we.existsSync)("./eslint.config.js")&&!(0,we.existsSync)("./eslint.config.cjs")&&!(0,we.existsSync)("./eslint.config.mjs")&&!(0,we.existsSync)("./eslint.config.ts")&&!(0,we.existsSync)("./eslint.config.cts")&&!(0,we.existsSync)("./eslint.config.mts")&&(0,we.writeFileSync)("./eslint.config.mjs",`import config from '@chayns-toolkit/eslint-config';
30
+ `,i)}while(n!==-1);return s+=r.slice(i),s}var{stdout:rs,stderr:ns}=Zi,Cr=Symbol("GENERATOR"),We=Symbol("STYLER"),it=Symbol("IS_EMPTY"),is=["ansi","ansi","ansi256","ansi16m"],Ge=Object.create(null),El=(r,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let t=rs?rs.level:0;r.level=e.level===void 0?t:e.level};var Al=r=>{let e=(...t)=>t.join(" ");return El(e,r),Object.setPrototypeOf(e,st.prototype),e};function st(r){return Al(r)}Object.setPrototypeOf(st.prototype,Function.prototype);for(let[r,e]of Object.entries(me))Ge[r]={get(){let t=Ct(this,xr(e.open,e.close,this[We]),this[it]);return Object.defineProperty(this,r,{value:t}),t}};Ge.visible={get(){let r=Ct(this,this[We],!0);return Object.defineProperty(this,"visible",{value:r}),r}};var Or=(r,e,t,...n)=>r==="rgb"?e==="ansi16m"?me[t].ansi16m(...n):e==="ansi256"?me[t].ansi256(me.rgbToAnsi256(...n)):me[t].ansi(me.rgbToAnsi(...n)):r==="hex"?Or("rgb",e,t,...me.hexToRgb(...n)):me[t][r](...n),Cl=["rgb","hex","ansi256"];for(let r of Cl){Ge[r]={get(){let{level:t}=this;return function(...n){let i=xr(Or(r,is[t],"color",...n),me.color.close,this[We]);return Ct(this,i,this[it])}}};let e="bg"+r[0].toUpperCase()+r.slice(1);Ge[e]={get(){let{level:t}=this;return function(...n){let i=xr(Or(r,is[t],"bgColor",...n),me.bgColor.close,this[We]);return Ct(this,i,this[it])}}}}var Ol=Object.defineProperties(()=>{},{...Ge,level:{enumerable:!0,get(){return this[Cr].level},set(r){this[Cr].level=r}}}),xr=(r,e,t)=>{let n,i;return t===void 0?(n=r,i=e):(n=t.openAll+r,i=e+t.closeAll),{open:r,close:e,openAll:n,closeAll:i,parent:t}},Ct=(r,e,t)=>{let n=(...i)=>xl(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,Ol),n[Cr]=r,n[We]=e,n[it]=t,n},xl=(r,e)=>{if(r.level<=0||!e)return r[it]?"":e;let t=r[We];if(t===void 0)return e;let{openAll:n,closeAll:i}=t;if(e.includes("\x1B"))for(;t!==void 0;)e=es(e,t.close,t.open),t=t.parent;let s=e.indexOf(`
31
+ `);return s!==-1&&(e=ts(e,i,n,s)),n+e+i};Object.defineProperties(st.prototype,Ge);var Rl=st(),$d=st({level:ns?ns.level:0});var ne=Rl;var R={info(r){console.info(`${ne.hex("#76A9FA")("info ")} - ${r}`)},hint(r){console.info(`${ne.hex("#31C48D")("hint ")} - ${r}`)},warn(r){console.info(`${ne.hex("#FACA15")("warn ")} - ${r}`)},error(r){console.info(`${ne.hex("#F98080")("error")} - ${r}`)},blank(r){console.info(` ${r}`)},exit(r){console.info(""),r?process.exit(r):process.exit()}};var wl=200,Pl=async()=>{await new Promise(r=>{setTimeout(r,wl)})},ss=async r=>{if(process.platform==="win32"&&r.pid){await new Promise(e=>{(0,Ot.execFile)("taskkill",["/pid",String(r.pid),"/t","/f"],{windowsHide:!0},()=>{e()})});return}await new Promise(e=>{r.once("exit",()=>{e()}),r.kill()})};function xt(r){let e,t,n=(l,p)=>{if(t?.type===l)return t.promise;let u=(t?.promise??Promise.resolve()).catch(()=>{}).then(p).finally(()=>{t?.promise===u&&(t=void 0)});return t={type:l,promise:u},u},i=async()=>{if(!e||e.exitCode!==null||e.killed){e=void 0;return}let l=e;e=void 0,R.info(`Stopping command: ${r}`),await ss(l),await Pl()};return{start:async()=>n("start",async()=>{if(!r)return;let l=!!e;e&&await i(),R.info(`${l?"Restarting":"Starting"} command: ${r}`);let p=(0,Ot.spawn)(r,{env:process.env,shell:!0,stdio:"inherit"});e=p,p.once("error",u=>{e===p&&(e=void 0),R.error(`Failed to start command "${r}": ${u.message}`)}),p.once("exit",()=>{e===p&&(e=void 0)})}),stop:async()=>n("stop",i),kill:()=>{e&&ss(e)}}}var cs=require("zod"),fs=require("node:fs"),ps=ee(require("node:module"));var E=require("zod"),Tl=E.z.object({host:E.z.string().max(255).default("adaptive"),port:E.z.coerce.number().positive().max(65535).default(1234),ports:E.z.object({client:E.z.coerce.number().positive().max(65535).default(1234),server:E.z.coerce.number().positive().max(65535).default(1235)}).default({}),strictPort:E.z.boolean().default(!1),cert:E.z.string().optional(),key:E.z.string().optional()}),kl=E.z.object({singleBundle:E.z.boolean().default(!1),filename:E.z.object({html:E.z.string().optional(),js:E.z.string().optional(),css:E.z.string().optional(),svg:E.z.string().optional(),font:E.z.string().optional(),image:E.z.string().optional(),media:E.z.string().optional()}).optional(),path:E.z.string().default("build"),serverSideRendering:E.z.union([E.z.literal("all"),E.z.literal("build-only"),E.z.boolean()]).default(!1),prefixCss:E.z.boolean().default(!1),cssVersion:E.z.string().regex(/^\d+\.\d+$/).default("4.2"),exposeModules:E.z.record(E.z.string(),E.z.string()).optional(),reactRequiredVersions:E.z.union([E.z.string().min(1),E.z.object({react:E.z.string().min(1).optional(),reactDom:E.z.string().min(1).optional()}).refine(r=>!!(r.react||r.reactDom),"Need to define at least one key for output.reactRequiredVersions")]).optional(),disableReactSharing:E.z.boolean().default(!1),reactRuntime:E.z.union([E.z.literal("automatic"),E.z.literal("classic")]).default("classic"),reactCompiler:E.z.union([E.z.boolean(),E.z.object({target:E.z.string().optional()})]).optional(),entryPoints:E.z.record(E.z.string(),E.z.object({pathIndex:E.z.string(),pathHtml:E.z.string().optional(),filename:E.z.string().optional(),templateParameters:E.z.record(E.z.string(),E.z.string()).optional(),target:E.z.union([E.z.literal("node"),E.z.literal("web"),E.z.literal("web-worker")]).optional()})).default({})}).refine(r=>Object.keys(r.entryPoints).length||Object.keys(r.exposeModules??{}).length,"Need to define at least one key for either output.entryPoints or output.exposeModules"),$l=E.z.object({host:E.z.boolean().default(!1),module:E.z.boolean().default(!1),externalAssets:E.z.array(E.z.string()).optional(),textStringLibraries:E.z.array(E.z.string()).optional()}),os=E.z.object({development:Tl.default({}),output:kl.default({entryPoints:{index:{pathIndex:"./src/index",pathHtml:"./src/index.html"}}}),manifest:$l.default({}),webpack:E.z.function().args(E.z.custom(),E.z.object({dev:E.z.boolean(),watch:E.z.boolean().default(!1)})).returns(E.z.custom()).optional()});var F={path(r){return ne.hex("#16BDCA")(`\`${Rt(r)}\``)},command(r){return ne.hex("#AC94FA")(`\`${Rt(r)}\``)},code(r){return ne.hex("#76A9FA")(`\`${Rt(r)}\``)},alt(r){return ne.hex("#97A6BA")(Rt(r))},number(r){return ne.hex("#F17EB8")(r)}};function Rt(r){return Ll(r)?r[0]:r}function Ll(r){return Array.isArray(r)}var as="toolkit.config.js",us="toolkit.config.cjs",ls="toolkit.config.mjs",Ue="toolkit.config.ts",re;async function hs(){let r={};if(I.hasFile(Ue)?re=Ue:I.hasFile(ls)?re=ls:I.hasFile(us)?re=us:I.hasFile(as)?re=as:re=void 0,re)if(R.info(`loading ${F.path(re)}...`),re===Ue){let{default:e}=await import("typescript"),t=e.transpile((0,fs.readFileSync)(Ue,"utf-8"),{esModuleInterop:!0}),n=new ps.default(Ue);n.paths=[I.resolvePath("node_modules")],n._compile(t,Ue),r=n.exports.default}else delete require.cache[I.resolvePath(re)],r=(await import(`file://${I.resolvePath(re)}?update=${Date.now()}`)).default;try{let e=os.parse(r),{host:t,cert:n,key:i}=e.development;if(t==="adaptive"){let s=!!(n&&i);e.development.host=s?"0.0.0.0":"localhost"}return e}catch(e){if(e instanceof cs.ZodError){let t=e.errors.map(({path:n,message:i})=>`- ${n.join(".")}: ${i}
32
+ `).join("");throw new Error(t)}throw console.error(e),e}}function wt({config:r,dev:e,modifier:t,watch:n}){if(!t||!re)return r;let i=t(r,{dev:e,watch:n});if(i===void 0)throw Error(`The webpack customization function in your ${F.path(re)} returned nothing.`);if(typeof i!="object")throw Error(`The webpack customization function in your ${F.path(re)} returned an invalid configuration.`);return i}async function ds(r,e){return(await r.build(e)).stats}function gs({analyze:r,exec:e,preview:t,watch:n}){return async({config:i,packageJson:s})=>{let o=xt(e),a=async c=>{let{urls:y}=await c.preview();y.forEach(g=>{R.info(`Preview is running at: ${g}`)})},l=await vt({mode:"production",analyze:r,outputFilename:i.output.filename,singleBundle:i.output.singleBundle,serverSideRendering:i.output.serverSideRendering!==!1,path:i.output.path,packageJson:s,prefixCss:i.output.prefixCss,cssVersion:i.output.cssVersion,exposeModules:i.output.exposeModules,reactRequiredVersions:i.output.reactRequiredVersions,disableReactSharing:i.output.disableReactSharing,reactRuntime:i.output.reactRuntime,reactCompiler:i.output.reactCompiler,manifest:i.manifest,entryPoints:i.output.entryPoints});if(typeof i.webpack=="function"){let c=i.webpack;l=wt({config:l,dev:!1,modifier:c,watch:n})}if(t){let{port:c,host:y,cert:g,key:_,strictPort:C}=i.development;l.server||={},l.server.host=y,l.server.port=c,l.server.strictPort=C,l.server.headers={"Access-Control-Allow-Headers":"Authorization, Content-Type, X-Requested-With","Access-Control-Allow-Private-Network":"true"},l.server.cors={credentials:!0,origin:!0},l.server.htmlFallback=!1,g&&_&&(l.server.https={cert:Rr.default.readFileSync(g),key:Rr.default.readFileSync(_)})}let p=await(0,ms.createRsbuild)({rsbuildConfig:l}),u;if(e&&(p.onAfterBuild(async({stats:c})=>{!c||c.hasErrors()||await o.start()}),p.onCloseBuild(async()=>{await o.stop()}),process.once("exit",()=>{o.kill()})),t&&n){let c=!1;u=new Promise((y,g)=>{p.onAfterBuild(async({stats:_})=>{if(!(c||!_||_.hasErrors())){c=!0;try{await a(p),y()}catch(C){g(C instanceof Error?C:new Error(String(C)))}}})})}R.info("Bundling your code...");let f=await ds(p,{watch:n});f?.hasErrors()&&(R.error(`Compilation failed.
33
+ `),("stats"in f?f.stats.flatMap(y=>y.compilation.errors):f.compilation.errors).forEach(y=>{console.error(y)}),R.exit(1)),t&&(n?await u:await a(p))}}var Ou=require("child_process"),xu=require("@rsbuild/core"),ht=ee(require("fs")),Ru=require("node:fs");var Ml={npm:"npm i",pnpm:"pnpm add",yarn:"yarn add"},Nl={npm:"npm remove",pnpm:"pnpm remove",yarn:"yarn remove"},Le={install(r,e,t=!1,n=!1){let i=[];return i.push(Ml[r??"npm"]),t?i.push("-D"):n&&i.push("-P"),i.push(Array.isArray(e)?e.join(" "):e),F.command(i.join(" "))},remove(r,e){let t=[];return t.push(Nl[r??"npm"]),t.push(Array.isArray(e)?e.join(" "):e),F.command(t.join(" "))},move(r,e,t){return Le.install(r,e,t==="dev",!0)}};var _s="package-lock.json",ys="yarn.lock",bs="pnpm-lock.yaml",wr=r=>I.hasFile(`./${r}`)||I.hasFile(`../${r}`)||I.hasFile(`../../${r}`);function Ss(){let r=wr(_s),e=wr(ys),t=wr(bs),n=[r&&_s,e&&ys,t&&bs].filter(Boolean);if(n.length>1&&(R.warn(`Multiple lockfiles detected: ${n.map(i=>F.path(i)).join(", ")}.
34
+ `),R.blank("Using priority order: pnpm > yarn > npm. Consider removing unused lockfiles.")),t)return"pnpm";if(e)return"yarn";if(r)return"npm"}async function vs(){let r=await I.readFile("package.json");if(r===null)throw Error("No package.json file was found.");return JSON.parse(r)}async function Ke(...r){let e;try{e=await hs()}catch(s){let o=s;R.error(`An error occured while loading the toolkit config:
35
+ `),R.blank(o.message),R.exit(1);return}let[t,n]=await Promise.all([vs(),Ss()]),i=!0;for(let s of r)if(i){for(let o of s)await o({config:e,packageJson:t,packageManager:n})&&(i=!1);r.indexOf(s)!==r.length-1&&R.blank("")}}var Es=require("@rsbuild/core");var Pr={...process.env};function ot(r=!1){r?(process.env.BABEL_ENV="development",process.env.NODE_ENV="development",process.env.BUILD_ENV||="development"):(process.env.BABEL_ENV="production",process.env.NODE_ENV="production",process.env.BUILD_ENV||="production");let e=process.env.BUILD_ENV;R.info(`Loading environment ${ne.yellow(e)}`),(0,Es.loadEnv)({mode:e})}function As(){Object.keys(process.env).forEach(r=>{r in Pr?Pr[r]!==process.env[r]&&(process.env[r]=Pr[r]):delete process.env[r]})}var Cs=ee(require("fs")),Os=ee(require("path")),xs=require("util"),Hl=(0,xs.promisify)(Cs.readFile);async function Tr(r){let e=Os.resolve("package.json"),t=await Hl(e,{encoding:"utf-8"}),n=JSON.parse(t),i=Object.keys({...n.dependencies,...n.devDependencies});return Array.isArray(r)?i.filter(s=>r.some(o=>o instanceof RegExp?o.test(s):o===s)):r instanceof RegExp?i.some(s=>r.test(s)):i.includes(r)}async function Rs(r){let e=await Tr("@types/react"),t=await Tr("@types/react-dom"),n=[!e&&"@types/react",!t&&"@types/react-dom"].filter(Boolean);if(n.length>0){let i=n.map(s=>F.code(s)).join(" and ");R.hint(`You should install the ${i} package${n.length>0?"s":""} to get TypeScript support for React.
36
+ `),r!==void 0&&R.blank(`Install them by running ${Le.install(r,n,!0)}`)}}async function ws(){if(!I.hasFile("tsconfig.json"))return!0;let t=(await I.readFile("tsconfig.json")??"").replace(/\s/gi,"");return t===""||t==="{}"}var Eu=ee(vu());async function Au(){return I.hasFile("tsconfig.json")?!0:(await(0,Eu.default)("src/**/*.{ts,tsx}")).length>0}async function nr({packageJson:r,packageManager:e}){let t=nt(r,"typescript"),n=await ws();return t?(await Rs(e),n&&await Cu(),!1):await Au()?(n&&await Cu(),R.error(`To use TypeScript, you have to install the ${F.code`typescript`} package by running ${Le.install(e,"typescript",!0)}.`),!0):!1}async function Cu(){await I.writeFile("tsconfig.json",JSON.stringify(Qh,void 0,4)),R.info(`Seems like you want to use TypeScript. A ${F.path`tsconfig.json`} file has been set up for you.`)}var Qh={compilerOptions:{allowJs:!0,allowSyntheticDefaultImports:!0,checkJs:!1,esModuleInterop:!0,experimentalDecorators:!0,isolatedModules:!0,jsx:"react",lib:["DOM","ESNext"],noEmit:!0,skipLibCheck:!0,strict:!0}};var gi=ee(require("fs"));function ir({config:r}){let{cert:e,key:t}=r.development,n=!1;return t&&!e||!t&&e?(R.error(`You have specified the ${F.code(t?"key":"cert")} field in your ${F.path`chayns-toolkit.json`} file, but not ${F.code(t?"cert":"key")}. You need to specify paths in both fields for SSL to work.`),n=!0):(t&&(gi.existsSync(t)||(R.error(`No file exists at the ${F.code`key`} path specified in ${F.path`chayns-toolkit.json`}.`),n=!0)),e&&(gi.existsSync(e)||(R.error(`No file exists at the ${F.code`cert`} path specified in ${F.path`chayns-toolkit.json`}.`),n=!0))),n}function _i({devtools:r,exec:e}){return async({config:t,packageJson:n,packageManager:i})=>{let s=xt(e),{port:o,host:a,cert:l,key:p}=t.development,u=await vt({analyze:!1,mode:"development",outputFilename:t.output.filename,singleBundle:t.output.singleBundle,serverSideRendering:t.output.serverSideRendering==="all",packageJson:n,injectDevtoolsScript:r,prefixCss:t.output.prefixCss,cssVersion:t.output.cssVersion,exposeModules:t.output.exposeModules,reactRequiredVersions:t.output.reactRequiredVersions,disableReactSharing:t.output.disableReactSharing,reactRuntime:t.output.reactRuntime,reactCompiler:t.output.reactCompiler,manifest:t.manifest,entryPoints:t.output.entryPoints});if(r){"react-devtools"in(n.dependencies||{})?(R.error(`You added ${F.code`react-devtools`} as a regular dependency.`),R.blank(`Install it under ${F.code`devDependencies`} by running ${Le.move(i,"react-devtools","dev")}.
37
+ `),process.exit(1)):"react-devtools"in(n.devDependencies||{})||(R.error(`You need to install the ${F.code`react-devtools`} package to use the ${F.command`--devtools`} option.`),R.blank(`Run ${Le.install(i,"react-devtools",!0)} to add it as a ${F.code`devDependency`}.
38
+ `),process.exit(1));let A=process.env.PORT;process.env.PORT=void 0,(0,Ou.exec)("npx react-devtools"),process.env.PORT=A}if(u.server||={},u.server.host=a,u.server.port=o,u.server.strictPort=t.development.strictPort,u.server.headers={"Access-Control-Allow-Headers":"Authorization, Content-Type, X-Requested-With","Access-Control-Allow-Private-Network":"true"},u.server.cors={credentials:!0,origin:!0},u.server.htmlFallback=!1,u.dev??={},u.dev.lazyCompilation=!1,l&&p&&(u.server.https={cert:ht.default.readFileSync(l),key:ht.default.readFileSync(p)}),typeof t.webpack=="function"){let A=t.webpack;u=wt({config:u,dev:!0,modifier:A,watch:!0})}let f=await(0,xu.createRsbuild)({rsbuildConfig:u});e&&(f.onAfterDevCompile(async({stats:A})=>{!A||A.hasErrors()||await s.start()}),f.onCloseDevServer(async()=>{await s.stop()}),process.once("exit",()=>{s.kill()}));let{server:c,urls:y}=await f.startDevServer();y.forEach(A=>{R.info(`Project is running at: ${A}`)});let g=!1,_=process.env.BUILD_ENV||"development",C=[".env",".env.local",`.env.${_}`,`.env.${_}.local`];re&&C.unshift(re),Object.values(t.output.entryPoints??{}).forEach(({pathHtml:A})=>{A&&!C.includes(A)&&C.push(A)}),C=C.map(A=>I.resolvePath(A)).filter(A=>I.hasFile(A));let w=()=>{g||(g=!0,console.log("Restarting dev server"),c.close().then(()=>{As(),ot(!0),g=!1,Ke([nr,ir],[_i({devtools:r,exec:e})]),C.forEach(A=>(0,Ru.unwatchFile)(A,w))}))};C.forEach(A=>{R.info(`Watching for file changes of ${F.path(A)}`),(0,ht.watchFile)(A,w)})}}var yi=require("eslint");var Pe=require("node:fs");async function wu(){R.info("Linting your code...");try{!(0,Pe.existsSync)("./eslint.config.js")&&!(0,Pe.existsSync)("./eslint.config.cjs")&&!(0,Pe.existsSync)("./eslint.config.mjs")&&!(0,Pe.existsSync)("./eslint.config.ts")&&!(0,Pe.existsSync)("./eslint.config.cts")&&!(0,Pe.existsSync)("./eslint.config.mts")&&(0,Pe.writeFileSync)("./eslint.config.mjs",`import config from '@chayns-toolkit/eslint-config';
39
39
 
40
40
  export default config;
41
- `);let r=new hi.ESLint({fix:!0}),e=await r.lintFiles(["./src"]);await hi.ESLint.outputFixes(e);let t=e.reduce((s,o)=>s+o.warningCount,0),n=e.reduce((s,o)=>s+o.errorCount,0),i="";(t||n)&&(i=await(await r.loadFormatter("pretty")).format(e)),n+t===0?x.info(`No linting errors were found.
42
- `):(x.warn(`${n} errors and ${t} were found:
43
- `),console.log(i))}catch(r){x.error(`An error occured while linting your project:
44
- `),x.blank(r.message)}}var Eu=ee(require("http")),Au=ee(require("https")),Cu=ee(require("serve-handler")),di=ee(require("fs"));function Ou(r){return async({config:e})=>{let{host:t,port:n,cert:i,key:s}=e.development,o,a;i&&(o=di.default.readFileSync(i)),s&&(a=di.default.readFileSync(s));let l=!!(o&&a),h=async(f,c)=>{f.headers.origin&&(c.setHeader("Access-Control-Allow-Origin",f.headers.origin),c.setHeader("Access-Control-Allow-Methods","GET, POST, PUT, DELETE, PATCH, OPTIONS"),c.setHeader("Access-Control-Allow-Headers","Authorization, Content-Type, X-Requested-With"),f.headers["Access-Control-Request-Private-Network"]&&(c.setHeader("Access-Control-Allow-Private-Network","true"),c.setHeader("Access-Control-Allow-Credentials","true"))),c.setHeader("Vary","Origin");let E=Date.now();await(0,Cu.default)(f,c,{public:e.output.path??"build",cleanUrls:["!**/*.html"]}),console.log(f.method,f.url),console.log("Returned",(c.statusCode===200?re.green:re.red)(c.statusCode),"in",Date.now()-E,"ms")};(l?Au.default.createServer({key:a,cert:o},h):Eu.default.createServer(h)).listen(r.port??n,()=>{let f=`http${l?"s":""}://${t}:${r.port??n}`;console.log(`Running at ${f}`)}),await Promise.resolve()}}var et=new wi;et.version("4.0.0-beta.0","-v, --version","output the version number");et.command("dev").description("start up a development server with hot module replacement").option("-d, --devtools","open react-devtools in a separate window",!1).action(async r=>{st(!0),await Ue([er,tr],[pi({devtools:r.devtools})])});et.command("build").description("bundles your code for production").option("-a, --analyze","analyze your bundle size",!1).option("-w, --watch","watch for file changes",!1).action(async r=>{try{st(!1),await Ue([ls({analyze:r.analyze,watch:r.watch})])}catch(e){x.error(e),x.exit(1)}console.info("")});et.command("lint").description("lints your code for possible errors").action(async()=>{await vu(),console.info("")});et.command("serve").description("serves the files from a local build folder").option("-p, --port <number>","port number").action(async({port:r})=>{try{await Ue([Ou({port:r})])}catch(e){x.error(e)}});et.parse(process.argv);
41
+ `);let r=new yi.ESLint({fix:!0}),e=await r.lintFiles(["./src"]);await yi.ESLint.outputFixes(e);let t=e.reduce((s,o)=>s+o.warningCount,0),n=e.reduce((s,o)=>s+o.errorCount,0),i="";(t||n)&&(i=await(await r.loadFormatter("pretty")).format(e)),n+t===0?R.info(`No linting errors were found.
42
+ `):(R.warn(`${n} errors and ${t} were found:
43
+ `),console.log(i))}catch(r){R.error(`An error occured while linting your project:
44
+ `),R.blank(r.message)}}var Pu=ee(require("http")),Tu=ee(require("https")),ku=ee(require("serve-handler")),bi=ee(require("fs"));function $u(r){return async({config:e})=>{let{host:t,port:n,cert:i,key:s}=e.development,o,a;i&&(o=bi.default.readFileSync(i)),s&&(a=bi.default.readFileSync(s));let l=!!(o&&a),p=async(f,c)=>{f.headers.origin&&(c.setHeader("Access-Control-Allow-Origin",f.headers.origin),c.setHeader("Access-Control-Allow-Methods","GET, POST, PUT, DELETE, PATCH, OPTIONS"),c.setHeader("Access-Control-Allow-Headers","Authorization, Content-Type, X-Requested-With"),f.headers["Access-Control-Request-Private-Network"]&&(c.setHeader("Access-Control-Allow-Private-Network","true"),c.setHeader("Access-Control-Allow-Credentials","true"))),c.setHeader("Vary","Origin");let y=Date.now();await(0,ku.default)(f,c,{public:e.output.path??"build",cleanUrls:["!**/*.html"]}),console.log(f.method,f.url),console.log("Returned",(c.statusCode===200?ne.green:ne.red)(c.statusCode),"in",Date.now()-y,"ms")};(l?Tu.default.createServer({key:a,cert:o},p):Pu.default.createServer(p)).listen(r.port??n,()=>{let f=`http${l?"s":""}://${t}:${r.port??n}`;console.log(`Running at ${f}`)}),await Promise.resolve()}}var tt=new Mi;tt.version("4.0.0-beta.10","-v, --version","output the version number");tt.command("dev").description("start up a development server with hot module replacement").option("-d, --devtools","open react-devtools in a separate window",!1).option("-e, --exec <command>","run a command after a successful compile").action(async r=>{ot(!0),await Ke([nr,ir],[_i({devtools:r.devtools,exec:r.exec})])});tt.command("build").description("bundles your code for production").option("-a, --analyze","analyze your bundle size",!1).option("-e, --exec <command>","run a command after a successful build").option("-p, --preview","start a preview server after building",!1).option("-w, --watch","watch for file changes",!1).action(async r=>{try{ot(!1),await Ke([gs({analyze:r.analyze,exec:r.exec,preview:r.preview,watch:r.watch})])}catch(e){R.error(e),R.exit(1)}console.info("")});tt.command("lint").description("lints your code for possible errors").action(async()=>{await wu(),console.info("")});tt.command("serve").description("serves the files from a local build folder").option("-p, --port <number>","port number").action(async({port:r})=>{try{await Ke([$u({port:r})])}catch(e){R.error(e)}});tt.parse(process.argv);
45
45
  /*! Bundled license information:
46
46
 
47
47
  is-extglob/index.js:
@@ -70,6 +70,22 @@ export declare const configSchema: z.ZodObject<{
70
70
  prefixCss: z.ZodDefault<z.ZodBoolean>;
71
71
  cssVersion: z.ZodDefault<z.ZodString>;
72
72
  exposeModules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
73
+ reactRequiredVersions: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodObject<{
74
+ react: z.ZodOptional<z.ZodString>;
75
+ reactDom: z.ZodOptional<z.ZodString>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ react?: string | undefined;
78
+ reactDom?: string | undefined;
79
+ }, {
80
+ react?: string | undefined;
81
+ reactDom?: string | undefined;
82
+ }>, {
83
+ react?: string | undefined;
84
+ reactDom?: string | undefined;
85
+ }, {
86
+ react?: string | undefined;
87
+ reactDom?: string | undefined;
88
+ }>]>>;
73
89
  disableReactSharing: z.ZodDefault<z.ZodBoolean>;
74
90
  reactRuntime: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"automatic">, z.ZodLiteral<"classic">]>>;
75
91
  reactCompiler: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
@@ -82,13 +98,19 @@ export declare const configSchema: z.ZodObject<{
82
98
  entryPoints: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
83
99
  pathIndex: z.ZodString;
84
100
  pathHtml: z.ZodOptional<z.ZodString>;
101
+ filename: z.ZodOptional<z.ZodString>;
85
102
  templateParameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
103
+ target: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"node">, z.ZodLiteral<"web">, z.ZodLiteral<"web-worker">]>>;
86
104
  }, "strip", z.ZodTypeAny, {
87
105
  pathIndex: string;
106
+ filename?: string | undefined;
107
+ target?: "node" | "web" | "web-worker" | undefined;
88
108
  pathHtml?: string | undefined;
89
109
  templateParameters?: Record<string, string> | undefined;
90
110
  }, {
91
111
  pathIndex: string;
112
+ filename?: string | undefined;
113
+ target?: "node" | "web" | "web-worker" | undefined;
92
114
  pathHtml?: string | undefined;
93
115
  templateParameters?: Record<string, string> | undefined;
94
116
  }>>>;
@@ -102,6 +124,8 @@ export declare const configSchema: z.ZodObject<{
102
124
  reactRuntime: "automatic" | "classic";
103
125
  entryPoints: Record<string, {
104
126
  pathIndex: string;
127
+ filename?: string | undefined;
128
+ target?: "node" | "web" | "web-worker" | undefined;
105
129
  pathHtml?: string | undefined;
106
130
  templateParameters?: Record<string, string> | undefined;
107
131
  }>;
@@ -115,6 +139,10 @@ export declare const configSchema: z.ZodObject<{
115
139
  media?: string | undefined;
116
140
  } | undefined;
117
141
  exposeModules?: Record<string, string> | undefined;
142
+ reactRequiredVersions?: string | {
143
+ react?: string | undefined;
144
+ reactDom?: string | undefined;
145
+ } | undefined;
118
146
  reactCompiler?: boolean | {
119
147
  target?: string | undefined;
120
148
  } | undefined;
@@ -134,6 +162,10 @@ export declare const configSchema: z.ZodObject<{
134
162
  prefixCss?: boolean | undefined;
135
163
  cssVersion?: string | undefined;
136
164
  exposeModules?: Record<string, string> | undefined;
165
+ reactRequiredVersions?: string | {
166
+ react?: string | undefined;
167
+ reactDom?: string | undefined;
168
+ } | undefined;
137
169
  disableReactSharing?: boolean | undefined;
138
170
  reactRuntime?: "automatic" | "classic" | undefined;
139
171
  reactCompiler?: boolean | {
@@ -141,6 +173,8 @@ export declare const configSchema: z.ZodObject<{
141
173
  } | undefined;
142
174
  entryPoints?: Record<string, {
143
175
  pathIndex: string;
176
+ filename?: string | undefined;
177
+ target?: "node" | "web" | "web-worker" | undefined;
144
178
  pathHtml?: string | undefined;
145
179
  templateParameters?: Record<string, string> | undefined;
146
180
  }> | undefined;
@@ -154,6 +188,8 @@ export declare const configSchema: z.ZodObject<{
154
188
  reactRuntime: "automatic" | "classic";
155
189
  entryPoints: Record<string, {
156
190
  pathIndex: string;
191
+ filename?: string | undefined;
192
+ target?: "node" | "web" | "web-worker" | undefined;
157
193
  pathHtml?: string | undefined;
158
194
  templateParameters?: Record<string, string> | undefined;
159
195
  }>;
@@ -167,6 +203,10 @@ export declare const configSchema: z.ZodObject<{
167
203
  media?: string | undefined;
168
204
  } | undefined;
169
205
  exposeModules?: Record<string, string> | undefined;
206
+ reactRequiredVersions?: string | {
207
+ react?: string | undefined;
208
+ reactDom?: string | undefined;
209
+ } | undefined;
170
210
  reactCompiler?: boolean | {
171
211
  target?: string | undefined;
172
212
  } | undefined;
@@ -186,6 +226,10 @@ export declare const configSchema: z.ZodObject<{
186
226
  prefixCss?: boolean | undefined;
187
227
  cssVersion?: string | undefined;
188
228
  exposeModules?: Record<string, string> | undefined;
229
+ reactRequiredVersions?: string | {
230
+ react?: string | undefined;
231
+ reactDom?: string | undefined;
232
+ } | undefined;
189
233
  disableReactSharing?: boolean | undefined;
190
234
  reactRuntime?: "automatic" | "classic" | undefined;
191
235
  reactCompiler?: boolean | {
@@ -193,6 +237,8 @@ export declare const configSchema: z.ZodObject<{
193
237
  } | undefined;
194
238
  entryPoints?: Record<string, {
195
239
  pathIndex: string;
240
+ filename?: string | undefined;
241
+ target?: "node" | "web" | "web-worker" | undefined;
196
242
  pathHtml?: string | undefined;
197
243
  templateParameters?: Record<string, string> | undefined;
198
244
  }> | undefined;
@@ -215,14 +261,11 @@ export declare const configSchema: z.ZodObject<{
215
261
  }>>;
216
262
  webpack: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodType<RsbuildConfig, z.ZodTypeDef, RsbuildConfig>, z.ZodObject<{
217
263
  dev: z.ZodBoolean;
218
- target: z.ZodUnion<[z.ZodLiteral<"server">, z.ZodLiteral<"client">, z.ZodNull]>;
219
264
  watch: z.ZodDefault<z.ZodBoolean>;
220
265
  }, "strip", z.ZodTypeAny, {
221
- target: "client" | "server" | null;
222
266
  dev: boolean;
223
267
  watch: boolean;
224
268
  }, {
225
- target: "client" | "server" | null;
226
269
  dev: boolean;
227
270
  watch?: boolean | undefined;
228
271
  }>], z.ZodUnknown>, z.ZodType<RsbuildConfig, z.ZodTypeDef, RsbuildConfig>>>;
@@ -248,6 +291,8 @@ export declare const configSchema: z.ZodObject<{
248
291
  reactRuntime: "automatic" | "classic";
249
292
  entryPoints: Record<string, {
250
293
  pathIndex: string;
294
+ filename?: string | undefined;
295
+ target?: "node" | "web" | "web-worker" | undefined;
251
296
  pathHtml?: string | undefined;
252
297
  templateParameters?: Record<string, string> | undefined;
253
298
  }>;
@@ -261,6 +306,10 @@ export declare const configSchema: z.ZodObject<{
261
306
  media?: string | undefined;
262
307
  } | undefined;
263
308
  exposeModules?: Record<string, string> | undefined;
309
+ reactRequiredVersions?: string | {
310
+ react?: string | undefined;
311
+ reactDom?: string | undefined;
312
+ } | undefined;
264
313
  reactCompiler?: boolean | {
265
314
  target?: string | undefined;
266
315
  } | undefined;
@@ -272,7 +321,6 @@ export declare const configSchema: z.ZodObject<{
272
321
  textStringLibraries?: string[] | undefined;
273
322
  };
274
323
  webpack?: ((args_0: RsbuildConfig, args_1: {
275
- target: "client" | "server" | null;
276
324
  dev: boolean;
277
325
  watch?: boolean | undefined;
278
326
  }, ...args: unknown[]) => RsbuildConfig) | undefined;
@@ -304,6 +352,10 @@ export declare const configSchema: z.ZodObject<{
304
352
  prefixCss?: boolean | undefined;
305
353
  cssVersion?: string | undefined;
306
354
  exposeModules?: Record<string, string> | undefined;
355
+ reactRequiredVersions?: string | {
356
+ react?: string | undefined;
357
+ reactDom?: string | undefined;
358
+ } | undefined;
307
359
  disableReactSharing?: boolean | undefined;
308
360
  reactRuntime?: "automatic" | "classic" | undefined;
309
361
  reactCompiler?: boolean | {
@@ -311,6 +363,8 @@ export declare const configSchema: z.ZodObject<{
311
363
  } | undefined;
312
364
  entryPoints?: Record<string, {
313
365
  pathIndex: string;
366
+ filename?: string | undefined;
367
+ target?: "node" | "web" | "web-worker" | undefined;
314
368
  pathHtml?: string | undefined;
315
369
  templateParameters?: Record<string, string> | undefined;
316
370
  }> | undefined;
@@ -322,7 +376,6 @@ export declare const configSchema: z.ZodObject<{
322
376
  textStringLibraries?: string[] | undefined;
323
377
  } | undefined;
324
378
  webpack?: ((args_0: RsbuildConfig, args_1: {
325
- target: "client" | "server" | null;
326
379
  dev: boolean;
327
380
  watch: boolean;
328
381
  }, ...args: unknown[]) => RsbuildConfig) | undefined;
@@ -39,6 +39,17 @@ const outputSchema = zod_1.z
39
39
  .regex(/^\d+\.\d+$/)
40
40
  .default("4.2"),
41
41
  exposeModules: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
42
+ reactRequiredVersions: zod_1.z
43
+ .union([
44
+ zod_1.z.string().min(1),
45
+ zod_1.z
46
+ .object({
47
+ react: zod_1.z.string().min(1).optional(),
48
+ reactDom: zod_1.z.string().min(1).optional(),
49
+ })
50
+ .refine((data) => Boolean(data.react || data.reactDom), "Need to define at least one key for output.reactRequiredVersions"),
51
+ ])
52
+ .optional(),
42
53
  disableReactSharing: zod_1.z.boolean().default(false),
43
54
  reactRuntime: zod_1.z.union([zod_1.z.literal("automatic"), zod_1.z.literal("classic")]).default("classic"),
44
55
  reactCompiler: zod_1.z
@@ -53,7 +64,11 @@ const outputSchema = zod_1.z
53
64
  .record(zod_1.z.string(), zod_1.z.object({
54
65
  pathIndex: zod_1.z.string(),
55
66
  pathHtml: zod_1.z.string().optional(),
67
+ filename: zod_1.z.string().optional(),
56
68
  templateParameters: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
69
+ target: zod_1.z
70
+ .union([zod_1.z.literal("node"), zod_1.z.literal("web"), zod_1.z.literal("web-worker")])
71
+ .optional(),
57
72
  }))
58
73
  .default({}),
59
74
  })
@@ -79,7 +94,6 @@ exports.configSchema = zod_1.z.object({
79
94
  .function()
80
95
  .args(zod_1.z.custom(), zod_1.z.object({
81
96
  dev: zod_1.z.boolean(),
82
- target: zod_1.z.union([zod_1.z.literal("server"), zod_1.z.literal("client"), zod_1.z.null()]),
83
97
  watch: zod_1.z.boolean().default(false),
84
98
  }))
85
99
  .returns(zod_1.z.custom())
@@ -1 +1 @@
1
- {"version":3,"file":"configSchema.js","sourceRoot":"","sources":["../../../src/features/config-file/configSchema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAGvB,MAAM,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC7C,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IAC3D,KAAK,EAAE,OAAC;SACN,MAAM,CAAC;QACP,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;QAC7D,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;KAC7D,CAAC;SACD,OAAO,CAAC,EAAE,CAAC;IACb,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACtC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC1B,CAAC,CAAA;AAEF,MAAM,YAAY,GAAG,OAAC;KACpB,MAAM,CAAC;IACP,YAAY,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACxC,QAAQ,EAAE,OAAC;SACT,MAAM,CAAC;QACP,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACzB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC1B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC1B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC5B,CAAC;SACD,QAAQ,EAAE;IACZ,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;IACjC,mBAAmB,EAAE,OAAC;SACpB,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SAC/D,OAAO,CAAC,KAAK,CAAC;IAChB,SAAS,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACrC,UAAU,EAAE,OAAC;SACX,MAAM,EAAE;SACR,KAAK,CAAC,YAAY,CAAC;SACnB,OAAO,CAAC,KAAK,CAAC;IAChB,aAAa,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC1D,mBAAmB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAC/C,YAAY,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IACxF,aAAa,EAAE,OAAC;SACd,KAAK,CAAC;QACN,OAAC,CAAC,OAAO,EAAE;QACX,OAAC,CAAC,MAAM,CAAC;YACR,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC7B,CAAC;KACF,CAAC;SACD,QAAQ,EAAE;IACZ,WAAW,EAAE,OAAC;SACZ,MAAM,CACN,OAAC,CAAC,MAAM,EAAE,EACV,OAAC,CAAC,MAAM,CAAC;QACR,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;QACrB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,kBAAkB,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;KAC/D,CAAC,CACF;SACA,OAAO,CAAC,EAAE,CAAC;CACb,CAAC;KACD,MAAM,CACN,CAAC,IAAI,EAAE,EAAE,CACR,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,MAAM,EACrF,uFAAuF,CACvF,CAAA;AAEF,MAAM,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAChC,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAClC,cAAc,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC9C,mBAAmB,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAA;AAEW,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,WAAW,EAAE,iBAAiB,CAAC,OAAO,CAAC,EAAE,CAAC;IAC1C,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC;QAC5B,WAAW,EAAE;YACZ,KAAK,EAAE;gBACN,SAAS,EAAE,aAAa;gBACxB,QAAQ,EAAE,kBAAkB;aAC5B;SACD;KACD,CAAC;IACF,QAAQ,EAAE,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;IACpC,OAAO,EAAE,OAAC;SACR,QAAQ,EAAE;SACV,IAAI,CACJ,OAAC,CAAC,MAAM,EAAiB,EACzB,OAAC,CAAC,MAAM,CAAC;QACR,GAAG,EAAE,OAAC,CAAC,OAAO,EAAE;QAChB,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,OAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QACrE,KAAK,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;KACjC,CAAC,CACF;SACA,OAAO,CAAC,OAAC,CAAC,MAAM,EAAiB,CAAC;SAClC,QAAQ,EAAE;CACZ,CAAC,CAAA"}
1
+ {"version":3,"file":"configSchema.js","sourceRoot":"","sources":["../../../src/features/config-file/configSchema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAGvB,MAAM,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC7C,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IAC3D,KAAK,EAAE,OAAC;SACN,MAAM,CAAC;QACP,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;QAC7D,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;KAC7D,CAAC;SACD,OAAO,CAAC,EAAE,CAAC;IACb,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACtC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC1B,CAAC,CAAA;AAEF,MAAM,YAAY,GAAG,OAAC;KACpB,MAAM,CAAC;IACP,YAAY,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACxC,QAAQ,EAAE,OAAC;SACT,MAAM,CAAC;QACP,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACzB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC1B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC1B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC5B,CAAC;SACD,QAAQ,EAAE;IACZ,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;IACjC,mBAAmB,EAAE,OAAC;SACpB,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SAC/D,OAAO,CAAC,KAAK,CAAC;IAChB,SAAS,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACrC,UAAU,EAAE,OAAC;SACX,MAAM,EAAE;SACR,KAAK,CAAC,YAAY,CAAC;SACnB,OAAO,CAAC,KAAK,CAAC;IAChB,aAAa,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC1D,qBAAqB,EAAE,OAAC;SACtB,KAAK,CAAC;QACN,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACjB,OAAC;aACC,MAAM,CAAC;YACP,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YACnC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;SACtC,CAAC;aACD,MAAM,CACN,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,EAC9C,kEAAkE,CAClE;KACF,CAAC;SACD,QAAQ,EAAE;IACZ,mBAAmB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAC/C,YAAY,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IACxF,aAAa,EAAE,OAAC;SACd,KAAK,CAAC;QACN,OAAC,CAAC,OAAO,EAAE;QACX,OAAC,CAAC,MAAM,CAAC;YACR,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC7B,CAAC;KACF,CAAC;SACD,QAAQ,EAAE;IACZ,WAAW,EAAE,OAAC;SACZ,MAAM,CACN,OAAC,CAAC,MAAM,EAAE,EACV,OAAC,CAAC,MAAM,CAAC;QACR,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;QACrB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,kBAAkB,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;QAC/D,MAAM,EAAE,OAAC;aACP,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;aACrE,QAAQ,EAAE;KACZ,CAAC,CACF;SACA,OAAO,CAAC,EAAE,CAAC;CACb,CAAC;KACD,MAAM,CACN,CAAC,IAAI,EAAE,EAAE,CACR,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,MAAM,EACrF,uFAAuF,CACvF,CAAA;AAEF,MAAM,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAChC,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAClC,cAAc,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC9C,mBAAmB,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAA;AAEW,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,WAAW,EAAE,iBAAiB,CAAC,OAAO,CAAC,EAAE,CAAC;IAC1C,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC;QAC5B,WAAW,EAAE;YACZ,KAAK,EAAE;gBACN,SAAS,EAAE,aAAa;gBACxB,QAAQ,EAAE,kBAAkB;aAC5B;SACD;KACD,CAAC;IACF,QAAQ,EAAE,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;IACpC,OAAO,EAAE,OAAC;SACR,QAAQ,EAAE;SACV,IAAI,CACJ,OAAC,CAAC,MAAM,EAAiB,EACzB,OAAC,CAAC,MAAM,CAAC;QACR,GAAG,EAAE,OAAC,CAAC,OAAO,EAAE;QAChB,KAAK,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;KACjC,CAAC,CACF;SACA,OAAO,CAAC,OAAC,CAAC,MAAM,EAAiB,CAAC;SAClC,QAAQ,EAAE;CACZ,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-toolkit",
3
- "version": "4.0.0-beta.0",
3
+ "version": "4.0.0-beta.10",
4
4
  "description": "A zero-config toolchain for developing chayns® apps.",
5
5
  "keywords": [
6
6
  "chayns",
@@ -64,7 +64,6 @@
64
64
  "eslint": "^9.39.4",
65
65
  "eslint-formatter-pretty": "^6.0.1",
66
66
  "postcss-prefix-selector": "^2.1.1",
67
- "react-refresh": "^0.18.0",
68
67
  "serve-handler": "^6.1.7",
69
68
  "webpack": "^5.106.2",
70
69
  "webpack-bundle-analyzer": "^5.3.0",