@brezel/installer 1.0.0

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/dist/index.js ADDED
@@ -0,0 +1,209 @@
1
+ #!/usr/bin/env node
2
+ "use strict";var $y=Object.create;var qr=Object.defineProperty;var By=Object.getOwnPropertyDescriptor;var ky=Object.getOwnPropertyNames;var Ny=Object.getPrototypeOf,Ly=Object.prototype.hasOwnProperty;var xl=t=>{throw TypeError(t)};var jy=(t,e,r)=>e in t?qr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Uy=(t,e)=>{for(var r in e)qr(t,r,{get:e[r],enumerable:!0})},qy=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ky(e))!Ly.call(t,n)&&n!==r&&qr(t,n,{get:()=>e[n],enumerable:!(i=By(e,n))||i.enumerable});return t};var F=(t,e,r)=>(r=t!=null?$y(Ny(t)):{},qy(e||!t||!t.__esModule?qr(r,"default",{value:t,enumerable:!0}):r,t));var Oe=(t,e,r)=>jy(t,typeof e!="symbol"?e+"":e,r),kn=(t,e,r)=>e.has(t)||xl("Cannot "+r);var d=(t,e,r)=>(kn(t,e,"read from private field"),r?r.call(t):e.get(t)),S=(t,e,r)=>e.has(t)?xl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),b=(t,e,r,i)=>(kn(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r),_=(t,e,r)=>(kn(t,e,"access private method"),r);var Nn=(t,e,r,i)=>({set _(n){b(t,e,n,r)},get _(){return d(t,e,i)}});var nr=p(jn=>{"use strict";var Gr=class extends Error{constructor(e,r,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},Ln=class extends Gr{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};jn.CommanderError=Gr;jn.InvalidArgumentError=Ln});var Vr=p(qn=>{"use strict";var{InvalidArgumentError:Gy}=nr(),Un=class{constructor(e,r){switch(this.description=r||"",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,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new Gy(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,i):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Vy(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}qn.Argument=Un;qn.humanReadableArgName=Vy});var Hn=p(Vn=>{"use strict";var{humanReadableArgName:Hy}=Vr(),Gn=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 r=e.commands.filter(n=>!n._hidden),i=e._getHelpCommand();return i&&!i._hidden&&r.push(i),this.sortSubcommands&&r.sort((n,s)=>n.name().localeCompare(s.name())),r}compareOptions(e,r){let i=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return i(e).localeCompare(i(r))}visibleOptions(e){let r=e.options.filter(n=>!n.hidden),i=e._getHelpOption();if(i&&!i.hidden){let n=i.short&&e._findOption(i.short),s=i.long&&e._findOption(i.long);!n&&!s?r.push(i):i.long&&!s?r.push(e.createOption(i.long,i.description)):i.short&&!n&&r.push(e.createOption(i.short,i.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let r=[];for(let i=e.parent;i;i=i.parent){let n=i.options.filter(s=>!s.hidden);r.push(...n)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(i=>Hy(i)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(n)))),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(n)))),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let i="";for(let n=e.parent;n;n=n.parent)i=n.name()+" "+i;return i+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0){let i=`(${r.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let i=`(${r.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatItemList(e,r,i){return r.length===0?[]:[i.styleTitle(e),...r,""]}groupItems(e,r,i){let n=new Map;return e.forEach(s=>{let o=i(s);n.has(o)||n.set(o,[])}),r.forEach(s=>{let o=i(s);n.has(o)||n.set(o,[]),n.get(o).push(s)}),n}formatHelp(e,r){let i=r.padWidth(e,r),n=r.helpWidth??80;function s(h,f){return r.formatItem(h,i,f,r)}let o=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(e))}`,""],a=r.commandDescription(e);a.length>0&&(o=o.concat([r.boxWrap(r.styleCommandDescription(a),n),""]));let l=r.visibleArguments(e).map(h=>s(r.styleArgumentTerm(r.argumentTerm(h)),r.styleArgumentDescription(r.argumentDescription(h))));if(o=o.concat(this.formatItemList("Arguments:",l,r)),this.groupItems(e.options,r.visibleOptions(e),h=>h.helpGroupHeading??"Options:").forEach((h,f)=>{let m=h.map(g=>s(r.styleOptionTerm(r.optionTerm(g)),r.styleOptionDescription(r.optionDescription(g))));o=o.concat(this.formatItemList(f,m,r))}),r.showGlobalOptions){let h=r.visibleGlobalOptions(e).map(f=>s(r.styleOptionTerm(r.optionTerm(f)),r.styleOptionDescription(r.optionDescription(f))));o=o.concat(this.formatItemList("Global Options:",h,r))}return this.groupItems(e.commands,r.visibleCommands(e),h=>h.helpGroup()||"Commands:").forEach((h,f)=>{let m=h.map(g=>s(r.styleSubcommandTerm(r.subcommandTerm(g)),r.styleSubcommandDescription(r.subcommandDescription(g))));o=o.concat(this.formatItemList(f,m,r))}),o.join(`
3
+ `)}displayWidth(e){return _l(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).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(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).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,r){return Math.max(r.longestOptionTermLength(e,r),r.longestGlobalOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,r,i,n){let o=" ".repeat(2);if(!i)return o+e;let a=e.padEnd(r+e.length-n.displayWidth(e)),l=2,u=(this.helpWidth??80)-r-l-2,h;return u<this.minWidthToWrap||n.preformatted(i)?h=i:h=n.boxWrap(i,u).replace(/\n/g,`
4
+ `+" ".repeat(r+l)),o+a+" ".repeat(l)+h.replace(/\n/g,`
5
+ ${o}`)}boxWrap(e,r){if(r<this.minWidthToWrap)return e;let i=e.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,s=[];return i.forEach(o=>{let a=o.match(n);if(a===null){s.push("");return}let l=[a.shift()],c=this.displayWidth(l[0]);a.forEach(u=>{let h=this.displayWidth(u);if(c+h<=r){l.push(u),c+=h;return}s.push(l.join(""));let f=u.trimStart();l=[f],c=this.displayWidth(f)}),s.push(l.join(""))}),s.join(`
6
+ `)}};function _l(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}Vn.Help=Gn;Vn.stripColor=_l});var Kn=p(Yn=>{"use strict";var{InvalidArgumentError:Wy}=nr(),Wn=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let i=zy(e);this.short=i.shortFlag,this.long=i.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,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:!0}),this.implied=Object.assign(this.implied||{},r),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,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new Wy(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,i):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?vl(this.name().replace(/^no-/,"")):vl(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}},zn=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(e,r){let i=r.attributeName();if(!this.dualOptions.has(i))return!0;let n=this.negativeOptions.get(i).presetArg,s=n!==void 0?n:!1;return r.negate===(s===e)}};function vl(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function zy(t){let e,r,i=/^-[^-]$/,n=/^--[^-]/,s=t.split(/[ |,]+/).concat("guard");if(i.test(s[0])&&(e=s.shift()),n.test(s[0])&&(r=s.shift()),!e&&i.test(s[0])&&(e=s.shift()),!e&&n.test(s[0])&&(e=r,r=s.shift()),s[0].startsWith("-")){let o=s[0],a=`option creation failed due to '${o}' in option flags '${t}'`;throw/^-[^-][^-]/.test(o)?new Error(`${a}
7
+ - a short flag is a single dash and a single character
8
+ - either use a single dash and a single character (for a short flag)
9
+ - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):i.test(o)?new Error(`${a}
10
+ - too many short flags`):n.test(o)?new Error(`${a}
11
+ - too many long flags`):new Error(`${a}
12
+ - unrecognised flag format`)}if(e===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:r}}Yn.Option=Wn;Yn.DualOptions=zn});var Ol=p(El=>{"use strict";function Yy(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let i=0;i<=t.length;i++)r[i]=[i];for(let i=0;i<=e.length;i++)r[0][i]=i;for(let i=1;i<=e.length;i++)for(let n=1;n<=t.length;n++){let s=1;t[n-1]===e[i-1]?s=0:s=1,r[n][i]=Math.min(r[n-1][i]+1,r[n][i-1]+1,r[n-1][i-1]+s),n>1&&i>1&&t[n-1]===e[i-2]&&t[n-2]===e[i-1]&&(r[n][i]=Math.min(r[n][i],r[n-2][i-2]+1))}return r[t.length][e.length]}function Ky(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(o=>o.slice(2)));let i=[],n=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=Yy(t,o),l=Math.max(t.length,o.length);(l-a)/l>s&&(a<n?(n=a,i=[o]):a===n&&i.push(o))}),i.sort((o,a)=>o.localeCompare(a)),r&&(i=i.map(o=>`--${o}`)),i.length>1?`
13
+ (Did you mean one of ${i.join(", ")}?)`:i.length===1?`
14
+ (Did you mean ${i[0]}?)`:""}El.suggestSimilar=Ky});var Fl=p(es=>{"use strict";var Jy=require("events").EventEmitter,Jn=require("child_process"),Te=require("path"),Hr=require("fs"),O=require("process"),{Argument:Zy,humanReadableArgName:Xy}=Vr(),{CommanderError:Zn}=nr(),{Help:Qy,stripColor:e0}=Hn(),{Option:Tl,DualOptions:t0}=Kn(),{suggestSimilar:Cl}=Ol(),Xn=class t extends Jy{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:r=>O.stdout.write(r),writeErr:r=>O.stderr.write(r),outputError:(r,i)=>i(r),getOutHelpWidth:()=>O.stdout.isTTY?O.stdout.columns:void 0,getErrHelpWidth:()=>O.stderr.isTTY?O.stderr.columns:void 0,getOutHasColors:()=>Qn()??(O.stdout.isTTY&&O.stdout.hasColors?.()),getErrHasColors:()=>Qn()??(O.stderr.isTTY&&O.stderr.hasColors?.()),stripColor:r=>e0(r)},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 r=this;r;r=r.parent)e.push(r);return e}command(e,r,i){let n=r,s=i;typeof n=="object"&&n!==null&&(s=n,n=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(o);return n&&(l.description(n),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),n?this:l}createCommand(e){return new t(e)}createHelp(){return Object.assign(new Qy,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,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
15
+ - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,r){return new Zy(e,r)}argument(e,r,i,n){let s=this.createArgument(e,r);return typeof i=="function"?s.default(n).argParser(i):s.default(i),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r?.variadic)throw new Error(`only the last argument can be variadic '${r.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,r){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let i=e??"help [command]",[,n,s]=i.match(/([^ ]+) *(.*)/),o=r??"display help for command",a=this.createCommand(n);return a.helpOption(!1),s&&a.arguments(s),o&&a.description(o),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||r)&&this._initCommandGroup(a),this}addHelpCommand(e,r){return typeof e!="object"?(this.helpCommand(e,r),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,r){let i=["preSubcommand","preAction","postAction"];if(!i.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
16
+ Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,i){this._exitCallback&&this._exitCallback(new Zn(e,r,i)),O.exit(e)}action(e){let r=i=>{let n=this.registeredArguments.length,s=i.slice(0,n);return this._storeOptionsAsProperties?s[n]=this:s[n]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=r,this}createOption(e,r){return new Tl(e,r)}_callParseArg(e,r,i,n){try{return e.parseArg(r,i)}catch(s){if(s.code==="commander.invalidArgument"){let o=`${n} ${s.message}`;this.error(o,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let r=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(r){let i=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 '${i}'
17
+ - already used by option '${r.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let r=n=>[n.name()].concat(n.aliases()),i=r(e).find(n=>this._findCommand(n));if(i){let n=r(this._findCommand(i)).join("|"),s=r(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${n}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let r=e.name(),i=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(i,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(i,e.defaultValue,"default");let n=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let l=this.getOptionValue(i);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(i,s,a)};return this.on("option:"+r,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;n(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+r,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;n(s,o,"env")}),this}_optionEx(e,r,i,n,s){if(typeof r=="object"&&r instanceof Tl)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(r,i);if(o.makeOptionMandatory(!!e.mandatory),typeof n=="function")o.default(s).argParser(n);else if(n instanceof RegExp){let a=n;n=(l,c)=>{let u=a.exec(l);return u?u[0]:c},o.default(s).argParser(n)}else o.default(n);return this.addOption(o)}option(e,r,i,n){return this._optionEx({},e,r,i,n)}requiredOption(e,r,i,n){return this._optionEx({mandatory:!0},e,r,i,n)}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,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,i){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=i,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(e)!==void 0&&(r=i.getOptionValueSource(e))}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},e===void 0&&r.from===void 0){O.versions?.electron&&(r.from="electron");let n=O.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}e===void 0&&(e=O.argv),this.rawArgs=e.slice();let i;switch(r.from){case void 0:case"node":this._scriptPath=e[1],i=e.slice(2);break;case"electron":O.defaultApp?(this._scriptPath=e[1],i=e.slice(2)):i=e.slice(1);break;case"user":i=e.slice(0);break;case"eval":i=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(e,r){this._prepareForParse();let i=this._prepareUserArgs(e,r);return this._parseCommand([],i),this}async parseAsync(e,r){this._prepareForParse();let i=this._prepareUserArgs(e,r);return await this._parseCommand([],i),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.
18
+ - 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,r,i){if(Hr.existsSync(e))return;let n=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",s=`'${e}' does not exist
19
+ - if '${i}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
20
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
21
+ - ${n}`;throw new Error(s)}_executeSubCommand(e,r){r=r.slice();let i=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function s(u,h){let f=Te.resolve(u,h);if(Hr.existsSync(f))return f;if(n.includes(Te.extname(h)))return;let m=n.find(g=>Hr.existsSync(`${f}${g}`));if(m)return`${f}${m}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=Hr.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=Te.resolve(Te.dirname(u),a)}if(a){let u=s(a,o);if(!u&&!e._executableFile&&this._scriptPath){let h=Te.basename(this._scriptPath,Te.extname(this._scriptPath));h!==this._name&&(u=s(a,`${h}-${e._name}`))}o=u||o}i=n.includes(Te.extname(o));let l;O.platform!=="win32"?i?(r.unshift(o),r=Al(O.execArgv).concat(r),l=Jn.spawn(O.argv[0],r,{stdio:"inherit"})):l=Jn.spawn(o,r,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),r.unshift(o),r=Al(O.execArgv).concat(r),l=Jn.spawn(O.execPath,r,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(h=>{O.on(h,()=>{l.killed===!1&&l.exitCode===null&&l.kill(h)})});let c=this._exitCallback;l.on("close",u=>{u=u??1,c?c(new Zn(u,"commander.executeSubCommandAsync","(close)")):O.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(!c)O.exit(1);else{let h=new Zn(1,"commander.executeSubCommandAsync","(error)");h.nestedError=u,c(h)}}),this.runningCommand=l}_dispatchSubcommand(e,r,i){let n=this._findCommand(e);n||this.help({error:!0}),n._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,n,"preSubcommand"),s=this._chainOrCall(s,()=>{if(n._executableHandler)this._executeSubCommand(n,r.concat(i));else return n._parseCommand(r,i)}),s}_dispatchHelpCommand(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==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=(i,n,s)=>{let o=n;if(n!==null&&i.parseArg){let a=`error: command-argument value '${n}' is invalid for argument '${i.name()}'.`;o=this._callParseArg(i,n,s,a)}return o};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((i,n)=>{let s=i.defaultValue;i.variadic?n<this.args.length?(s=this.args.slice(n),i.parseArg&&(s=s.reduce((o,a)=>e(i,a,o),i.defaultValue))):s===void 0&&(s=[]):n<this.args.length&&(s=this.args[n],i.parseArg&&(s=e(i,s,i.defaultValue))),r[n]=s}),this.processedArgs=r}_chainOrCall(e,r){return e?.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let i=e,n=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[r]!==void 0).forEach(s=>{s._lifeCycleHooks[r].forEach(o=>{n.push({hookedCommand:s,callback:o})})}),r==="postAction"&&n.reverse(),n.forEach(s=>{i=this._chainOrCall(i,()=>s.callback(s.hookedCommand,this))}),i}_chainOrCallSubCommandHook(e,r,i){let n=e;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(s=>{n=this._chainOrCall(n,()=>s(this,r))}),n}_parseCommand(e,r){let i=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(i.operands),r=i.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){n(),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,r)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent?.listenerCount(s))n(),this._processArguments(),this.parent.emit(s,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(i=>{let n=i.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});e.filter(i=>i.conflictsWith.length>0).forEach(i=>{let n=e.find(s=>i.conflictsWith.includes(s.attributeName()));n&&this._conflictingOption(i,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let r=[],i=[],n=r;function s(u){return u.length>1&&u[0]==="-"}let o=u=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(u)?!this._getCommandAndAncestors().some(h=>h.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,a=null,l=null,c=0;for(;c<e.length||l;){let u=l??e[c++];if(l=null,u==="--"){n===i&&n.push(u),n.push(...e.slice(c));break}if(a&&(!s(u)||o(u))){this.emit(`option:${a.name()}`,u);continue}if(a=null,s(u)){let h=this._findOption(u);if(h){if(h.required){let f=e[c++];f===void 0&&this.optionMissingArgument(h),this.emit(`option:${h.name()}`,f)}else if(h.optional){let f=null;c<e.length&&(!s(e[c])||o(e[c]))&&(f=e[c++]),this.emit(`option:${h.name()}`,f)}else this.emit(`option:${h.name()}`);a=h.variadic?h:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let h=this._findOption(`-${u[1]}`);if(h){h.required||h.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${h.name()}`,u.slice(2)):(this.emit(`option:${h.name()}`),l=`-${u.slice(2)}`);continue}}if(/^--[^=]+=/.test(u)){let h=u.indexOf("="),f=this._findOption(u.slice(0,h));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,u.slice(h+1));continue}}if(n===r&&s(u)&&!(this.commands.length===0&&o(u))&&(n=i),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&i.length===0){if(this._findCommand(u)){r.push(u),i.push(...e.slice(c));break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){r.push(u,...e.slice(c));break}else if(this._defaultCommandName){i.push(u,...e.slice(c));break}}if(this._passThroughOptions){n.push(u,...e.slice(c));break}n.push(u)}return{operands:r,unknown:i}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let i=0;i<r;i++){let n=this.options[i].attributeName();e[n]=n===this._versionOptionName?this._version:this[n]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
22
+ `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
23
+ `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
24
+ `),this.outputHelp({error:!0}));let i=r||{},n=i.exitCode||1,s=i.code||"commander.error";this._exit(n,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in O.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,O.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new t0(this.options),r=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&r(i.attributeName())&&e.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(n=>!r(n)).forEach(n=>{this.setOptionValueWithSource(n,i.implied[n],"implied")})})}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let i=o=>{let a=o.attributeName(),l=this.getOptionValue(a),c=this.options.find(h=>h.negate&&a===h.attributeName()),u=this.options.find(h=>!h.negate&&a===h.attributeName());return c&&(c.presetArg===void 0&&l===!1||c.presetArg!==void 0&&l===c.presetArg)?c:u||o},n=o=>{let a=i(o),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${n(e)} cannot be used with ${n(r)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);n=n.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);r=Cl(e,n)}let i=`error: unknown option '${e}'${r}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,i=r===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${i} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(s=>{n.push(s.name()),s.alias()&&n.push(s.alias())}),r=Cl(e,n)}let i=`error: unknown command '${e}'${r}`;this.error(i,{code:"commander.unknownCommand"})}version(e,r,i){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",i=i||"output the version number";let n=this.createOption(r,i);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
25
+ `),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(e);if(i){let n=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(i=>Xy(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).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=Te.basename(e,Te.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp(),i=this._getOutputContext(e);r.prepareContext({error:i.error,helpWidth:i.helpWidth,outputHasColors:i.hasColors});let n=r.formatHelp(this,r);return i.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(e){e=e||{};let r=!!e.error,i,n,s;return r?(i=a=>this._outputConfiguration.writeErr(a),n=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(i=a=>this._outputConfiguration.writeOut(a),n=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:r,write:a=>(n||(a=this._outputConfiguration.stripColor(a)),i(a)),hasColors:n,helpWidth:s}}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let i=this._getOutputContext(e),n={error:i.error,write:i.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let s=this.helpInformation({error:i.error});if(r&&(s=r(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",n))}helpOption(e,r){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",r??"display help for command"),(e||r)&&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 r=Number(O.exitCode??0);r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
26
+ Expecting one of '${i.join("', '")}'`);let n=`${e}Help`;return this.on(n,s=>{let o;typeof r=="function"?o=r({error:s.error,command:s.command}):o=r,o&&s.write(`${o}
27
+ `)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Al(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,i="127.0.0.1",n="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?r=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=s[1],/^\d+$/.test(s[3])?n=s[3]:i=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=s[1],i=s[3],n=s[4]),r&&n!=="0"?`${r}=${i}:${parseInt(n)+1}`:e})}function Qn(){if(O.env.NO_COLOR||O.env.FORCE_COLOR==="0"||O.env.FORCE_COLOR==="false")return!1;if(O.env.FORCE_COLOR||O.env.CLICOLOR_FORCE!==void 0)return!0}es.Command=Xn;es.useColor=Qn});var Ml=p(K=>{"use strict";var{Argument:Dl}=Vr(),{Command:ts}=Fl(),{CommanderError:r0,InvalidArgumentError:Il}=nr(),{Help:i0}=Hn(),{Option:Pl}=Kn();K.program=new ts;K.createCommand=t=>new ts(t);K.createOption=(t,e)=>new Pl(t,e);K.createArgument=(t,e)=>new Dl(t,e);K.Command=ts;K.Option=Pl;K.Argument=Dl;K.Help=i0;K.CommanderError=r0;K.InvalidArgumentError=Il;K.InvalidOptionArgumentError=Il});var $=p((MC,Yl)=>{"use strict";var{FORCE_COLOR:y0,NODE_DISABLE_COLORS:w0,TERM:S0}=process.env,A={enabled:!w0&&S0!=="dumb"&&y0!=="0",reset:D(0,0),bold:D(1,22),dim:D(2,22),italic:D(3,23),underline:D(4,24),inverse:D(7,27),hidden:D(8,28),strikethrough:D(9,29),black:D(30,39),red:D(31,39),green:D(32,39),yellow:D(33,39),blue:D(34,39),magenta:D(35,39),cyan:D(36,39),white:D(37,39),gray:D(90,39),grey:D(90,39),bgBlack:D(40,49),bgRed:D(41,49),bgGreen:D(42,49),bgYellow:D(43,49),bgBlue:D(44,49),bgMagenta:D(45,49),bgCyan:D(46,49),bgWhite:D(47,49)};function zl(t,e){let r=0,i,n="",s="";for(;r<t.length;r++)i=t[r],n+=i.open,s+=i.close,e.includes(i.close)&&(e=e.replace(i.rgx,i.close+i.open));return n+e+s}function x0(t,e){let r={has:t,keys:e};return r.reset=A.reset.bind(r),r.bold=A.bold.bind(r),r.dim=A.dim.bind(r),r.italic=A.italic.bind(r),r.underline=A.underline.bind(r),r.inverse=A.inverse.bind(r),r.hidden=A.hidden.bind(r),r.strikethrough=A.strikethrough.bind(r),r.black=A.black.bind(r),r.red=A.red.bind(r),r.green=A.green.bind(r),r.yellow=A.yellow.bind(r),r.blue=A.blue.bind(r),r.magenta=A.magenta.bind(r),r.cyan=A.cyan.bind(r),r.white=A.white.bind(r),r.gray=A.gray.bind(r),r.grey=A.grey.bind(r),r.bgBlack=A.bgBlack.bind(r),r.bgRed=A.bgRed.bind(r),r.bgGreen=A.bgGreen.bind(r),r.bgYellow=A.bgYellow.bind(r),r.bgBlue=A.bgBlue.bind(r),r.bgMagenta=A.bgMagenta.bind(r),r.bgCyan=A.bgCyan.bind(r),r.bgWhite=A.bgWhite.bind(r),r}function D(t,e){let r={open:`\x1B[${t}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(i){return this!==void 0&&this.has!==void 0?(this.has.includes(t)||(this.has.push(t),this.keys.push(r)),i===void 0?this:A.enabled?zl(this.keys,i+""):i+""):i===void 0?x0([t],[r]):A.enabled?zl([r],i+""):i+""}}Yl.exports=A});var Jl=p((RC,Kl)=>{"use strict";Kl.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c"||t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(e){if(t.name==="j")return"down";if(t.name==="k")return"up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":!1}}});var Kr=p(($C,Zl)=>{"use strict";Zl.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t}});var B=p((BC,Xl)=>{"use strict";var os={to(t,e){return e?`\x1B[${e+1};${t+1}H`:`\x1B[${t+1}G`},move(t,e){let r="";return t<0?r+=`\x1B[${-t}D`:t>0&&(r+=`\x1B[${t}C`),e<0?r+=`\x1B[${-e}A`:e>0&&(r+=`\x1B[${e}B`),r},up:(t=1)=>`\x1B[${t}A`,down:(t=1)=>`\x1B[${t}B`,forward:(t=1)=>`\x1B[${t}C`,backward:(t=1)=>`\x1B[${t}D`,nextLine:(t=1)=>"\x1B[E".repeat(t),prevLine:(t=1)=>"\x1B[F".repeat(t),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},_0={up:(t=1)=>"\x1B[S".repeat(t),down:(t=1)=>"\x1B[T".repeat(t)},v0={screen:"\x1B[2J",up:(t=1)=>"\x1B[1J".repeat(t),down:(t=1)=>"\x1B[J".repeat(t),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?os.up():"");return t&&(e+=os.left),e}};Xl.exports={cursor:os,scroll:_0,erase:v0,beep:"\x07"}});var ic=p((kC,rc)=>{"use strict";function E0(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=O0(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(c){throw c},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
28
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,o=!1,a;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return s=c.done,c},e:function(c){o=!0,a=c},f:function(){try{!s&&r.return!=null&&r.return()}finally{if(o)throw a}}}}function O0(t,e){if(t){if(typeof t=="string")return Ql(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ql(t,e)}}function Ql(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}var T0=Kr(),tc=B(),ec=tc.erase,C0=tc.cursor,A0=t=>[...T0(t)].length;rc.exports=function(t,e){if(!e)return ec.line+C0.to(0);let r=0,i=t.split(/\r?\n/);var n=E0(i),s;try{for(n.s();!(s=n.n()).done;){let o=s.value;r+=1+Math.floor(Math.max(A0(o)-1,0)/e)}}catch(o){n.e(o)}finally{n.f()}return ec.lines(r)}});var as=p((NC,nc)=>{"use strict";var ar={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},F0={arrowUp:ar.arrowUp,arrowDown:ar.arrowDown,arrowLeft:ar.arrowLeft,arrowRight:ar.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},D0=process.platform==="win32"?F0:ar;nc.exports=D0});var oc=p((LC,sc)=>{"use strict";var vt=$(),nt=as(),ls=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),I0=t=>ls[t]||ls.default,lr=Object.freeze({aborted:vt.red(nt.cross),done:vt.green(nt.tick),exited:vt.yellow(nt.cross),default:vt.cyan("?")}),P0=(t,e,r)=>e?lr.aborted:r?lr.exited:t?lr.done:lr.default,M0=t=>vt.gray(t?nt.ellipsis:nt.pointerSmall),R0=(t,e)=>vt.gray(t?e?nt.pointerSmall:"+":nt.line);sc.exports={styles:ls,render:I0,symbols:lr,symbol:P0,delimiter:M0,item:R0}});var lc=p((jC,ac)=>{"use strict";var $0=Kr();ac.exports=function(t,e){let r=String($0(t)||"").split(/\r?\n/);return e?r.map(i=>Math.ceil(i.length/e)).reduce((i,n)=>i+n):r.length}});var uc=p((UC,cc)=>{"use strict";cc.exports=(t,e={})=>{let r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",i=e.width;return(t||"").split(/\r?\n/g).map(n=>n.split(/\s+/g).reduce((s,o)=>(o.length+r.length>=i||s[s.length-1].length+o.length+1<i?s[s.length-1]+=` ${o}`:s.push(`${r}${o}`),s),[r]).join(`
29
+ `)).join(`
30
+ `)}});var dc=p((qC,hc)=>{"use strict";hc.exports=(t,e,r)=>{r=r||e;let i=Math.min(e-r,t-Math.floor(r/2));i<0&&(i=0);let n=Math.min(i+r,e);return{startIndex:i,endIndex:n}}});var ee=p((GC,fc)=>{"use strict";fc.exports={action:Jl(),clear:ic(),style:oc(),strip:Kr(),figures:as(),lines:lc(),wrap:uc(),entriesToDisplay:dc()}});var Ce=p((VC,gc)=>{"use strict";var pc=require("readline"),B0=ee(),k0=B0.action,N0=require("events"),mc=B(),L0=mc.beep,j0=mc.cursor,U0=$(),cs=class extends N0{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let r=pc.createInterface({input:this.in,escapeCodeTimeout:50});pc.emitKeypressEvents(this.in,r),this.in.isTTY&&this.in.setRawMode(!0);let i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,n=(s,o)=>{let a=k0(o,i);a===!1?this._&&this._(s,o):typeof this[a]=="function"?this[a](o):this.bell()};this.close=()=>{this.out.write(j0.show),this.in.removeListener("keypress",n),this.in.isTTY&&this.in.setRawMode(!1),r.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",n)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(L0)}render(){this.onRender(U0),this.firstRender&&(this.firstRender=!1)}};gc.exports=cs});var xc=p((HC,Sc)=>{"use strict";function bc(t,e,r,i,n,s,o){try{var a=t[s](o),l=a.value}catch(c){r(c);return}a.done?e(l):Promise.resolve(l).then(i,n)}function yc(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){bc(s,i,n,o,a,"next",l)}function a(l){bc(s,i,n,o,a,"throw",l)}o(void 0)})}}var Jr=$(),q0=Ce(),wc=B(),G0=wc.erase,cr=wc.cursor,Zr=ee(),us=Zr.style,hs=Zr.clear,V0=Zr.lines,H0=Zr.figures,ds=class extends q0{constructor(e={}){super(e),this.transform=us.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=hs("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=Jr.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
31
+ `),this.close()}validate(){var e=this;return yc(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=!1),e.error=!r})()}submit(){var e=this;return yc(function*(){if(e.value=e.value||e.initial,e.cursorOffset=0,e.cursor=e.rendered.length,yield e.validate(),e.error){e.red=!0,e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write(`
32
+ `),e.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,r){let i=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor);this.value=`${i}${e}${n}`,this.red=!1,this.cursor=this.placeholder?0:i.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),r=this.value.slice(this.cursor);this.value=`${e}${r}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor+1);this.value=`${e}${r}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(cr.down(V0(this.outputError,this.out.columns)-1)+hs(this.outputError,this.out.columns)),this.out.write(hs(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[us.symbol(this.done,this.aborted),Jr.bold(this.msg),us.delimiter(this.done),this.red?Jr.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
33
+ `).reduce((e,r,i)=>e+`
34
+ ${i?" ":H0.pointerSmall} ${Jr.red().italic(r)}`,"")),this.out.write(G0.line+cr.to(0)+this.outputText+cr.save+this.outputError+cr.restore+cr.move(this.cursorOffset,0)))}};Sc.exports=ds});var Oc=p((WC,Ec)=>{"use strict";var Ae=$(),W0=Ce(),ur=ee(),_c=ur.style,vc=ur.clear,Xr=ur.figures,z0=ur.wrap,Y0=ur.entriesToDisplay,K0=B(),J0=K0.cursor,fs=class extends W0{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((r,i)=>(typeof r=="string"&&(r={title:r,value:i}),{title:r&&(r.title||r.value||r),value:r&&(r.value===void 0?i:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=vc("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
35
+ `),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
36
+ `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,r){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(J0.hide):this.out.write(vc(this.outputText,this.out.columns)),super.render();let e=Y0(this.cursor,this.choices.length,this.optionsPerPage),r=e.startIndex,i=e.endIndex;if(this.outputText=[_c.symbol(this.done,this.aborted),Ae.bold(this.msg),_c.delimiter(!1),this.done?this.selection.title:this.selection.disabled?Ae.yellow(this.warn):Ae.gray(this.hint)].join(" "),!this.done){this.outputText+=`
37
+ `;for(let n=r;n<i;n++){let s,o,a="",l=this.choices[n];n===r&&r>0?o=Xr.arrowUp:n===i-1&&i<this.choices.length?o=Xr.arrowDown:o=" ",l.disabled?(s=this.cursor===n?Ae.gray().underline(l.title):Ae.strikethrough().gray(l.title),o=(this.cursor===n?Ae.bold().gray(Xr.pointer)+" ":" ")+o):(s=this.cursor===n?Ae.cyan().underline(l.title):l.title,o=(this.cursor===n?Ae.cyan(Xr.pointer)+" ":" ")+o,l.description&&this.cursor===n&&(a=` - ${l.description}`,(o.length+s.length+a.length>=this.out.columns||l.description.split(/\r?\n/).length>1)&&(a=`
38
+ `+z0(l.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${s}${Ae.gray(a)}
39
+ `}}this.out.write(this.outputText)}};Ec.exports=fs});var Ic=p((zC,Dc)=>{"use strict";var Qr=$(),Z0=Ce(),Ac=ee(),Tc=Ac.style,X0=Ac.clear,Fc=B(),Cc=Fc.cursor,Q0=Fc.erase,ps=class extends Z0{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
40
+ `),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
41
+ `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,r){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(Cc.hide):this.out.write(X0(this.outputText,this.out.columns)),super.render(),this.outputText=[Tc.symbol(this.done,this.aborted),Qr.bold(this.msg),Tc.delimiter(this.done),this.value?this.inactive:Qr.cyan().underline(this.inactive),Qr.gray("/"),this.value?Qr.cyan().underline(this.active):this.active].join(" "),this.out.write(Q0.line+Cc.to(0)+this.outputText))}};Dc.exports=ps});var le=p((YC,Pc)=>{"use strict";var ms=class t{constructor({token:e,date:r,parts:i,locales:n}){this.token=e,this.date=r||new Date,this.parts=i||[this],this.locales=n||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((r,i)=>i>e&&r instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),r=e.indexOf(this);return e.find((i,n)=>n>r&&i instanceof t)}toString(){return String(this.date)}};Pc.exports=ms});var Rc=p((KC,Mc)=>{"use strict";var ew=le(),gs=class extends ew{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}};Mc.exports=gs});var Bc=p((JC,$c)=>{"use strict";var tw=le(),rw=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),bs=class extends tw{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),r=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+rw(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};$c.exports=bs});var Nc=p((ZC,kc)=>{"use strict";var iw=le(),ys=class extends iw{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};kc.exports=ys});var jc=p((XC,Lc)=>{"use strict";var nw=le(),ws=class extends nw{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};Lc.exports=ws});var qc=p((QC,Uc)=>{"use strict";var sw=le(),Ss=class extends sw{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};Uc.exports=Ss});var Vc=p((eA,Gc)=>{"use strict";var ow=le(),xs=class extends ow{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),r=this.token.length;return r===2?String(e+1).padStart(2,"0"):r===3?this.locales.monthsShort[e]:r===4?this.locales.months[e]:String(e+1)}};Gc.exports=xs});var Wc=p((tA,Hc)=>{"use strict";var aw=le(),_s=class extends aw{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};Hc.exports=_s});var Yc=p((rA,zc)=>{"use strict";var lw=le(),vs=class extends lw{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};zc.exports=vs});var Jc=p((iA,Kc)=>{"use strict";Kc.exports={DatePart:le(),Meridiem:Rc(),Day:Bc(),Hours:Nc(),Milliseconds:jc(),Minutes:qc(),Month:Vc(),Seconds:Wc(),Year:Yc()}});var ou=p((nA,su)=>{"use strict";function Zc(t,e,r,i,n,s,o){try{var a=t[s](o),l=a.value}catch(c){r(c);return}a.done?e(l):Promise.resolve(l).then(i,n)}function Xc(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){Zc(s,i,n,o,a,"next",l)}function a(l){Zc(s,i,n,o,a,"throw",l)}o(void 0)})}}var Es=$(),cw=Ce(),Ts=ee(),Qc=Ts.style,eu=Ts.clear,uw=Ts.figures,nu=B(),hw=nu.erase,tu=nu.cursor,Fe=Jc(),ru=Fe.DatePart,dw=Fe.Meridiem,fw=Fe.Day,pw=Fe.Hours,mw=Fe.Milliseconds,gw=Fe.Minutes,bw=Fe.Month,yw=Fe.Seconds,ww=Fe.Year,Sw=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,iu={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new fw(t),3:t=>new bw(t),4:t=>new ww(t),5:t=>new dw(t),6:t=>new pw(t),7:t=>new gw(t),8:t=>new yw(t),9:t=>new mw(t)},xw={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},Os=class extends cw{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(xw,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=eu("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let r;for(this.parts=[];r=Sw.exec(e);){let n=r.shift(),s=r.findIndex(o=>o!=null);this.parts.push(s in iu?iu[s]({token:r[s]||n,date:this.date,parts:this.parts,locales:this.locales}):r[s]||n)}let i=this.parts.reduce((n,s)=>(typeof s=="string"&&typeof n[n.length-1]=="string"?n[n.length-1]+=s:n.push(s),n),[]);this.parts.splice(0),this.parts.push(...i),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof ru)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
42
+ `),this.close()}validate(){var e=this;return Xc(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=!1),e.error=!r})()}submit(){var e=this;return Xc(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write(`
43
+ `),e.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(r=>r instanceof ru)),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(tu.hide):this.out.write(eu(this.outputText,this.out.columns)),super.render(),this.outputText=[Qc.symbol(this.done,this.aborted),Es.bold(this.msg),Qc.delimiter(!1),this.parts.reduce((e,r,i)=>e.concat(i===this.cursor&&!this.done?Es.cyan().underline(r.toString()):r),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
44
+ `).reduce((e,r,i)=>e+`
45
+ ${i?" ":uw.pointerSmall} ${Es.red().italic(r)}`,"")),this.out.write(hw.line+tu.to(0)+this.outputText))}};su.exports=Os});var fu=p((sA,du)=>{"use strict";function au(t,e,r,i,n,s,o){try{var a=t[s](o),l=a.value}catch(c){r(c);return}a.done?e(l):Promise.resolve(l).then(i,n)}function lu(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){au(s,i,n,o,a,"next",l)}function a(l){au(s,i,n,o,a,"throw",l)}o(void 0)})}}var ei=$(),_w=Ce(),hu=B(),ti=hu.cursor,vw=hu.erase,ri=ee(),Cs=ri.style,Ew=ri.figures,cu=ri.clear,Ow=ri.lines,Tw=/[0-9]/,As=t=>t!==void 0,uu=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},Fs=class extends _w{constructor(e={}){super(e),this.transform=Cs.render(e.style),this.msg=e.message,this.initial=As(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=As(e.min)?e.min:-1/0,this.max=As(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){!e&&e!==0?(this.placeholder=!0,this.rendered=ei.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${uu(e,this.round)}`),this._value=uu(e,this.round)),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||Tw.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
46
+ `),this.close()}validate(){var e=this;return lu(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=!1),e.error=!r})()}submit(){var e=this;return lu(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}let r=e.value;e.value=r!==""?r:e.initial,e.done=!0,e.aborted=!1,e.error=!1,e.fire(),e.render(),e.out.write(`
47
+ `),e.close()})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,r){if(!this.valid(e))return this.bell();let i=Date.now();if(i-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=i,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(ti.down(Ow(this.outputError,this.out.columns)-1)+cu(this.outputError,this.out.columns)),this.out.write(cu(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Cs.symbol(this.done,this.aborted),ei.bold(this.msg),Cs.delimiter(this.done),!this.done||!this.done&&!this.placeholder?ei[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
48
+ `).reduce((e,r,i)=>e+`
49
+ ${i?" ":Ew.pointerSmall} ${ei.red().italic(r)}`,"")),this.out.write(vw.line+ti.to(0)+this.outputText+ti.save+this.outputError+ti.restore))}};du.exports=Fs});var Is=p((oA,gu)=>{"use strict";var ce=$(),Cw=B(),Aw=Cw.cursor,Fw=Ce(),hr=ee(),pu=hr.clear,je=hr.figures,mu=hr.style,Dw=hr.wrap,Iw=hr.entriesToDisplay,Ds=class extends Fw{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((r,i)=>(typeof r=="string"&&(r={title:r,value:i}),{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===void 0?i:r.value),selected:r&&r.selected,disabled:r&&r.disabled})),this.clear=pu("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
50
+ `),this.close()}submit(){let e=this.value.filter(r=>r.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
51
+ `),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(r=>!r.disabled).forEach(r=>r.selected=e),this.render()}_(e,r){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
52
+ Instructions:
53
+ ${je.arrowUp}/${je.arrowDown}: Highlight option
54
+ ${je.arrowLeft}/${je.arrowRight}/[space]: Toggle selection
55
+ `+(this.maxChoices===void 0?` a: Toggle all
56
+ `:"")+" enter/return: Complete answer":""}renderOption(e,r,i,n){let s=(r.selected?ce.green(je.radioOn):je.radioOff)+" "+n+" ",o,a;return r.disabled?o=e===i?ce.gray().underline(r.title):ce.strikethrough().gray(r.title):(o=e===i?ce.cyan().underline(r.title):r.title,e===i&&r.description&&(a=` - ${r.description}`,(s.length+o.length+a.length>=this.out.columns||r.description.split(/\r?\n/).length>1)&&(a=`
57
+ `+Dw(r.description,{margin:s.length,width:this.out.columns})))),s+o+ce.gray(a||"")}paginateOptions(e){if(e.length===0)return ce.red("No matches for this query.");let r=Iw(this.cursor,e.length,this.optionsPerPage),i=r.startIndex,n=r.endIndex,s,o=[];for(let a=i;a<n;a++)a===i&&i>0?s=je.arrowUp:a===n-1&&n<e.length?s=je.arrowDown:s=" ",o.push(this.renderOption(this.cursor,e[a],a,s));return`
58
+ `+o.join(`
59
+ `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[ce.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(ce.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(Aw.hide),super.render();let e=[mu.symbol(this.done,this.aborted),ce.bold(this.msg),mu.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=ce.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=pu(e,this.out.columns)}};gu.exports=Ds});var vu=p((aA,_u)=>{"use strict";function bu(t,e,r,i,n,s,o){try{var a=t[s](o),l=a.value}catch(c){r(c);return}a.done?e(l):Promise.resolve(l).then(i,n)}function Pw(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){bu(s,i,n,o,a,"next",l)}function a(l){bu(s,i,n,o,a,"throw",l)}o(void 0)})}}var dr=$(),Mw=Ce(),xu=B(),Rw=xu.erase,yu=xu.cursor,fr=ee(),Ps=fr.style,wu=fr.clear,Ms=fr.figures,$w=fr.wrap,Bw=fr.entriesToDisplay,Su=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),kw=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),Nw=(t,e)=>{let r=t.findIndex(i=>i.value===e||i.title===e);return r>-1?r:void 0},Rs=class extends Mw{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:Nw(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=Ps.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=wu("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=Su(this.suggestions,e):this.value=this.fallback.value,this.fire()}complete(e){var r=this;return Pw(function*(){let i=r.completing=r.suggest(r.input,r.choices),n=yield i;if(r.completing!==i)return;r.suggestions=n.map((o,a,l)=>({title:kw(l,a),value:Su(l,a),description:o.description})),r.completing=!1;let s=Math.max(n.length-1,0);r.moveSelect(Math.min(s,r.select)),e&&e()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
60
+ `),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
61
+ `),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
62
+ `),this.close()}_(e,r){let i=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor);this.input=`${i}${e}${n}`,this.cursor=i.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),r=this.input.slice(this.cursor);this.input=`${e}${r}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor+1);this.input=`${e}${r}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,r,i,n){let s,o=i?Ms.arrowUp:n?Ms.arrowDown:" ",a=r?dr.cyan().underline(e.title):e.title;return o=(r?dr.cyan(Ms.pointer)+" ":" ")+o,e.description&&(s=` - ${e.description}`,(o.length+a.length+s.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(s=`
63
+ `+$w(e.description,{margin:3,width:this.out.columns}))),o+" "+a+dr.gray(s||"")}render(){if(this.closed)return;this.firstRender?this.out.write(yu.hide):this.out.write(wu(this.outputText,this.out.columns)),super.render();let e=Bw(this.select,this.choices.length,this.limit),r=e.startIndex,i=e.endIndex;if(this.outputText=[Ps.symbol(this.done,this.aborted,this.exited),dr.bold(this.msg),Ps.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let n=this.suggestions.slice(r,i).map((s,o)=>this.renderOption(s,this.select===o+r,o===0&&r>0,o+r===i-1&&i<this.choices.length)).join(`
64
+ `);this.outputText+=`
65
+ `+(n||dr.gray(this.fallback.title))}this.out.write(Rw.line+yu.to(0)+this.outputText)}};_u.exports=Rs});var Cu=p((lA,Tu)=>{"use strict";var De=$(),Lw=B(),jw=Lw.cursor,Uw=Is(),Bs=ee(),Eu=Bs.clear,Ou=Bs.style,Et=Bs.figures,$s=class extends Uw{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=Eu("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(i=>this.inputValue?!!(typeof i.title=="string"&&i.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof i.value=="string"&&i.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let r=this.filteredOptions.findIndex(i=>i===e);this.cursor=r<0?0:r,this.render()}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,r){e===" "?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
66
+ Instructions:
67
+ ${Et.arrowUp}/${Et.arrowDown}: Highlight option
68
+ ${Et.arrowLeft}/${Et.arrowRight}/[space]: Toggle selection
69
+ [a,b,c]/delete: Filter choices
70
+ enter/return: Complete answer
71
+ `:""}renderCurrentInput(){return`
72
+ Filtered results for: ${this.inputValue?this.inputValue:De.gray("Enter something to filter")}
73
+ `}renderOption(e,r,i){let n;return r.disabled?n=e===i?De.gray().underline(r.title):De.strikethrough().gray(r.title):n=e===i?De.cyan().underline(r.title):r.title,(r.selected?De.green(Et.radioOn):Et.radioOff)+" "+n}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[De.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(De.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(jw.hide),super.render();let e=[Ou.symbol(this.done,this.aborted),De.bold(this.msg),Ou.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=De.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=Eu(e,this.out.columns)}};Tu.exports=$s});var Ru=p((cA,Mu)=>{"use strict";var Au=$(),qw=Ce(),Iu=ee(),Fu=Iu.style,Gw=Iu.clear,Pu=B(),Vw=Pu.erase,Du=Pu.cursor,ks=class extends qw{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
74
+ `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
75
+ `),this.close()}_(e,r){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(Du.hide):this.out.write(Gw(this.outputText,this.out.columns)),super.render(),this.outputText=[Fu.symbol(this.done,this.aborted),Au.bold(this.msg),Fu.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Au.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(Vw.line+Du.to(0)+this.outputText))}};Mu.exports=ks});var Bu=p((uA,$u)=>{"use strict";$u.exports={TextPrompt:xc(),SelectPrompt:Oc(),TogglePrompt:Ic(),DatePrompt:ou(),NumberPrompt:fu(),MultiselectPrompt:Is(),AutocompletePrompt:vu(),AutocompleteMultiselectPrompt:Cu(),ConfirmPrompt:Ru()}});var Nu=p(ku=>{"use strict";var q=ku,Hw=Bu(),ii=t=>t;function ue(t,e,r={}){return new Promise((i,n)=>{let s=new Hw[t](e),o=r.onAbort||ii,a=r.onSubmit||ii,l=r.onExit||ii;s.on("state",e.onState||ii),s.on("submit",c=>i(a(c))),s.on("exit",c=>i(l(c))),s.on("abort",c=>n(o(c)))})}q.text=t=>ue("TextPrompt",t);q.password=t=>(t.style="password",q.text(t));q.invisible=t=>(t.style="invisible",q.text(t));q.number=t=>ue("NumberPrompt",t);q.date=t=>ue("DatePrompt",t);q.confirm=t=>ue("ConfirmPrompt",t);q.list=t=>{let e=t.separator||",";return ue("TextPrompt",t,{onSubmit:r=>r.split(e).map(i=>i.trim())})};q.toggle=t=>ue("TogglePrompt",t);q.select=t=>ue("SelectPrompt",t);q.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(i=>i.selected).map(i=>i.value);return ue("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};q.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(i=>i.selected).map(i=>i.value);return ue("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var Ww=(t,e)=>Promise.resolve(e.filter(r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));q.autocomplete=t=>(t.suggest=t.suggest||Ww,t.choices=[].concat(t.choices||[]),ue("AutocompletePrompt",t))});var Wu=p((dA,Hu)=>{"use strict";function Lu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function ju(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Lu(Object(r),!0).forEach(function(i){zw(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lu(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function zw(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Yw(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Kw(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(c){throw c},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
76
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,o=!1,a;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return s=c.done,c},e:function(c){o=!0,a=c},f:function(){try{!s&&r.return!=null&&r.return()}finally{if(o)throw a}}}}function Kw(t,e){if(t){if(typeof t=="string")return Uu(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Uu(t,e)}}function Uu(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function qu(t,e,r,i,n,s,o){try{var a=t[s](o),l=a.value}catch(c){r(c);return}a.done?e(l):Promise.resolve(l).then(i,n)}function Gu(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){qu(s,i,n,o,a,"next",l)}function a(l){qu(s,i,n,o,a,"throw",l)}o(void 0)})}}var Ns=Nu(),Jw=["suggest","format","onState","validate","onRender","type"],Vu=()=>{};function Ue(){return Ls.apply(this,arguments)}function Ls(){return Ls=Gu(function*(t=[],{onSubmit:e=Vu,onCancel:r=Vu}={}){let i={},n=Ue._override||{};t=[].concat(t);let s,o,a,l,c,u,h=(function(){var C=Gu(function*(E,R,U=!1){if(!(!U&&E.validate&&E.validate(R)!==!0))return E.format?yield E.format(R,i):R});return function(R,U){return C.apply(this,arguments)}})();var f=Yw(t),m;try{for(f.s();!(m=f.n()).done;){o=m.value;var g=o;if(l=g.name,c=g.type,typeof c=="function"&&(c=yield c(s,ju({},i),o),o.type=c),!!c){for(let C in o){if(Jw.includes(C))continue;let E=o[C];o[C]=typeof E=="function"?yield E(s,ju({},i),u):E}if(u=o,typeof o.message!="string")throw new Error("prompt message is required");var v=o;if(l=v.name,c=v.type,Ns[c]===void 0)throw new Error(`prompt type (${c}) is not defined`);if(n[o.name]!==void 0&&(s=yield h(o,n[o.name]),s!==void 0)){i[l]=s;continue}try{s=Ue._injected?Zw(Ue._injected,o.initial):yield Ns[c](o),i[l]=s=yield h(o,s,!0),a=yield e(o,s,i)}catch{a=!(yield r(o,i))}if(a)return i}}}catch(C){f.e(C)}finally{f.f()}return i}),Ls.apply(this,arguments)}function Zw(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function Xw(t){Ue._injected=(Ue._injected||[]).concat(t)}function Qw(t){Ue._override=Object.assign({},t)}Hu.exports=Object.assign(Ue,{prompt:Ue,prompts:Ns,inject:Xw,override:Qw})});var Yu=p((fA,zu)=>{"use strict";zu.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c"||t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(e){if(t.name==="j")return"down";if(t.name==="k")return"up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":!1}}});var ni=p((pA,Ku)=>{"use strict";Ku.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t}});var Xu=p((mA,Zu)=>{"use strict";var eS=ni(),{erase:Ju,cursor:tS}=B(),rS=t=>[...eS(t)].length;Zu.exports=function(t,e){if(!e)return Ju.line+tS.to(0);let r=0,i=t.split(/\r?\n/);for(let n of i)r+=1+Math.floor(Math.max(rS(n)-1,0)/e);return Ju.lines(r)}});var js=p((gA,Qu)=>{"use strict";var pr={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},iS={arrowUp:pr.arrowUp,arrowDown:pr.arrowDown,arrowLeft:pr.arrowLeft,arrowRight:pr.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},nS=process.platform==="win32"?iS:pr;Qu.exports=nS});var th=p((bA,eh)=>{"use strict";var Ot=$(),st=js(),Us=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),sS=t=>Us[t]||Us.default,mr=Object.freeze({aborted:Ot.red(st.cross),done:Ot.green(st.tick),exited:Ot.yellow(st.cross),default:Ot.cyan("?")}),oS=(t,e,r)=>e?mr.aborted:r?mr.exited:t?mr.done:mr.default,aS=t=>Ot.gray(t?st.ellipsis:st.pointerSmall),lS=(t,e)=>Ot.gray(t?e?st.pointerSmall:"+":st.line);eh.exports={styles:Us,render:sS,symbols:mr,symbol:oS,delimiter:aS,item:lS}});var ih=p((yA,rh)=>{"use strict";var cS=ni();rh.exports=function(t,e){let r=String(cS(t)||"").split(/\r?\n/);return e?r.map(i=>Math.ceil(i.length/e)).reduce((i,n)=>i+n):r.length}});var sh=p((wA,nh)=>{"use strict";nh.exports=(t,e={})=>{let r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",i=e.width;return(t||"").split(/\r?\n/g).map(n=>n.split(/\s+/g).reduce((s,o)=>(o.length+r.length>=i||s[s.length-1].length+o.length+1<i?s[s.length-1]+=` ${o}`:s.push(`${r}${o}`),s),[r]).join(`
77
+ `)).join(`
78
+ `)}});var ah=p((SA,oh)=>{"use strict";oh.exports=(t,e,r)=>{r=r||e;let i=Math.min(e-r,t-Math.floor(r/2));i<0&&(i=0);let n=Math.min(i+r,e);return{startIndex:i,endIndex:n}}});var te=p((xA,lh)=>{"use strict";lh.exports={action:Yu(),clear:Xu(),style:th(),strip:ni(),figures:js(),lines:ih(),wrap:sh(),entriesToDisplay:ah()}});var Ie=p((_A,uh)=>{"use strict";var ch=require("readline"),{action:uS}=te(),hS=require("events"),{beep:dS,cursor:fS}=B(),pS=$(),qs=class extends hS{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let r=ch.createInterface({input:this.in,escapeCodeTimeout:50});ch.emitKeypressEvents(this.in,r),this.in.isTTY&&this.in.setRawMode(!0);let i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,n=(s,o)=>{let a=uS(o,i);a===!1?this._&&this._(s,o):typeof this[a]=="function"?this[a](o):this.bell()};this.close=()=>{this.out.write(fS.show),this.in.removeListener("keypress",n),this.in.isTTY&&this.in.setRawMode(!1),r.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",n)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(dS)}render(){this.onRender(pS),this.firstRender&&(this.firstRender=!1)}};uh.exports=qs});var dh=p((vA,hh)=>{"use strict";var si=$(),mS=Ie(),{erase:gS,cursor:gr}=B(),{style:Gs,clear:Vs,lines:bS,figures:yS}=te(),Hs=class extends mS{constructor(e={}){super(e),this.transform=Gs.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=Vs("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=si.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
79
+ `),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
80
+ `),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,r){let i=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor);this.value=`${i}${e}${n}`,this.red=!1,this.cursor=this.placeholder?0:i.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),r=this.value.slice(this.cursor);this.value=`${e}${r}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor+1);this.value=`${e}${r}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(gr.down(bS(this.outputError,this.out.columns)-1)+Vs(this.outputError,this.out.columns)),this.out.write(Vs(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Gs.symbol(this.done,this.aborted),si.bold(this.msg),Gs.delimiter(this.done),this.red?si.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
81
+ `).reduce((e,r,i)=>e+`
82
+ ${i?" ":yS.pointerSmall} ${si.red().italic(r)}`,"")),this.out.write(gS.line+gr.to(0)+this.outputText+gr.save+this.outputError+gr.restore+gr.move(this.cursorOffset,0)))}};hh.exports=Hs});var gh=p((EA,mh)=>{"use strict";var Pe=$(),wS=Ie(),{style:fh,clear:ph,figures:oi,wrap:SS,entriesToDisplay:xS}=te(),{cursor:_S}=B(),Ws=class extends wS{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((r,i)=>(typeof r=="string"&&(r={title:r,value:i}),{title:r&&(r.title||r.value||r),value:r&&(r.value===void 0?i:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=ph("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
83
+ `),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
84
+ `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,r){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(_S.hide):this.out.write(ph(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=xS(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[fh.symbol(this.done,this.aborted),Pe.bold(this.msg),fh.delimiter(!1),this.done?this.selection.title:this.selection.disabled?Pe.yellow(this.warn):Pe.gray(this.hint)].join(" "),!this.done){this.outputText+=`
85
+ `;for(let i=e;i<r;i++){let n,s,o="",a=this.choices[i];i===e&&e>0?s=oi.arrowUp:i===r-1&&r<this.choices.length?s=oi.arrowDown:s=" ",a.disabled?(n=this.cursor===i?Pe.gray().underline(a.title):Pe.strikethrough().gray(a.title),s=(this.cursor===i?Pe.bold().gray(oi.pointer)+" ":" ")+s):(n=this.cursor===i?Pe.cyan().underline(a.title):a.title,s=(this.cursor===i?Pe.cyan(oi.pointer)+" ":" ")+s,a.description&&this.cursor===i&&(o=` - ${a.description}`,(s.length+n.length+o.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(o=`
86
+ `+SS(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${s} ${n}${Pe.gray(o)}
87
+ `}}this.out.write(this.outputText)}};mh.exports=Ws});var Sh=p((OA,wh)=>{"use strict";var ai=$(),vS=Ie(),{style:bh,clear:ES}=te(),{cursor:yh,erase:OS}=B(),zs=class extends vS{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
88
+ `),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
89
+ `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,r){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(yh.hide):this.out.write(ES(this.outputText,this.out.columns)),super.render(),this.outputText=[bh.symbol(this.done,this.aborted),ai.bold(this.msg),bh.delimiter(this.done),this.value?this.inactive:ai.cyan().underline(this.inactive),ai.gray("/"),this.value?ai.cyan().underline(this.active):this.active].join(" "),this.out.write(OS.line+yh.to(0)+this.outputText))}};wh.exports=zs});var he=p((TA,xh)=>{"use strict";var Ys=class t{constructor({token:e,date:r,parts:i,locales:n}){this.token=e,this.date=r||new Date,this.parts=i||[this],this.locales=n||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((r,i)=>i>e&&r instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),r=e.indexOf(this);return e.find((i,n)=>n>r&&i instanceof t)}toString(){return String(this.date)}};xh.exports=Ys});var vh=p((CA,_h)=>{"use strict";var TS=he(),Ks=class extends TS{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}};_h.exports=Ks});var Oh=p((AA,Eh)=>{"use strict";var CS=he(),AS=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),Js=class extends CS{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),r=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+AS(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};Eh.exports=Js});var Ch=p((FA,Th)=>{"use strict";var FS=he(),Zs=class extends FS{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};Th.exports=Zs});var Fh=p((DA,Ah)=>{"use strict";var DS=he(),Xs=class extends DS{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};Ah.exports=Xs});var Ih=p((IA,Dh)=>{"use strict";var IS=he(),Qs=class extends IS{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};Dh.exports=Qs});var Mh=p((PA,Ph)=>{"use strict";var PS=he(),eo=class extends PS{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),r=this.token.length;return r===2?String(e+1).padStart(2,"0"):r===3?this.locales.monthsShort[e]:r===4?this.locales.months[e]:String(e+1)}};Ph.exports=eo});var $h=p((MA,Rh)=>{"use strict";var MS=he(),to=class extends MS{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};Rh.exports=to});var kh=p((RA,Bh)=>{"use strict";var RS=he(),ro=class extends RS{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};Bh.exports=ro});var Lh=p(($A,Nh)=>{"use strict";Nh.exports={DatePart:he(),Meridiem:vh(),Day:Oh(),Hours:Ch(),Milliseconds:Fh(),Minutes:Ih(),Month:Mh(),Seconds:$h(),Year:kh()}});var Wh=p((BA,Hh)=>{"use strict";var io=$(),$S=Ie(),{style:jh,clear:Uh,figures:BS}=te(),{erase:kS,cursor:qh}=B(),{DatePart:Gh,Meridiem:NS,Day:LS,Hours:jS,Milliseconds:US,Minutes:qS,Month:GS,Seconds:VS,Year:HS}=Lh(),WS=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,Vh={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new LS(t),3:t=>new GS(t),4:t=>new HS(t),5:t=>new NS(t),6:t=>new jS(t),7:t=>new qS(t),8:t=>new VS(t),9:t=>new US(t)},zS={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},no=class extends $S{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(zS,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=Uh("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let r;for(this.parts=[];r=WS.exec(e);){let n=r.shift(),s=r.findIndex(o=>o!=null);this.parts.push(s in Vh?Vh[s]({token:r[s]||n,date:this.date,parts:this.parts,locales:this.locales}):r[s]||n)}let i=this.parts.reduce((n,s)=>(typeof s=="string"&&typeof n[n.length-1]=="string"?n[n.length-1]+=s:n.push(s),n),[]);this.parts.splice(0),this.parts.push(...i),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof Gh)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
90
+ `),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
91
+ `),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(r=>r instanceof Gh)),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(qh.hide):this.out.write(Uh(this.outputText,this.out.columns)),super.render(),this.outputText=[jh.symbol(this.done,this.aborted),io.bold(this.msg),jh.delimiter(!1),this.parts.reduce((e,r,i)=>e.concat(i===this.cursor&&!this.done?io.cyan().underline(r.toString()):r),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
92
+ `).reduce((e,r,i)=>e+`
93
+ ${i?" ":BS.pointerSmall} ${io.red().italic(r)}`,"")),this.out.write(kS.line+qh.to(0)+this.outputText))}};Hh.exports=no});var Jh=p((kA,Kh)=>{"use strict";var li=$(),YS=Ie(),{cursor:ci,erase:KS}=B(),{style:so,figures:JS,clear:zh,lines:ZS}=te(),XS=/[0-9]/,oo=t=>t!==void 0,Yh=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},ao=class extends YS{constructor(e={}){super(e),this.transform=so.render(e.style),this.msg=e.message,this.initial=oo(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=oo(e.min)?e.min:-1/0,this.max=oo(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){!e&&e!==0?(this.placeholder=!0,this.rendered=li.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${Yh(e,this.round)}`),this._value=Yh(e,this.round)),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||XS.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
94
+ `),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let e=this.value;this.value=e!==""?e:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(`
95
+ `),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,r){if(!this.valid(e))return this.bell();let i=Date.now();if(i-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=i,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(ci.down(ZS(this.outputError,this.out.columns)-1)+zh(this.outputError,this.out.columns)),this.out.write(zh(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[so.symbol(this.done,this.aborted),li.bold(this.msg),so.delimiter(this.done),!this.done||!this.done&&!this.placeholder?li[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
96
+ `).reduce((e,r,i)=>e+`
97
+ ${i?" ":JS.pointerSmall} ${li.red().italic(r)}`,"")),this.out.write(KS.line+ci.to(0)+this.outputText+ci.save+this.outputError+ci.restore))}};Kh.exports=ao});var co=p((NA,Qh)=>{"use strict";var de=$(),{cursor:QS}=B(),ex=Ie(),{clear:Zh,figures:qe,style:Xh,wrap:tx,entriesToDisplay:rx}=te(),lo=class extends ex{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((r,i)=>(typeof r=="string"&&(r={title:r,value:i}),{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===void 0?i:r.value),selected:r&&r.selected,disabled:r&&r.disabled})),this.clear=Zh("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
98
+ `),this.close()}submit(){let e=this.value.filter(r=>r.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
99
+ `),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(r=>!r.disabled).forEach(r=>r.selected=e),this.render()}_(e,r){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
100
+ Instructions:
101
+ ${qe.arrowUp}/${qe.arrowDown}: Highlight option
102
+ ${qe.arrowLeft}/${qe.arrowRight}/[space]: Toggle selection
103
+ `+(this.maxChoices===void 0?` a: Toggle all
104
+ `:"")+" enter/return: Complete answer":""}renderOption(e,r,i,n){let s=(r.selected?de.green(qe.radioOn):qe.radioOff)+" "+n+" ",o,a;return r.disabled?o=e===i?de.gray().underline(r.title):de.strikethrough().gray(r.title):(o=e===i?de.cyan().underline(r.title):r.title,e===i&&r.description&&(a=` - ${r.description}`,(s.length+o.length+a.length>=this.out.columns||r.description.split(/\r?\n/).length>1)&&(a=`
105
+ `+tx(r.description,{margin:s.length,width:this.out.columns})))),s+o+de.gray(a||"")}paginateOptions(e){if(e.length===0)return de.red("No matches for this query.");let{startIndex:r,endIndex:i}=rx(this.cursor,e.length,this.optionsPerPage),n,s=[];for(let o=r;o<i;o++)o===r&&r>0?n=qe.arrowUp:o===i-1&&i<e.length?n=qe.arrowDown:n=" ",s.push(this.renderOption(this.cursor,e[o],o,n));return`
106
+ `+s.join(`
107
+ `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[de.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(de.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(QS.hide),super.render();let e=[Xh.symbol(this.done,this.aborted),de.bold(this.msg),Xh.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=de.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=Zh(e,this.out.columns)}};Qh.exports=lo});var nd=p((LA,id)=>{"use strict";var br=$(),ix=Ie(),{erase:nx,cursor:ed}=B(),{style:uo,clear:td,figures:ho,wrap:sx,entriesToDisplay:ox}=te(),rd=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),ax=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),lx=(t,e)=>{let r=t.findIndex(i=>i.value===e||i.title===e);return r>-1?r:void 0},fo=class extends ix{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:lx(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=uo.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=td("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=rd(this.suggestions,e):this.value=this.fallback.value,this.fire()}async complete(e){let r=this.completing=this.suggest(this.input,this.choices),i=await r;if(this.completing!==r)return;this.suggestions=i.map((s,o,a)=>({title:ax(a,o),value:rd(a,o),description:s.description})),this.completing=!1;let n=Math.max(i.length-1,0);this.moveSelect(Math.min(n,this.select)),e&&e()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
108
+ `),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
109
+ `),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
110
+ `),this.close()}_(e,r){let i=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor);this.input=`${i}${e}${n}`,this.cursor=i.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),r=this.input.slice(this.cursor);this.input=`${e}${r}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor+1);this.input=`${e}${r}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,r,i,n){let s,o=i?ho.arrowUp:n?ho.arrowDown:" ",a=r?br.cyan().underline(e.title):e.title;return o=(r?br.cyan(ho.pointer)+" ":" ")+o,e.description&&(s=` - ${e.description}`,(o.length+a.length+s.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(s=`
111
+ `+sx(e.description,{margin:3,width:this.out.columns}))),o+" "+a+br.gray(s||"")}render(){if(this.closed)return;this.firstRender?this.out.write(ed.hide):this.out.write(td(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=ox(this.select,this.choices.length,this.limit);if(this.outputText=[uo.symbol(this.done,this.aborted,this.exited),br.bold(this.msg),uo.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let i=this.suggestions.slice(e,r).map((n,s)=>this.renderOption(n,this.select===s+e,s===0&&e>0,s+e===r-1&&r<this.choices.length)).join(`
112
+ `);this.outputText+=`
113
+ `+(i||br.gray(this.fallback.title))}this.out.write(nx.line+ed.to(0)+this.outputText)}};id.exports=fo});var ld=p((jA,ad)=>{"use strict";var Me=$(),{cursor:cx}=B(),ux=co(),{clear:sd,style:od,figures:Tt}=te(),po=class extends ux{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=sd("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(i=>this.inputValue?!!(typeof i.title=="string"&&i.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof i.value=="string"&&i.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let r=this.filteredOptions.findIndex(i=>i===e);this.cursor=r<0?0:r,this.render()}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,r){e===" "?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
114
+ Instructions:
115
+ ${Tt.arrowUp}/${Tt.arrowDown}: Highlight option
116
+ ${Tt.arrowLeft}/${Tt.arrowRight}/[space]: Toggle selection
117
+ [a,b,c]/delete: Filter choices
118
+ enter/return: Complete answer
119
+ `:""}renderCurrentInput(){return`
120
+ Filtered results for: ${this.inputValue?this.inputValue:Me.gray("Enter something to filter")}
121
+ `}renderOption(e,r,i){let n;return r.disabled?n=e===i?Me.gray().underline(r.title):Me.strikethrough().gray(r.title):n=e===i?Me.cyan().underline(r.title):r.title,(r.selected?Me.green(Tt.radioOn):Tt.radioOff)+" "+n}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[Me.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(Me.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(cx.hide),super.render();let e=[od.symbol(this.done,this.aborted),Me.bold(this.msg),od.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=Me.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=sd(e,this.out.columns)}};ad.exports=po});var fd=p((UA,dd)=>{"use strict";var cd=$(),hx=Ie(),{style:ud,clear:dx}=te(),{erase:fx,cursor:hd}=B(),mo=class extends hx{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
122
+ `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
123
+ `),this.close()}_(e,r){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(hd.hide):this.out.write(dx(this.outputText,this.out.columns)),super.render(),this.outputText=[ud.symbol(this.done,this.aborted),cd.bold(this.msg),ud.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:cd.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(fx.line+hd.to(0)+this.outputText))}};dd.exports=mo});var md=p((qA,pd)=>{"use strict";pd.exports={TextPrompt:dh(),SelectPrompt:gh(),TogglePrompt:Sh(),DatePrompt:Wh(),NumberPrompt:Jh(),MultiselectPrompt:co(),AutocompletePrompt:nd(),AutocompleteMultiselectPrompt:ld(),ConfirmPrompt:fd()}});var bd=p(gd=>{"use strict";var G=gd,px=md(),ui=t=>t;function fe(t,e,r={}){return new Promise((i,n)=>{let s=new px[t](e),o=r.onAbort||ui,a=r.onSubmit||ui,l=r.onExit||ui;s.on("state",e.onState||ui),s.on("submit",c=>i(a(c))),s.on("exit",c=>i(l(c))),s.on("abort",c=>n(o(c)))})}G.text=t=>fe("TextPrompt",t);G.password=t=>(t.style="password",G.text(t));G.invisible=t=>(t.style="invisible",G.text(t));G.number=t=>fe("NumberPrompt",t);G.date=t=>fe("DatePrompt",t);G.confirm=t=>fe("ConfirmPrompt",t);G.list=t=>{let e=t.separator||",";return fe("TextPrompt",t,{onSubmit:r=>r.split(e).map(i=>i.trim())})};G.toggle=t=>fe("TogglePrompt",t);G.select=t=>fe("SelectPrompt",t);G.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(i=>i.selected).map(i=>i.value);return fe("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};G.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(i=>i.selected).map(i=>i.value);return fe("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var mx=(t,e)=>Promise.resolve(e.filter(r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));G.autocomplete=t=>(t.suggest=t.suggest||mx,t.choices=[].concat(t.choices||[]),fe("AutocompletePrompt",t))});var Sd=p((VA,wd)=>{"use strict";var go=bd(),gx=["suggest","format","onState","validate","onRender","type"],yd=()=>{};async function Ge(t=[],{onSubmit:e=yd,onCancel:r=yd}={}){let i={},n=Ge._override||{};t=[].concat(t);let s,o,a,l,c,u,h=async(f,m,g=!1)=>{if(!(!g&&f.validate&&f.validate(m)!==!0))return f.format?await f.format(m,i):m};for(o of t)if({name:l,type:c}=o,typeof c=="function"&&(c=await c(s,{...i},o),o.type=c),!!c){for(let f in o){if(gx.includes(f))continue;let m=o[f];o[f]=typeof m=="function"?await m(s,{...i},u):m}if(u=o,typeof o.message!="string")throw new Error("prompt message is required");if({name:l,type:c}=o,go[c]===void 0)throw new Error(`prompt type (${c}) is not defined`);if(n[o.name]!==void 0&&(s=await h(o,n[o.name]),s!==void 0)){i[l]=s;continue}try{s=Ge._injected?bx(Ge._injected,o.initial):await go[c](o),i[l]=s=await h(o,s,!0),a=await e(o,s,i)}catch{a=!await r(o,i)}if(a)return i}return i}function bx(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function yx(t){Ge._injected=(Ge._injected||[]).concat(t)}function wx(t){Ge._override=Object.assign({},t)}wd.exports=Object.assign(Ge,{prompt:Ge,prompts:go,inject:yx,override:wx})});var _d=p((HA,xd)=>{"use strict";function Sx(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let e=0,r=process.versions.node.split(".").map(Number);for(;e<t.length;e++){if(r[e]>t[e])return!1;if(t[e]>r[e])return!0}return!1}xd.exports=Sx("8.6.0")?Wu():Sd()});var hf=p((fD,uf)=>{"use strict";uf.exports=cf;cf.sync=f_;var af=require("fs");function d_(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var i=0;i<r.length;i++){var n=r[i].toLowerCase();if(n&&t.substr(-n.length).toLowerCase()===n)return!0}return!1}function lf(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:d_(e,r)}function cf(t,e,r){af.stat(t,function(i,n){r(i,i?!1:lf(n,t,e))})}function f_(t,e){return lf(af.statSync(t),t,e)}});var gf=p((pD,mf)=>{"use strict";mf.exports=ff;ff.sync=p_;var df=require("fs");function ff(t,e,r){df.stat(t,function(i,n){r(i,i?!1:pf(n,e))})}function p_(t,e){return pf(df.statSync(t),e)}function pf(t,e){return t.isFile()&&m_(t,e)}function m_(t,e){var r=t.mode,i=t.uid,n=t.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,h=r&c||r&l&&n===o||r&a&&i===s||r&u&&s===0;return h}});var yf=p((gD,bf)=>{"use strict";var mD=require("fs"),Ei;process.platform==="win32"||global.TESTING_WINDOWS?Ei=hf():Ei=gf();bf.exports=Co;Co.sync=g_;function Co(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){Co(t,e||{},function(s,o){s?n(s):i(o)})})}Ei(t,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),r(i,n)})}function g_(t,e){try{return Ei.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Of=p((bD,Ef)=>{"use strict";var Dt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",wf=require("path"),b_=Dt?";":":",Sf=yf(),xf=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),_f=(t,e)=>{let r=e.colon||b_,i=t.match(/\//)||Dt&&t.match(/\\/)?[""]:[...Dt?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],n=Dt?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Dt?n.split(r):[""];return Dt&&t.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},vf=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=_f(t,e),o=[],a=c=>new Promise((u,h)=>{if(c===i.length)return e.all&&o.length?u(o):h(xf(t));let f=i[c],m=/^".*"$/.test(f)?f.slice(1,-1):f,g=wf.join(m,t),v=!m&&/^\.[\\\/]/.test(t)?t.slice(0,2)+g:g;u(l(v,c,0))}),l=(c,u,h)=>new Promise((f,m)=>{if(h===n.length)return f(a(u+1));let g=n[h];Sf(c+g,{pathExt:s},(v,C)=>{if(!v&&C)if(e.all)o.push(c+g);else return f(c+g);return f(l(c,u,h+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},y_=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:i,pathExtExe:n}=_f(t,e),s=[];for(let o=0;o<r.length;o++){let a=r[o],l=/^".*"$/.test(a)?a.slice(1,-1):a,c=wf.join(l,t),u=!l&&/^\.[\\\/]/.test(t)?t.slice(0,2)+c:c;for(let h=0;h<i.length;h++){let f=u+i[h];try{if(Sf.sync(f,{pathExt:n}))if(e.all)s.push(f);else return f}catch{}}}if(e.all&&s.length)return s;if(e.nothrow)return null;throw xf(t)};Ef.exports=vf;vf.sync=y_});var Cf=p((yD,Ao)=>{"use strict";var Tf=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};Ao.exports=Tf;Ao.exports.default=Tf});var If=p((wD,Df)=>{"use strict";var Af=require("path"),w_=Of(),S_=Cf();function Ff(t,e){let r=t.options.env||process.env,i=process.cwd(),n=t.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(t.options.cwd)}catch{}let o;try{o=w_.sync(t.command,{path:r[S_({env:r})],pathExt:e?Af.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=Af.resolve(n?t.options.cwd:"",o)),o}function x_(t){return Ff(t)||Ff(t,!0)}Df.exports=x_});var Pf=p((SD,Do)=>{"use strict";var Fo=/([()\][%!^"`<>&|;, *?])/g;function __(t){return t=t.replace(Fo,"^$1"),t}function v_(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(Fo,"^$1"),e&&(t=t.replace(Fo,"^$1")),t}Do.exports.command=__;Do.exports.argument=v_});var Rf=p((xD,Mf)=>{"use strict";Mf.exports=/^#!(.*)/});var Bf=p((_D,$f)=>{"use strict";var E_=Rf();$f.exports=(t="")=>{let e=t.match(E_);if(!e)return null;let[r,i]=e[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var Nf=p((vD,kf)=>{"use strict";var Io=require("fs"),O_=Bf();function T_(t){let r=Buffer.alloc(150),i;try{i=Io.openSync(t,"r"),Io.readSync(i,r,0,150,0),Io.closeSync(i)}catch{}return O_(r.toString())}kf.exports=T_});var qf=p((ED,Uf)=>{"use strict";var C_=require("path"),Lf=If(),jf=Pf(),A_=Nf(),F_=process.platform==="win32",D_=/\.(?:com|exe)$/i,I_=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function P_(t){t.file=Lf(t);let e=t.file&&A_(t.file);return e?(t.args.unshift(t.file),t.command=e,Lf(t)):t.file}function M_(t){if(!F_)return t;let e=P_(t),r=!D_.test(e);if(t.options.forceShell||r){let i=I_.test(e);t.command=C_.normalize(t.command),t.command=jf.command(t.command),t.args=t.args.map(s=>jf.argument(s,i));let n=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${n}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function R_(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let i={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?i:M_(i)}Uf.exports=R_});var Hf=p((OD,Vf)=>{"use strict";var Po=process.platform==="win32";function Mo(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function $_(t,e){if(!Po)return;let r=t.emit;t.emit=function(i,n){if(i==="exit"){let s=Gf(n,e);if(s)return r.call(t,"error",s)}return r.apply(t,arguments)}}function Gf(t,e){return Po&&t===1&&!e.file?Mo(e.original,"spawn"):null}function B_(t,e){return Po&&t===1&&!e.file?Mo(e.original,"spawnSync"):null}Vf.exports={hookChildProcess:$_,verifyENOENT:Gf,verifyENOENTSync:B_,notFoundError:Mo}});var Yf=p((TD,It)=>{"use strict";var Wf=require("child_process"),Ro=qf(),$o=Hf();function zf(t,e,r){let i=Ro(t,e,r),n=Wf.spawn(i.command,i.args,i.options);return $o.hookChildProcess(n,i),n}function k_(t,e,r){let i=Ro(t,e,r),n=Wf.spawnSync(i.command,i.args,i.options);return n.error=n.error||$o.verifyENOENTSync(n.status,i),n}It.exports=zf;It.exports.spawn=zf;It.exports.sync=k_;It.exports._parse=Ro;It.exports._enoent=$o});var Rl=F(Ml(),1),{program:dC,createCommand:fC,createArgument:pC,createOption:mC,CommanderError:gC,InvalidArgumentError:bC,InvalidOptionArgumentError:yC,Command:$l,Argument:wC,Option:SC,Help:xC}=Rl.default;var Bl=(t=0)=>e=>`\x1B[${e+t}m`,kl=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Nl=(t=0)=>(e,r,i)=>`\x1B[${38+t};2;${e};${r};${i}m`,P={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]}},vC=Object.keys(P.modifier),n0=Object.keys(P.color),s0=Object.keys(P.bgColor),EC=[...n0,...s0];function o0(){let t=new Map;for(let[e,r]of Object.entries(P)){for(let[i,n]of Object.entries(r))P[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=P[i],t.set(n[0],n[1]);Object.defineProperty(P,e,{value:r,enumerable:!1})}return Object.defineProperty(P,"codes",{value:t,enumerable:!1}),P.color.close="\x1B[39m",P.bgColor.close="\x1B[49m",P.color.ansi=Bl(),P.color.ansi256=kl(),P.color.ansi16m=Nl(),P.bgColor.ansi=Bl(10),P.bgColor.ansi256=kl(10),P.bgColor.ansi16m=Nl(10),Object.defineProperties(P,{rgbToAnsi256:{value(e,r,i){return e===r&&r===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(s=>s+s).join(""));let n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:e=>P.rgbToAnsi256(...P.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,i,n;if(e>=232)r=((e-232)*10+8)/255,i=r,n=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,i=Math.floor(a/6)/5,n=a%6/5}let s=Math.max(r,i,n)*2;if(s===0)return 30;let o=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,r,i)=>P.ansi256ToAnsi(P.rgbToAnsi256(e,r,i)),enumerable:!1},hexToAnsi:{value:e=>P.ansi256ToAnsi(P.hexToAnsi256(e)),enumerable:!1}}),P}var a0=o0(),Q=a0;var zr=F(require("process"),1),jl=F(require("os"),1),rs=F(require("tty"),1);function J(t,e=globalThis.Deno?globalThis.Deno.args:zr.default.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",i=e.indexOf(r+t),n=e.indexOf("--");return i!==-1&&(n===-1||i<n)}var{env:M}=zr.default,Wr;J("no-color")||J("no-colors")||J("color=false")||J("color=never")?Wr=0:(J("color")||J("colors")||J("color=true")||J("color=always"))&&(Wr=1);function l0(){if("FORCE_COLOR"in M)return M.FORCE_COLOR==="true"?1:M.FORCE_COLOR==="false"?0:M.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(M.FORCE_COLOR,10),3)}function c0(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function u0(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let i=l0();i!==void 0&&(Wr=i);let n=r?Wr:i;if(n===0)return 0;if(r){if(J("color=16m")||J("color=full")||J("color=truecolor"))return 3;if(J("color=256"))return 2}if("TF_BUILD"in M&&"AGENT_NAME"in M)return 1;if(t&&!e&&n===void 0)return 0;let s=n||0;if(M.TERM==="dumb")return s;if(zr.default.platform==="win32"){let o=jl.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in M)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in M)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in M)||M.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in M)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(M.TEAMCITY_VERSION)?1:0;if(M.COLORTERM==="truecolor"||M.TERM==="xterm-kitty"||M.TERM==="xterm-ghostty"||M.TERM==="wezterm")return 3;if("TERM_PROGRAM"in M){let o=Number.parseInt((M.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(M.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(M.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(M.TERM)||"COLORTERM"in M?1:s}function Ll(t,e={}){let r=u0(t,{streamIsTTY:t&&t.isTTY,...e});return c0(r)}var h0={stdout:Ll({isTTY:rs.default.isatty(1)}),stderr:Ll({isTTY:rs.default.isatty(2)})},Ul=h0;function ql(t,e,r){let i=t.indexOf(e);if(i===-1)return t;let n=e.length,s=0,o="";do o+=t.slice(s,i)+e+r,s=i+n,i=t.indexOf(e,s);while(i!==-1);return o+=t.slice(s),o}function Gl(t,e,r,i){let n=0,s="";do{let o=t[i-1]==="\r";s+=t.slice(n,o?i-1:i)+e+(o?`\r
124
+ `:`
125
+ `)+r,n=i+1,i=t.indexOf(`
126
+ `,n)}while(i!==-1);return s+=t.slice(n),s}var{stdout:Vl,stderr:Hl}=Ul,is=Symbol("GENERATOR"),xt=Symbol("STYLER"),sr=Symbol("IS_EMPTY"),Wl=["ansi","ansi","ansi256","ansi16m"],_t=Object.create(null),d0=(t,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 r=Vl?Vl.level:0;t.level=e.level===void 0?r:e.level};var f0=t=>{let e=(...r)=>r.join(" ");return d0(e,t),Object.setPrototypeOf(e,or.prototype),e};function or(t){return f0(t)}Object.setPrototypeOf(or.prototype,Function.prototype);for(let[t,e]of Object.entries(Q))_t[t]={get(){let r=Yr(this,ss(e.open,e.close,this[xt]),this[sr]);return Object.defineProperty(this,t,{value:r}),r}};_t.visible={get(){let t=Yr(this,this[xt],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var ns=(t,e,r,...i)=>t==="rgb"?e==="ansi16m"?Q[r].ansi16m(...i):e==="ansi256"?Q[r].ansi256(Q.rgbToAnsi256(...i)):Q[r].ansi(Q.rgbToAnsi(...i)):t==="hex"?ns("rgb",e,r,...Q.hexToRgb(...i)):Q[r][t](...i),p0=["rgb","hex","ansi256"];for(let t of p0){_t[t]={get(){let{level:r}=this;return function(...i){let n=ss(ns(t,Wl[r],"color",...i),Q.color.close,this[xt]);return Yr(this,n,this[sr])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);_t[e]={get(){let{level:r}=this;return function(...i){let n=ss(ns(t,Wl[r],"bgColor",...i),Q.bgColor.close,this[xt]);return Yr(this,n,this[sr])}}}}var m0=Object.defineProperties(()=>{},{..._t,level:{enumerable:!0,get(){return this[is].level},set(t){this[is].level=t}}}),ss=(t,e,r)=>{let i,n;return r===void 0?(i=t,n=e):(i=r.openAll+t,n=e+r.closeAll),{open:t,close:e,openAll:i,closeAll:n,parent:r}},Yr=(t,e,r)=>{let i=(...n)=>g0(i,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(i,m0),i[is]=t,i[xt]=e,i[sr]=r,i},g0=(t,e)=>{if(t.level<=0||!e)return t[sr]?"":e;let r=t[xt];if(r===void 0)return e;let{openAll:i,closeAll:n}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=ql(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
127
+ `);return s!==-1&&(e=Gl(e,n,i,s)),i+e+n};Object.defineProperties(or.prototype,_t);var b0=or(),IC=or({level:Hl?Hl.level:0});var T=b0;var Ry=F(_d());function L(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}var vd=require("url"),Ct=(t,e)=>{let r=yo(xx(t));if(typeof r!="string")throw new TypeError(`${e} must be a string or a file URL: ${r}.`);return r},xx=t=>bo(t)?t.toString():t,bo=t=>typeof t!="string"&&t&&Object.getPrototypeOf(t)===String.prototype,yo=t=>t instanceof URL?(0,vd.fileURLToPath)(t):t;var hi=(t,e=[],r={})=>{let i=Ct(t,"First argument"),[n,s]=L(e)?[[],e]:[e,r];if(!Array.isArray(n))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${n}`);if(n.some(l=>typeof l=="object"&&l!==null))throw new TypeError(`Second argument must be an array of strings: ${n}`);let o=n.map(String),a=o.find(l=>l.includes("\0"));if(a!==void 0)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!L(s))throw new TypeError(`Last argument must be an options object: ${s}`);return[i,o,s]};var Pd=require("child_process");var Ed=require("string_decoder"),{toString:Od}=Object.prototype,Td=t=>Od.call(t)==="[object ArrayBuffer]",j=t=>Od.call(t)==="[object Uint8Array]",Re=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength),_x=new TextEncoder,Cd=t=>_x.encode(t),vx=new TextDecoder,di=t=>vx.decode(t),Ad=(t,e)=>Ex(t,e).join(""),Ex=(t,e)=>{if(e==="utf8"&&t.every(s=>typeof s=="string"))return t;let r=new Ed.StringDecoder(e),i=t.map(s=>typeof s=="string"?Cd(s):s).map(s=>r.write(s)),n=r.end();return n===""?i:[...i,n]},yr=t=>t.length===1&&j(t[0])?t[0]:wo(Ox(t)),Ox=t=>t.map(e=>typeof e=="string"?Cd(e):e),wo=t=>{let e=new Uint8Array(Tx(t)),r=0;for(let i of t)e.set(i,r),r+=i.length;return e},Tx=t=>{let e=0;for(let r of t)e+=r.length;return e};var Md=t=>Array.isArray(t)&&Array.isArray(t.raw),Rd=(t,e)=>{let r=[];for(let[s,o]of t.entries())r=Cx({templates:t,expressions:e,tokens:r,index:s,template:o});if(r.length===0)throw new TypeError("Template script must not be empty");let[i,...n]=r;return[i,n,{}]},Cx=({templates:t,expressions:e,tokens:r,index:i,template:n})=>{if(n===void 0)throw new TypeError(`Invalid backslash sequence: ${t.raw[i]}`);let{nextTokens:s,leadingWhitespaces:o,trailingWhitespaces:a}=Ax(n,t.raw[i]),l=Dd(r,s,o);if(i===e.length)return l;let c=e[i],u=Array.isArray(c)?c.map(h=>Id(h)):[Id(c)];return Dd(l,u,a)},Ax=(t,e)=>{if(e.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let r=[],i=0,n=Fd.has(e[0]);for(let o=0,a=0;o<t.length;o+=1,a+=1){let l=e[a];if(Fd.has(l))i!==o&&r.push(t.slice(i,o)),i=o+1;else if(l==="\\"){let c=e[a+1];c===`
128
+ `?(o-=1,a+=1):c==="u"&&e[a+2]==="{"?a=e.indexOf("}",a+3):a+=Fx[c]??1}}let s=i===t.length;return s||r.push(t.slice(i)),{nextTokens:r,leadingWhitespaces:n,trailingWhitespaces:s}},Fd=new Set([" "," ","\r",`
129
+ `]),Fx={x:3,u:5},Dd=(t,e,r)=>r||t.length===0||e.length===0?[...t,...e]:[...t.slice(0,-1),`${t.at(-1)}${e[0]}`,...e.slice(1)],Id=t=>{let e=typeof t;if(e==="string")return t;if(e==="number")return String(t);if(L(t)&&("stdout"in t||"isMaxBuffer"in t))return Dx(t);throw t instanceof Pd.ChildProcess||Object.prototype.toString.call(t)==="[object Promise]"?new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}."):new TypeError(`Unexpected "${e}" in template expression`)},Dx=({stdout:t})=>{if(typeof t=="string")return t;if(j(t))return di(t);throw t===void 0?new TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`):new TypeError(`Unexpected "${typeof t}" stdout in template expression`)};var Zg=require("child_process");var Bd=require("util");var fi=F(require("process"),1),re=t=>pi.includes(t),pi=[fi.default.stdin,fi.default.stdout,fi.default.stderr],Z=["stdin","stdout","stderr"],mi=t=>Z[t]??`stdio[${t}]`;var kd=t=>{let e={...t};for(let r of _o)e[r]=So(t,r);return e},So=(t,e)=>{let r=Array.from({length:Ix(t)+1}),i=Px(t[e],r,e);return kx(i,e)},Ix=({stdio:t})=>Array.isArray(t)?Math.max(t.length,Z.length):Z.length,Px=(t,e,r)=>L(t)?Mx(t,e,r):e.fill(t),Mx=(t,e,r)=>{for(let i of Object.keys(t).sort(Rx))for(let n of $x(i,r,e))e[n]=t[i];return e},Rx=(t,e)=>$d(t)<$d(e)?1:-1,$d=t=>t==="stdout"||t==="stderr"?0:t==="all"?2:1,$x=(t,e,r)=>{if(t==="ipc")return[r.length-1];let i=xo(t);if(i===void 0||i===0)throw new TypeError(`"${e}.${t}" is invalid.
130
+ It must be "${e}.stdout", "${e}.stderr", "${e}.all", "${e}.ipc", or "${e}.fd3", "${e}.fd4" (and so on).`);if(i>=r.length)throw new TypeError(`"${e}.${t}" is invalid: that file descriptor does not exist.
131
+ Please set the "stdio" option to ensure that file descriptor exists.`);return i==="all"?[1,2]:[i]},xo=t=>{if(t==="all")return t;if(Z.includes(t))return Z.indexOf(t);let e=Bx.exec(t);if(e!==null)return Number(e[1])},Bx=/^fd(\d+)$/,kx=(t,e)=>t.map(r=>r===void 0?Lx[e]:r),Nx=(0,Bd.debuglog)("execa").enabled?"full":"none",Lx={lines:!1,buffer:!0,maxBuffer:1e3*1e3*100,verbose:Nx,stripFinalNewline:!0},_o=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],$e=(t,e)=>e==="ipc"?t.at(-1):t[e];var At=({verbose:t},e)=>vo(t,e)!=="none",Ft=({verbose:t},e)=>!["none","short"].includes(vo(t,e)),Nd=({verbose:t},e)=>{let r=vo(t,e);return gi(r)?r:void 0},vo=(t,e)=>e===void 0?jx(t):$e(t,e),jx=t=>t.find(e=>gi(e))??bi.findLast(e=>t.includes(e)),gi=t=>typeof t=="function",bi=["none","short","full"];var nf=require("util");var Ld=require("process"),jd=require("util"),Ud=(t,e)=>{let r=[t,...e],i=r.join(" "),n=r.map(s=>Wx(qd(s))).join(" ");return{command:i,escapedCommand:n}},wr=t=>(0,jd.stripVTControlCharacters)(t).split(`
132
+ `).map(e=>qd(e)).join(`
133
+ `),qd=t=>t.replaceAll(Gx,e=>Ux(e)),Ux=t=>{let e=Vx[t];if(e!==void 0)return e;let r=t.codePointAt(0),i=r.toString(16);return r<=Hx?`\\u${i.padStart(4,"0")}`:`\\U${i}`},qx=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},Gx=qx(),Vx={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},Hx=65535,Wx=t=>zx.test(t)?t:Ld.platform==="win32"?`"${t.replaceAll('"','""')}"`:`'${t.replaceAll("'","'\\''")}'`,zx=/^[\w./-]+$/;var Eo=F(require("process"),1);function ot(){let{env:t}=Eo.default,{TERM:e,TERM_PROGRAM:r}=t;return Eo.default.platform!=="win32"?e!=="linux":!!t.WT_SESSION||!!t.TERMINUS_SUBLIME||t.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||e==="xterm-256color"||e==="alacritty"||e==="rxvt-unicode"||e==="rxvt-unicode-256color"||t.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Gd={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},Vd={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},Yx={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Kx={...Gd,...Vd},Jx={...Gd,...Yx},Zx=ot(),Xx=Zx?Kx:Jx,yi=Xx,uF=Object.entries(Vd);var Hd=F(require("tty"),1),Qx=Hd.default?.WriteStream?.prototype?.hasColors?.()??!1,x=(t,e)=>{if(!Qx)return n=>n;let r=`\x1B[${t}m`,i=`\x1B[${e}m`;return n=>{let s=n+"",o=s.indexOf(i);if(o===-1)return r+s+i;let a=r,l=0,u=(e===22?i:"")+r;for(;o!==-1;)a+=s.slice(l,o)+u,l=o+i.length,o=s.indexOf(i,l);return a+=s.slice(l)+i,a}},dF=x(0,0),Wd=x(1,22),fF=x(2,22),pF=x(3,23),mF=x(4,24),gF=x(53,55),bF=x(7,27),yF=x(8,28),wF=x(9,29),SF=x(30,39),zd=x(31,39),Yd=x(32,39),Kd=x(33,39),Jd=x(34,39),xF=x(35,39),_F=x(36,39),vF=x(37,39),wi=x(90,39),EF=x(40,49),OF=x(41,49),TF=x(42,49),CF=x(43,49),AF=x(44,49),FF=x(45,49),DF=x(46,49),IF=x(47,49),PF=x(100,49),Zd=x(91,39),MF=x(92,39),Xd=x(93,39),RF=x(94,39),$F=x(95,39),BF=x(96,39),kF=x(97,39),NF=x(101,49),LF=x(102,49),jF=x(103,49),UF=x(104,49),qF=x(105,49),GF=x(106,49),VF=x(107,49);var tf=({type:t,message:e,timestamp:r,piped:i,commandId:n,result:{failed:s=!1}={},options:{reject:o=!0}})=>{let a=e_(r),l=t_[t]({failed:s,reject:o,piped:i}),c=r_[t]({reject:o});return`${wi(`[${a}]`)} ${wi(`[${n}]`)} ${c(l)} ${c(e)}`},e_=t=>`${Si(t.getHours(),2)}:${Si(t.getMinutes(),2)}:${Si(t.getSeconds(),2)}.${Si(t.getMilliseconds(),3)}`,Si=(t,e)=>String(t).padStart(e,"0"),Qd=({failed:t,reject:e})=>t?e?yi.cross:yi.warning:yi.tick,t_={command:({piped:t})=>t?"|":"$",output:()=>" ",ipc:()=>"*",error:Qd,duration:Qd},ef=t=>t,r_={command:()=>Wd,output:()=>ef,ipc:()=>ef,error:({reject:t})=>t?Zd:Xd,duration:()=>wi};var rf=(t,e,r)=>{let i=Nd(e,r);return t.map(({verboseLine:n,verboseObject:s})=>i_(n,s,i)).filter(n=>n!==void 0).map(n=>n_(n)).join("")},i_=(t,e,r)=>{if(r===void 0)return t;let i=r(t,e);if(typeof i=="string")return i},n_=t=>t.endsWith(`
134
+ `)?t:`${t}
135
+ `;var pe=({type:t,verboseMessage:e,fdNumber:r,verboseInfo:i,result:n})=>{let s=s_({type:t,result:n,verboseInfo:i}),o=o_(e,s),a=rf(o,i,r);a!==""&&console.warn(a.slice(0,-1))},s_=({type:t,result:e,verboseInfo:{escapedCommand:r,commandId:i,rawOptions:{piped:n=!1,...s}}})=>({type:t,escapedCommand:r,commandId:`${i}`,timestamp:new Date,piped:n,result:e,options:s}),o_=(t,e)=>t.split(`
136
+ `).map(r=>a_({...e,message:r})),a_=t=>({verboseLine:tf(t),verboseObject:t}),xi=t=>{let e=typeof t=="string"?t:(0,nf.inspect)(t);return wr(e).replaceAll(" "," ".repeat(l_))},l_=2;var sf=(t,e)=>{At(e)&&pe({type:"command",verboseMessage:t,verboseInfo:e})};var of=(t,e,r)=>{h_(t);let i=c_(t);return{verbose:t,escapedCommand:e,commandId:i,rawOptions:r}},c_=t=>At({verbose:t})?u_++:void 0,u_=0n,h_=t=>{for(let e of t){if(e===!1)throw new TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(e===!0)throw new TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!bi.includes(e)&&!gi(e)){let r=bi.map(i=>`'${i}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${e}. Allowed values are: ${r} or a function.`)}}};var Oo=require("process"),_i=()=>Oo.hrtime.bigint(),To=t=>Number(Oo.hrtime.bigint()-t)/1e6;var vi=(t,e,r)=>{let i=_i(),{command:n,escapedCommand:s}=Ud(t,e),o=So(r,"verbose"),a=of(o,s,{...r});return sf(s,a),{command:n,escapedCommand:s,startTime:i,verboseInfo:a}};var Sm=F(require("path"),1),Jo=F(require("process"),1),xm=F(Yf(),1);var Sr=F(require("process"),1),Ve=F(require("path"),1);function Oi(t={}){let{env:e=process.env,platform:r=process.platform}=t;return r!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"}var Kf=require("util"),ko=require("child_process"),Bo=F(require("path"),1),Jf=require("url"),AD=(0,Kf.promisify)(ko.execFile);function Ti(t){return t instanceof URL?(0,Jf.fileURLToPath)(t):t}function Zf(t){return{*[Symbol.iterator](){let e=Bo.default.resolve(Ti(t)),r;for(;r!==e;)yield e,r=e,e=Bo.default.resolve(e,"..")}}}var FD=10*1024*1024;var N_=({cwd:t=Sr.default.cwd(),path:e=Sr.default.env[Oi()],preferLocal:r=!0,execPath:i=Sr.default.execPath,addExecPath:n=!0}={})=>{let s=Ve.default.resolve(Ti(t)),o=[],a=e.split(Ve.default.delimiter);return r&&L_(o,a,s),n&&j_(o,a,i,s),e===""||e===Ve.default.delimiter?`${o.join(Ve.default.delimiter)}${e}`:[...o,e].join(Ve.default.delimiter)},L_=(t,e,r)=>{for(let i of Zf(r)){let n=Ve.default.join(i,"node_modules/.bin");e.includes(n)||t.push(n)}},j_=(t,e,r,i)=>{let n=Ve.default.resolve(i,Ti(r),"..");e.includes(n)||t.push(n)},Xf=({env:t=Sr.default.env,...e}={})=>{t={...t};let r=Oi({env:t});return e.path=t[r],t[r]=N_(e),t};var pp=require("timers/promises");var Qf=(t,e,r)=>{let i=r?_r:xr,n=t instanceof ie?{}:{cause:t};return new i(e,n)},ie=class extends Error{},ep=(t,e)=>{Object.defineProperty(t.prototype,"name",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,rp,{value:!0,writable:!1,enumerable:!1,configurable:!1})},tp=t=>Ci(t)&&rp in t,rp=Symbol("isExecaError"),Ci=t=>Object.prototype.toString.call(t)==="[object Error]",xr=class extends Error{};ep(xr,xr.name);var _r=class extends Error{};ep(_r,_r.name);var Pt=require("os");var lp=require("os");var ip=()=>{let t=sp-np+1;return Array.from({length:t},U_)},U_=(t,e)=>({name:`SIGRT${e+1}`,number:np+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),np=34,sp=64;var ap=require("os");var op=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var No=()=>{let t=ip();return[...op,...t].map(q_)},q_=({name:t,number:e,description:r,action:i,forced:n=!1,standard:s})=>{let{signals:{[t]:o}}=ap.constants,a=o!==void 0;return{name:t,number:a?o:e,description:r,supported:a,action:i,forced:n,standard:s}};var G_=()=>{let t=No();return Object.fromEntries(t.map(V_))},V_=({name:t,number:e,description:r,supported:i,action:n,forced:s,standard:o})=>[t,{name:t,number:e,description:r,supported:i,action:n,forced:s,standard:o}],cp=G_(),H_=()=>{let t=No(),e=65,r=Array.from({length:e},(i,n)=>W_(n,t));return Object.assign({},...r)},W_=(t,e)=>{let r=z_(t,e);if(r===void 0)return{};let{name:i,description:n,supported:s,action:o,forced:a,standard:l}=r;return{[t]:{name:i,number:t,description:n,supported:s,action:o,forced:a,standard:l}}},z_=(t,e)=>{let r=e.find(({name:i})=>lp.constants.signals[i]===t);return r!==void 0?r:e.find(i=>i.number===t)},qD=H_();var hp=t=>{let e="option `killSignal`";if(t===0)throw new TypeError(`Invalid ${e}: 0 cannot be used.`);return fp(t,e)},dp=t=>t===0?t:fp(t,"`subprocess.kill()`'s argument"),fp=(t,e)=>{if(Number.isInteger(t))return Y_(t,e);if(typeof t=="string")return J_(t,e);throw new TypeError(`Invalid ${e} ${String(t)}: it must be a string or an integer.
137
+ ${Lo()}`)},Y_=(t,e)=>{if(up.has(t))return up.get(t);throw new TypeError(`Invalid ${e} ${t}: this signal integer does not exist.
138
+ ${Lo()}`)},K_=()=>new Map(Object.entries(Pt.constants.signals).reverse().map(([t,e])=>[e,t])),up=K_(),J_=(t,e)=>{if(t in Pt.constants.signals)return t;throw t.toUpperCase()in Pt.constants.signals?new TypeError(`Invalid ${e} '${t}': please rename it to '${t.toUpperCase()}'.`):new TypeError(`Invalid ${e} '${t}': this signal name does not exist.
139
+ ${Lo()}`)},Lo=()=>`Available signal names: ${Z_()}.
140
+ Available signal numbers: ${X_()}.`,Z_=()=>Object.keys(Pt.constants.signals).sort().map(t=>`'${t}'`).join(", "),X_=()=>[...new Set(Object.values(Pt.constants.signals).sort((t,e)=>t-e))].join(", "),Ai=t=>cp[t].description;var mp=t=>{if(t===!1)return t;if(t===!0)return Q_;if(!Number.isFinite(t)||t<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);return t},Q_=1e3*5,gp=({kill:t,options:{forceKillAfterDelay:e,killSignal:r},onInternalError:i,context:n,controller:s},o,a)=>{let{signal:l,error:c}=ev(o,a,r);tv(c,i);let u=t(l);return rv({kill:t,signal:l,forceKillAfterDelay:e,killSignal:r,killResult:u,context:n,controller:s}),u},ev=(t,e,r)=>{let[i=r,n]=Ci(t)?[void 0,t]:[t,e];if(typeof i!="string"&&!Number.isInteger(i))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(i)}`);if(n!==void 0&&!Ci(n))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${n}`);return{signal:dp(i),error:n}},tv=(t,e)=>{t!==void 0&&e.reject(t)},rv=async({kill:t,signal:e,forceKillAfterDelay:r,killSignal:i,killResult:n,context:s,controller:o})=>{e===i&&n&&jo({kill:t,forceKillAfterDelay:r,context:s,controllerSignal:o.signal})},jo=async({kill:t,forceKillAfterDelay:e,context:r,controllerSignal:i})=>{if(e!==!1)try{await(0,pp.setTimeout)(e,void 0,{signal:i}),t("SIGKILL")&&(r.isForcefullyTerminated??(r.isForcefullyTerminated=!0))}catch{}};var bp=require("events"),Fi=async(t,e)=>{t.aborted||await(0,bp.once)(t,"abort",{signal:e})};var yp=({cancelSignal:t})=>{if(t!==void 0&&Object.prototype.toString.call(t)!=="[object AbortSignal]")throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(t)}`)},wp=({subprocess:t,cancelSignal:e,gracefulCancel:r,context:i,controller:n})=>e===void 0||r?[]:[iv(t,e,i,n)],iv=async(t,e,r,{signal:i})=>{throw await Fi(e,i),r.terminationReason??(r.terminationReason="cancel"),t.kill(),e.reason};var Xp=require("timers/promises");var Jp=require("util");var Mt=({methodName:t,isSubprocess:e,ipc:r,isConnected:i})=>{nv(t,e,r),Uo(t,e,i)},nv=(t,e,r)=>{if(!r)throw new Error(`${ne(t,e)} can only be used if the \`ipc\` option is \`true\`.`)},Uo=(t,e,r)=>{if(!r)throw new Error(`${ne(t,e)} cannot be used: the ${He(e)} has already exited or disconnected.`)},Sp=t=>{throw new Error(`${ne("getOneMessage",t)} could not complete: the ${He(t)} exited or disconnected.`)},xp=t=>{throw new Error(`${ne("sendMessage",t)} failed: the ${He(t)} is sending a message too, instead of listening to incoming messages.
141
+ This can be fixed by both sending a message and listening to incoming messages at the same time:
142
+
143
+ const [receivedMessage] = await Promise.all([
144
+ ${ne("getOneMessage",t)},
145
+ ${ne("sendMessage",t,"message, {strict: true}")},
146
+ ]);`)},Di=(t,e)=>new Error(`${ne("sendMessage",e)} failed when sending an acknowledgment response to the ${He(e)}.`,{cause:t}),_p=t=>{throw new Error(`${ne("sendMessage",t)} failed: the ${He(t)} is not listening to incoming messages.`)},vp=t=>{throw new Error(`${ne("sendMessage",t)} failed: the ${He(t)} exited without listening to incoming messages.`)},Ep=()=>new Error(`\`cancelSignal\` aborted: the ${He(!0)} disconnected.`),Op=()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},Tp=({error:t,methodName:e,isSubprocess:r})=>{if(t.code==="EPIPE")throw new Error(`${ne(e,r)} cannot be used: the ${He(r)} is disconnecting.`,{cause:t})},Cp=({error:t,methodName:e,isSubprocess:r,message:i})=>{if(sv(t))throw new Error(`${ne(e,r)}'s argument type is invalid: the message cannot be serialized: ${String(i)}.`,{cause:t})},sv=({code:t,message:e})=>ov.has(t)||av.some(r=>e.includes(r)),ov=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),av=["could not be cloned","circular structure","call stack size exceeded"],ne=(t,e,r="")=>t==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${lv(e)}${t}(${r})`,lv=t=>t?"":"subprocess.",He=t=>t?"parent process":"subprocess",Rt=t=>{t.connected&&t.disconnect()};var me=()=>{let t={},e=new Promise((r,i)=>{Object.assign(t,{resolve:r,reject:i})});return Object.assign(e,t)};var Pi=(t,e="stdin")=>{let{options:i,fileDescriptors:n}=ge.get(t),s=Ap(n,e,!0),o=t.stdio[s];if(o===null)throw new TypeError(Fp(s,e,i,!0));return o},$t=(t,e="stdout")=>{let{options:i,fileDescriptors:n}=ge.get(t),s=Ap(n,e,!1),o=s==="all"?t.all:t.stdio[s];if(o==null)throw new TypeError(Fp(s,e,i,!1));return o},ge=new WeakMap,Ap=(t,e,r)=>{let i=cv(e,r);return uv(i,e,r,t),i},cv=(t,e)=>{let r=xo(t);if(r!==void 0)return r;let{validOptions:i,defaultValue:n}=e?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${vr(e)}" must not be "${t}".
147
+ It must be ${i} or "fd3", "fd4" (and so on).
148
+ It is optional and defaults to "${n}".`)},uv=(t,e,r,i)=>{let n=i[Dp(t)];if(n===void 0)throw new TypeError(`"${vr(r)}" must not be ${e}. That file descriptor does not exist.
149
+ Please set the "stdio" option to ensure that file descriptor exists.`);if(n.direction==="input"&&!r)throw new TypeError(`"${vr(r)}" must not be ${e}. It must be a readable stream, not writable.`);if(n.direction!=="input"&&r)throw new TypeError(`"${vr(r)}" must not be ${e}. It must be a writable stream, not readable.`)},Fp=(t,e,r,i)=>{if(t==="all"&&!r.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:n,optionValue:s}=hv(t,r);return`The "${n}: ${Ii(s)}" option is incompatible with using "${vr(i)}: ${Ii(e)}".
150
+ Please set this option with "pipe" instead.`},hv=(t,{stdin:e,stdout:r,stderr:i,stdio:n})=>{let s=Dp(t);return s===0&&e!==void 0?{optionName:"stdin",optionValue:e}:s===1&&r!==void 0?{optionName:"stdout",optionValue:r}:s===2&&i!==void 0?{optionName:"stderr",optionValue:i}:{optionName:`stdio[${s}]`,optionValue:n[s]}},Dp=t=>t==="all"?1:t,vr=t=>t?"to":"from",Ii=t=>typeof t=="string"?`'${t}'`:typeof t=="number"?`${t}`:"Stream";var Gp=require("events");var Ip=require("events"),at=(t,e,r)=>{let i=t.getMaxListeners();i===0||i===Number.POSITIVE_INFINITY||(t.setMaxListeners(i+e),(0,Ip.addAbortListener)(r,()=>{t.setMaxListeners(t.getMaxListeners()-e)}))};var qp=require("events");var Rp=require("events"),$p=require("timers/promises");var Mi=(t,e)=>{e&&qo(t)},qo=t=>{t.refCounted()},Ri=(t,e)=>{e&&Go(t)},Go=t=>{t.unrefCounted()},Pp=(t,e)=>{e&&(Go(t),Go(t))},Mp=(t,e)=>{e&&(qo(t),qo(t))};var Bp=async({anyProcess:t,channel:e,isSubprocess:r,ipcEmitter:i},n)=>{if(Lp(n)||Up(n))return;$i.has(t)||$i.set(t,[]);let s=$i.get(t);if(s.push(n),!(s.length>1))for(;s.length>0;){await jp(t,i,n),await $p.scheduler.yield();let o=await Np({wrappedMessage:s[0],anyProcess:t,channel:e,isSubprocess:r,ipcEmitter:i});s.shift(),i.emit("message",o),i.emit("message:done")}},kp=async({anyProcess:t,channel:e,isSubprocess:r,ipcEmitter:i,boundOnMessage:n})=>{Vo();let s=$i.get(t);for(;s?.length>0;)await(0,Rp.once)(i,"message:done");t.removeListener("message",n),Mp(e,r),i.connected=!1,i.emit("disconnect")},$i=new WeakMap;var We=(t,e,r)=>{if(Bi.has(t))return Bi.get(t);let i=new qp.EventEmitter;return i.connected=!0,Bi.set(t,i),dv({ipcEmitter:i,anyProcess:t,channel:e,isSubprocess:r}),i},Bi=new WeakMap,dv=({ipcEmitter:t,anyProcess:e,channel:r,isSubprocess:i})=>{let n=Bp.bind(void 0,{anyProcess:e,channel:r,isSubprocess:i,ipcEmitter:t});e.on("message",n),e.once("disconnect",kp.bind(void 0,{anyProcess:e,channel:r,isSubprocess:i,ipcEmitter:t,boundOnMessage:n})),Pp(r,i)},ki=t=>{let e=Bi.get(t);return e===void 0?t.channel!==null:e.connected};var Vp=({anyProcess:t,channel:e,isSubprocess:r,message:i,strict:n})=>{if(!n)return i;let s=We(t,e,r),o=ji(t,s);return{id:fv++,type:Li,message:i,hasListeners:o}},fv=0n,Hp=(t,e)=>{if(!(e?.type!==Li||e.hasListeners))for(let{id:r}of t)r!==void 0&&Ni[r].resolve({isDeadlock:!0,hasListeners:!1})},Np=async({wrappedMessage:t,anyProcess:e,channel:r,isSubprocess:i,ipcEmitter:n})=>{if(t?.type!==Li||!e.connected)return t;let{id:s,message:o}=t,a={id:s,type:zp,message:ji(e,n)};try{await Ui({anyProcess:e,channel:r,isSubprocess:i,ipc:!0},a)}catch(l){n.emit("strict:error",l)}return o},Lp=t=>{if(t?.type!==zp)return!1;let{id:e,message:r}=t;return Ni[e]?.resolve({isDeadlock:!1,hasListeners:r}),!0},Wp=async(t,e,r)=>{if(t?.type!==Li)return;let i=me();Ni[t.id]=i;let n=new AbortController;try{let{isDeadlock:s,hasListeners:o}=await Promise.race([i,pv(e,r,n)]);s&&xp(r),o||_p(r)}finally{n.abort(),delete Ni[t.id]}},Ni={},pv=async(t,e,{signal:r})=>{at(t,1,r),await(0,Gp.once)(t,"disconnect",{signal:r}),vp(e)},Li="execa:ipc:request",zp="execa:ipc:response";var Yp=(t,e,r)=>{Er.has(t)||Er.set(t,new Set);let i=Er.get(t),n=me(),s=r?e.id:void 0,o={onMessageSent:n,id:s};return i.add(o),{outgoingMessages:i,outgoingMessage:o}},Kp=({outgoingMessages:t,outgoingMessage:e})=>{t.delete(e),e.onMessageSent.resolve()},jp=async(t,e,r)=>{for(;!ji(t,e)&&Er.get(t)?.size>0;){let i=[...Er.get(t)];Hp(i,r),await Promise.all(i.map(({onMessageSent:n})=>n))}},Er=new WeakMap,ji=(t,e)=>e.listenerCount("message")>mv(t),mv=t=>ge.has(t)&&!$e(ge.get(t).options.buffer,"ipc")?1:0;var Ui=({anyProcess:t,channel:e,isSubprocess:r,ipc:i},n,{strict:s=!1}={})=>{let o="sendMessage";return Mt({methodName:o,isSubprocess:r,ipc:i,isConnected:t.connected}),gv({anyProcess:t,channel:e,methodName:o,isSubprocess:r,message:n,strict:s})},gv=async({anyProcess:t,channel:e,methodName:r,isSubprocess:i,message:n,strict:s})=>{let o=Vp({anyProcess:t,channel:e,isSubprocess:i,message:n,strict:s}),a=Yp(t,o,s);try{await Wo({anyProcess:t,methodName:r,isSubprocess:i,wrappedMessage:o,message:n})}catch(l){throw Rt(t),l}finally{Kp(a)}},Wo=async({anyProcess:t,methodName:e,isSubprocess:r,wrappedMessage:i,message:n})=>{let s=bv(t);try{await Promise.all([Wp(i,t,r),s(i)])}catch(o){throw Tp({error:o,methodName:e,isSubprocess:r}),Cp({error:o,methodName:e,isSubprocess:r,message:n}),o}},bv=t=>{if(Ho.has(t))return Ho.get(t);let e=(0,Jp.promisify)(t.send.bind(t));return Ho.set(t,e),e},Ho=new WeakMap;var Qp=(t,e)=>{let r="cancelSignal";return Uo(r,!1,t.connected),Wo({anyProcess:t,methodName:r,isSubprocess:!1,wrappedMessage:{type:tm,message:e},message:e})},em=async({anyProcess:t,channel:e,isSubprocess:r,ipc:i})=>(await yv({anyProcess:t,channel:e,isSubprocess:r,ipc:i}),zo.signal),yv=async({anyProcess:t,channel:e,isSubprocess:r,ipc:i})=>{if(!Zp){if(Zp=!0,!i){Op();return}if(e===null){Vo();return}We(t,e,r),await Xp.scheduler.yield()}},Zp=!1,Up=t=>t?.type!==tm?!1:(zo.abort(t.message),!0),tm="execa:ipc:cancel",Vo=()=>{zo.abort(Ep())},zo=new AbortController;var rm=({gracefulCancel:t,cancelSignal:e,ipc:r,serialization:i})=>{if(t){if(e===void 0)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(i==="json")throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}},im=({subprocess:t,cancelSignal:e,gracefulCancel:r,forceKillAfterDelay:i,context:n,controller:s})=>r?[wv({subprocess:t,cancelSignal:e,forceKillAfterDelay:i,context:n,controller:s})]:[],wv=async({subprocess:t,cancelSignal:e,forceKillAfterDelay:r,context:i,controller:{signal:n}})=>{await Fi(e,n);let s=Sv(e);throw await Qp(t,s),jo({kill:t.kill,forceKillAfterDelay:r,context:i,controllerSignal:n}),i.terminationReason??(i.terminationReason="gracefulCancel"),e.reason},Sv=({reason:t})=>{if(!(t instanceof DOMException))return t;let e=new Error(t.message);return Object.defineProperty(e,"stack",{value:t.stack,enumerable:!1,configurable:!0,writable:!0}),e};var nm=require("timers/promises");var sm=({timeout:t})=>{if(t!==void 0&&(!Number.isFinite(t)||t<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`)},om=(t,e,r,i)=>e===0||e===void 0?[]:[xv(t,e,r,i)],xv=async(t,e,r,{signal:i})=>{throw await(0,nm.setTimeout)(e,void 0,{signal:i}),r.terminationReason??(r.terminationReason="timeout"),t.kill(),new ie};var qi=require("process"),Yo=F(require("path"),1);var am=({options:t})=>{if(t.node===!1)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...t,node:!0}}},lm=(t,e,{node:r=!1,nodePath:i=qi.execPath,nodeOptions:n=qi.execArgv.filter(l=>!l.startsWith("--inspect")),cwd:s,execPath:o,...a})=>{if(o!==void 0)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let l=Ct(i,'The "nodePath" option'),c=Yo.default.resolve(s,l),u={...a,nodePath:c,node:r,cwd:s};if(!r)return[t,e,u];if(Yo.default.basename(t,".exe")==="node")throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[c,[...n,t,...e],{ipc:!0,...u,shell:!1}]};var cm=require("v8"),um=({ipcInput:t,ipc:e,serialization:r})=>{if(t!==void 0){if(!e)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ev[r](t)}},_v=t=>{try{(0,cm.serialize)(t)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},vv=t=>{try{JSON.stringify(t)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}},Ev={advanced:_v,json:vv},hm=async(t,e)=>{e!==void 0&&await t.sendMessage(e)};var fm=({encoding:t})=>{if(Ko.has(t))return;let e=Tv(t);if(e!==void 0)throw new TypeError(`Invalid option \`encoding: ${Gi(t)}\`.
151
+ Please rename it to ${Gi(e)}.`);let r=[...Ko].map(i=>Gi(i)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Gi(t)}\`.
152
+ Please rename it to one of: ${r}.`)},Ov=new Set(["utf8","utf16le"]),H=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Ko=new Set([...Ov,...H]),Tv=t=>{if(t===null)return"buffer";if(typeof t!="string")return;let e=t.toLowerCase();if(e in dm)return dm[e];if(Ko.has(e))return e},dm={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Gi=t=>typeof t=="string"?`"${t}"`:String(t);var pm=require("fs"),mm=F(require("path"),1),gm=F(require("process"),1);var bm=(t=ym())=>{let e=Ct(t,'The "cwd" option');return mm.default.resolve(e)},ym=()=>{try{return gm.default.cwd()}catch(t){throw t.message=`The current directory does not exist.
153
+ ${t.message}`,t}},wm=(t,e)=>{if(e===ym())return t;let r;try{r=(0,pm.statSync)(e)}catch(i){return`The "cwd" option is invalid: ${e}.
154
+ ${i.message}
155
+ ${t}`}return r.isDirectory()?t:`The "cwd" option is not a directory: ${e}.
156
+ ${t}`};var Vi=(t,e,r)=>{r.cwd=bm(r.cwd);let[i,n,s]=lm(t,e,r),{command:o,args:a,options:l}=xm.default._parse(i,n,s),c=kd(l),u=Cv(c);return sm(u),fm(u),um(u),yp(u),rm(u),u.shell=yo(u.shell),u.env=Av(u),u.killSignal=hp(u.killSignal),u.forceKillAfterDelay=mp(u.forceKillAfterDelay),u.lines=u.lines.map((h,f)=>h&&!H.has(u.encoding)&&u.buffer[f]),Jo.default.platform==="win32"&&Sm.default.basename(o,".exe")==="cmd"&&a.unshift("/q"),{file:o,commandArguments:a,options:u}},Cv=({extendEnv:t=!0,preferLocal:e=!1,cwd:r,localDir:i=r,encoding:n="utf8",reject:s=!0,cleanup:o=!0,all:a=!1,windowsHide:l=!0,killSignal:c="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:h=!1,ipcInput:f,ipc:m=f!==void 0||h,serialization:g="advanced",...v})=>({...v,extendEnv:t,preferLocal:e,cwd:r,localDirectory:i,encoding:n,reject:s,cleanup:o,all:a,windowsHide:l,killSignal:c,forceKillAfterDelay:u,gracefulCancel:h,ipcInput:f,ipc:m,serialization:g}),Av=({env:t,extendEnv:e,preferLocal:r,node:i,localDirectory:n,nodePath:s})=>{let o=e?{...Jo.default.env,...t}:t;return r||i?Xf({env:o,cwd:n,execPath:s,preferLocal:r,addExecPath:i}):o};var Hi=(t,e,r)=>r.shell&&e.length>0?[[t,...e].join(" "),[],r]:[t,e,r];var Hm=require("util");function Bt(t){if(typeof t=="string")return Fv(t);if(!(ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT===1))throw new Error("Input must be a string or a Uint8Array");return Dv(t)}var Fv=t=>t.at(-1)===_m?t.slice(0,t.at(-2)===vm?-2:-1):t,Dv=t=>t.at(-1)===Iv?t.subarray(0,t.at(-2)===Pv?-2:-1):t,_m=`
157
+ `,Iv=_m.codePointAt(0),vm="\r",Pv=vm.codePointAt(0);var km=require("events"),Nm=require("stream/promises");function se(t,{checkOpen:e=!0}={}){return t!==null&&typeof t=="object"&&(t.writable||t.readable||!e||t.writable===void 0&&t.readable===void 0)&&typeof t.pipe=="function"}function Zo(t,{checkOpen:e=!0}={}){return se(t,{checkOpen:e})&&(t.writable||!e)&&typeof t.write=="function"&&typeof t.end=="function"&&typeof t.writable=="boolean"&&typeof t.writableObjectMode=="boolean"&&typeof t.destroy=="function"&&typeof t.destroyed=="boolean"}function lt(t,{checkOpen:e=!0}={}){return se(t,{checkOpen:e})&&(t.readable||!e)&&typeof t.read=="function"&&typeof t.readable=="boolean"&&typeof t.readableObjectMode=="boolean"&&typeof t.destroy=="function"&&typeof t.destroyed=="boolean"}function Xo(t,e){return Zo(t,e)&&lt(t,e)}var Mv=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype),be,Or,ze,oe,kt,Em,Om,Qo=class{constructor(e,r){S(this,kt);S(this,be);S(this,Or);S(this,ze,!1);S(this,oe);b(this,be,e),b(this,Or,r)}next(){let e=()=>_(this,kt,Em).call(this);return b(this,oe,d(this,oe)?d(this,oe).then(e,e):e()),d(this,oe)}return(e){let r=()=>_(this,kt,Om).call(this,e);return d(this,oe)?d(this,oe).then(r,r):r()}};be=new WeakMap,Or=new WeakMap,ze=new WeakMap,oe=new WeakMap,kt=new WeakSet,Em=async function(){if(d(this,ze))return{done:!0,value:void 0};let e;try{e=await d(this,be).read()}catch(r){throw b(this,oe,void 0),b(this,ze,!0),d(this,be).releaseLock(),r}return e.done&&(b(this,oe,void 0),b(this,ze,!0),d(this,be).releaseLock()),e},Om=async function(e){if(d(this,ze))return{done:!0,value:e};if(b(this,ze,!0),!d(this,Or)){let r=d(this,be).cancel(e);return d(this,be).releaseLock(),await r,{done:!0,value:e}}return d(this,be).releaseLock(),{done:!0,value:e}};var ea=Symbol();function Tm(){return this[ea].next()}Object.defineProperty(Tm,"name",{value:"next"});function Cm(t){return this[ea].return(t)}Object.defineProperty(Cm,"name",{value:"return"});var Rv=Object.create(Mv,{next:{enumerable:!0,configurable:!0,writable:!0,value:Tm},return:{enumerable:!0,configurable:!0,writable:!0,value:Cm}});function ta({preventCancel:t=!1}={}){let e=this.getReader(),r=new Qo(e,t),i=Object.create(Rv);return i[ea]=r,i}var Am=t=>{if(lt(t,{checkOpen:!1})&&Tr.on!==void 0)return Bv(t);if(typeof t?.[Symbol.asyncIterator]=="function")return t;if($v.call(t)==="[object ReadableStream]")return ta.call(t);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:$v}=Object.prototype,Bv=async function*(t){let e=new AbortController,r={};kv(t,e,r);try{for await(let[i]of Tr.on(t,"data",{signal:e.signal}))yield i}catch(i){if(r.error!==void 0)throw r.error;if(!e.signal.aborted)throw i}finally{t.destroy()}},kv=async(t,e,r)=>{try{await Tr.finished(t,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(i){r.error=i}finally{e.abort()}},Tr={};var Nt=async(t,{init:e,convertChunk:r,getSize:i,truncateChunk:n,addChunk:s,getFinalChunk:o,finalize:a},{maxBuffer:l=Number.POSITIVE_INFINITY}={})=>{let c=Am(t),u=e();u.length=0;try{for await(let h of c){let f=Lv(h),m=r[f](h,u);Im({convertedChunk:m,state:u,getSize:i,truncateChunk:n,addChunk:s,maxBuffer:l})}return Nv({state:u,convertChunk:r,getSize:i,truncateChunk:n,addChunk:s,getFinalChunk:o,maxBuffer:l}),a(u)}catch(h){let f=typeof h=="object"&&h!==null?h:new Error(h);throw f.bufferedData=a(u),f}},Nv=({state:t,getSize:e,truncateChunk:r,addChunk:i,getFinalChunk:n,maxBuffer:s})=>{let o=n(t);o!==void 0&&Im({convertedChunk:o,state:t,getSize:e,truncateChunk:r,addChunk:i,maxBuffer:s})},Im=({convertedChunk:t,state:e,getSize:r,truncateChunk:i,addChunk:n,maxBuffer:s})=>{let o=r(t),a=e.length+o;if(a<=s){Fm(t,e,n,a);return}let l=i(t,s-e.length);throw l!==void 0&&Fm(l,e,n,s),new ye},Fm=(t,e,r,i)=>{e.contents=r(t,e,i),e.length=i},Lv=t=>{let e=typeof t;if(e==="string")return"string";if(e!=="object"||t===null)return"others";if(globalThis.Buffer?.isBuffer(t))return"buffer";let r=Dm.call(t);return r==="[object ArrayBuffer]"?"arrayBuffer":r==="[object DataView]"?"dataView":Number.isInteger(t.byteLength)&&Number.isInteger(t.byteOffset)&&Dm.call(t.buffer)==="[object ArrayBuffer]"?"typedArray":"others"},{toString:Dm}=Object.prototype,ye=class extends Error{constructor(){super("maxBuffer exceeded");Oe(this,"name","MaxBufferError")}};var Be=t=>t,Cr=()=>{},Wi=({contents:t})=>t,zi=t=>{throw new Error(`Streams in object mode are not supported: ${String(t)}`)},Yi=t=>t.length;async function Ki(t,e){return Nt(t,Gv,e)}var jv=()=>({contents:[]}),Uv=()=>1,qv=(t,{contents:e})=>(e.push(t),e),Gv={init:jv,convertChunk:{string:Be,buffer:Be,arrayBuffer:Be,dataView:Be,typedArray:Be,others:Be},getSize:Uv,truncateChunk:Cr,addChunk:qv,getFinalChunk:Cr,finalize:Wi};async function Ji(t,e){return Nt(t,Xv,e)}var Vv=()=>({contents:new ArrayBuffer(0)}),Hv=t=>Wv.encode(t),Wv=new TextEncoder,Pm=t=>new Uint8Array(t),Mm=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength),zv=(t,e)=>t.slice(0,e),Yv=(t,{contents:e,length:r},i)=>{let n=Bm()?Jv(e,i):Kv(e,i);return new Uint8Array(n).set(t,r),n},Kv=(t,e)=>{if(e<=t.byteLength)return t;let r=new ArrayBuffer($m(e));return new Uint8Array(r).set(new Uint8Array(t),0),r},Jv=(t,e)=>{if(e<=t.maxByteLength)return t.resize(e),t;let r=new ArrayBuffer(e,{maxByteLength:$m(e)});return new Uint8Array(r).set(new Uint8Array(t),0),r},$m=t=>Rm**Math.ceil(Math.log(t)/Math.log(Rm)),Rm=2,Zv=({contents:t,length:e})=>Bm()?t:t.slice(0,e),Bm=()=>"resize"in ArrayBuffer.prototype,Xv={init:Vv,convertChunk:{string:Hv,buffer:Pm,arrayBuffer:Pm,dataView:Mm,typedArray:Mm,others:zi},getSize:Yi,truncateChunk:zv,addChunk:Yv,getFinalChunk:Cr,finalize:Zv};async function Xi(t,e){return Nt(t,iE,e)}var Qv=()=>({contents:"",textDecoder:new TextDecoder}),Zi=(t,{textDecoder:e})=>e.decode(t,{stream:!0}),eE=(t,{contents:e})=>e+t,tE=(t,e)=>t.slice(0,e),rE=({textDecoder:t})=>{let e=t.decode();return e===""?void 0:e},iE={init:Qv,convertChunk:{string:Be,buffer:Zi,arrayBuffer:Zi,dataView:Zi,typedArray:Zi,others:zi},getSize:Yi,truncateChunk:tE,addChunk:eE,getFinalChunk:rE,finalize:Wi};Object.assign(Tr,{on:km.on,finished:Nm.finished});var Lm=({error:t,stream:e,readableObjectMode:r,lines:i,encoding:n,fdNumber:s})=>{if(!(t instanceof ye))throw t;if(s==="all")return t;let o=nE(r,i,n);throw t.maxBufferInfo={fdNumber:s,unit:o},e.destroy(),t},nE=(t,e,r)=>t?"objects":e?"lines":r==="buffer"?"bytes":"characters",jm=(t,e,r)=>{if(e.length!==r)return;let i=new ye;throw i.maxBufferInfo={fdNumber:"ipc"},i},Um=(t,e)=>{let{streamName:r,threshold:i,unit:n}=sE(t,e);return`Command's ${r} was larger than ${i} ${n}`},sE=(t,e)=>{if(t?.maxBufferInfo===void 0)return{streamName:"output",threshold:e[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:r,unit:i}}=t;delete t.maxBufferInfo;let n=$e(e,r);return r==="ipc"?{streamName:"IPC output",threshold:n,unit:"messages"}:{streamName:mi(r),threshold:n,unit:i}},qm=(t,e,r)=>t?.code==="ENOBUFS"&&e!==null&&e.some(i=>i!==null&&i.length>Qi(r)),Gm=(t,e,r)=>{if(!e)return t;let i=Qi(r);return t.length>i?t.slice(0,i):t},Qi=([,t])=>t;var Wm=({stdio:t,all:e,ipcOutput:r,originalError:i,signal:n,signalDescription:s,exitCode:o,escapedCommand:a,timedOut:l,isCanceled:c,isGracefullyCanceled:u,isMaxBuffer:h,isForcefullyTerminated:f,forceKillAfterDelay:m,killSignal:g,maxBuffer:v,timeout:C,cwd:E})=>{let R=i?.code,U=oE({originalError:i,timedOut:l,timeout:C,isMaxBuffer:h,maxBuffer:v,errorCode:R,signal:n,signalDescription:s,exitCode:o,isCanceled:c,isGracefullyCanceled:u,isForcefullyTerminated:f,forceKillAfterDelay:m,killSignal:g}),Y=lE(i,E),Ee=Y===void 0?"":`
158
+ ${Y}`,Ne=`${U}: ${a}${Ee}`,it=e===void 0?[t[2],t[1]]:[e],St=[Ne,...it,...t.slice(3),r.map(Le=>cE(Le)).join(`
159
+ `)].map(Le=>wr(Bt(uE(Le)))).filter(Boolean).join(`
160
+
161
+ `);return{originalMessage:Y,shortMessage:Ne,message:St}},oE=({originalError:t,timedOut:e,timeout:r,isMaxBuffer:i,maxBuffer:n,errorCode:s,signal:o,signalDescription:a,exitCode:l,isCanceled:c,isGracefullyCanceled:u,isForcefullyTerminated:h,forceKillAfterDelay:f,killSignal:m})=>{let g=aE(h,f);return e?`Command timed out after ${r} milliseconds${g}`:u?o===void 0?`Command was gracefully canceled with exit code ${l}`:h?`Command was gracefully canceled${g}`:`Command was gracefully canceled with ${o} (${a})`:c?`Command was canceled${g}`:i?`${Um(t,n)}${g}`:s!==void 0?`Command failed with ${s}${g}`:h?`Command was killed with ${m} (${Ai(m)})${g}`:o!==void 0?`Command was killed with ${o} (${a})`:l!==void 0?`Command failed with exit code ${l}`:"Command failed"},aE=(t,e)=>t?` and was forcefully terminated after ${e} milliseconds`:"",lE=(t,e)=>{if(t instanceof ie)return;let r=tp(t)?t.originalMessage:String(t?.message??t),i=wr(wm(r,e));return i===""?void 0:i},cE=t=>typeof t=="string"?t:(0,Hm.inspect)(t),uE=t=>Array.isArray(t)?t.map(e=>Bt(Vm(e))).filter(Boolean).join(`
162
+ `):Vm(t),Vm=t=>typeof t=="string"?t:j(t)?di(t):"";var en=({command:t,escapedCommand:e,stdio:r,all:i,ipcOutput:n,options:{cwd:s},startTime:o})=>zm({command:t,escapedCommand:e,cwd:s,durationMs:To(o),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:i,stdio:r,ipcOutput:n,pipedFrom:[]}),Lt=({error:t,command:e,escapedCommand:r,fileDescriptors:i,options:n,startTime:s,isSync:o})=>Ar({error:t,command:e,escapedCommand:r,startTime:s,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:i.length}),ipcOutput:[],options:n,isSync:o}),Ar=({error:t,command:e,escapedCommand:r,startTime:i,timedOut:n,isCanceled:s,isGracefullyCanceled:o,isMaxBuffer:a,isForcefullyTerminated:l,exitCode:c,signal:u,stdio:h,all:f,ipcOutput:m,options:{timeoutDuration:g,timeout:v=g,forceKillAfterDelay:C,killSignal:E,cwd:R,maxBuffer:U},isSync:Y})=>{let{exitCode:Ee,signal:Ne,signalDescription:it}=dE(c,u),{originalMessage:St,shortMessage:Le,message:Bn}=Wm({stdio:h,all:f,ipcOutput:m,originalError:t,signal:Ne,signalDescription:it,exitCode:Ee,escapedCommand:r,timedOut:n,isCanceled:s,isGracefullyCanceled:o,isMaxBuffer:a,isForcefullyTerminated:l,forceKillAfterDelay:C,killSignal:E,maxBuffer:U,timeout:v,cwd:R}),ir=Qf(t,Bn,Y);return Object.assign(ir,hE({error:ir,command:e,escapedCommand:r,startTime:i,timedOut:n,isCanceled:s,isGracefullyCanceled:o,isMaxBuffer:a,isForcefullyTerminated:l,exitCode:Ee,signal:Ne,signalDescription:it,stdio:h,all:f,ipcOutput:m,cwd:R,originalMessage:St,shortMessage:Le})),ir},hE=({error:t,command:e,escapedCommand:r,startTime:i,timedOut:n,isCanceled:s,isGracefullyCanceled:o,isMaxBuffer:a,isForcefullyTerminated:l,exitCode:c,signal:u,signalDescription:h,stdio:f,all:m,ipcOutput:g,cwd:v,originalMessage:C,shortMessage:E})=>zm({shortMessage:E,originalMessage:C,command:e,escapedCommand:r,cwd:v,durationMs:To(i),failed:!0,timedOut:n,isCanceled:s,isGracefullyCanceled:o,isTerminated:u!==void 0,isMaxBuffer:a,isForcefullyTerminated:l,exitCode:c,signal:u,signalDescription:h,code:t.cause?.code,stdout:f[1],stderr:f[2],all:m,stdio:f,ipcOutput:g,pipedFrom:[]}),zm=t=>Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0)),dE=(t,e)=>{let r=t===null?void 0:t,i=e===null?void 0:e,n=i===void 0?void 0:Ai(e);return{exitCode:r,signal:i,signalDescription:n}};var Ym=t=>Number.isFinite(t)?t:0;function fE(t){return{days:Math.trunc(t/864e5),hours:Math.trunc(t/36e5%24),minutes:Math.trunc(t/6e4%60),seconds:Math.trunc(t/1e3%60),milliseconds:Math.trunc(t%1e3),microseconds:Math.trunc(Ym(t*1e3)%1e3),nanoseconds:Math.trunc(Ym(t*1e6)%1e3)}}function pE(t){return{days:t/86400000n,hours:t/3600000n%24n,minutes:t/60000n%60n,seconds:t/1000n%60n,milliseconds:t%1000n,microseconds:0n,nanoseconds:0n}}function ra(t){switch(typeof t){case"number":{if(Number.isFinite(t))return fE(t);break}case"bigint":return pE(t)}throw new TypeError("Expected a finite number or bigint")}var mE=t=>t===0||t===0n,gE=(t,e)=>e===1||e===1n?t:`${t}s`,bE=1e-7,yE=24n*60n*60n*1000n;function ia(t,e){let r=typeof t=="bigint";if(!r&&!Number.isFinite(t))throw new TypeError("Expected a finite number or bigint");e={...e};let i=t<0?"-":"";t=t<0?-t:t,e.colonNotation&&(e.compact=!1,e.formatSubMilliseconds=!1,e.separateMilliseconds=!1,e.verbose=!1),e.compact&&(e.unitCount=1,e.secondsDecimalDigits=0,e.millisecondsDecimalDigits=0);let n=[],s=(u,h)=>{let f=Math.floor(u*10**h+bE);return(Math.round(f)/10**h).toFixed(h)},o=(u,h,f,m)=>{if(!((n.length===0||!e.colonNotation)&&mE(u)&&!(e.colonNotation&&f==="m"))){if(m??(m=String(u)),e.colonNotation){let g=m.includes(".")?m.split(".")[0].length:m.length,v=n.length>0?2:1;m="0".repeat(Math.max(0,v-g))+m}else m+=e.verbose?" "+gE(h,u):f;n.push(m)}},a=ra(t),l=BigInt(a.days);if(e.hideYearAndDays?o(BigInt(l)*24n+BigInt(a.hours),"hour","h"):(e.hideYear?o(l,"day","d"):(o(l/365n,"year","y"),o(l%365n,"day","d")),o(Number(a.hours),"hour","h")),o(Number(a.minutes),"minute","m"),!e.hideSeconds)if(e.separateMilliseconds||e.formatSubMilliseconds||!e.colonNotation&&t<1e3&&!e.subSecondsAsDecimals){let u=Number(a.seconds),h=Number(a.milliseconds),f=Number(a.microseconds),m=Number(a.nanoseconds);if(o(u,"second","s"),e.formatSubMilliseconds)o(h,"millisecond","ms"),o(f,"microsecond","\xB5s"),o(m,"nanosecond","ns");else{let g=h+f/1e3+m/1e6,v=typeof e.millisecondsDecimalDigits=="number"?e.millisecondsDecimalDigits:0,C=g>=1?Math.round(g):Math.ceil(g),E=v?g.toFixed(v):C;o(Number.parseFloat(E),"millisecond","ms",E)}}else{let u=(r?Number(t%yE):t)/1e3%60,h=typeof e.secondsDecimalDigits=="number"?e.secondsDecimalDigits:1,f=s(u,h),m=e.keepDecimalsOnWholeSeconds?f:f.replace(/\.0+$/,"");o(Number.parseFloat(m),"second","s",m)}if(n.length===0)return i+"0"+(e.verbose?" milliseconds":"ms");let c=e.colonNotation?":":" ";return typeof e.unitCount=="number"&&(n=n.slice(0,Math.max(e.unitCount,1))),i+n.join(c)}var Km=(t,e)=>{t.failed&&pe({type:"error",verboseMessage:t.shortMessage,verboseInfo:e,result:t})};var Jm=(t,e)=>{At(e)&&(Km(t,e),wE(t,e))},wE=(t,e)=>{let r=`(done in ${ia(t.durationMs)})`;pe({type:"duration",verboseMessage:r,verboseInfo:e,result:t})};var jt=(t,e,{reject:r})=>{if(Jm(t,e),t.failed&&r)throw t;return t};var ha=require("fs");var Qm=(t,e)=>ct(t)?"asyncGenerator":rg(t)?"generator":tn(t)?"fileUrl":EE(t)?"filePath":CE(t)?"webStream":se(t,{checkOpen:!1})?"native":j(t)?"uint8Array":AE(t)?"asyncIterable":FE(t)?"iterable":oa(t)?eg({transform:t},e):vE(t)?SE(t,e):"native",SE=(t,e)=>Xo(t.transform,{checkOpen:!1})?xE(t,e):oa(t.transform)?eg(t,e):_E(t,e),xE=(t,e)=>(tg(t,e,"Duplex stream"),"duplex"),eg=(t,e)=>(tg(t,e,"web TransformStream"),"webTransform"),tg=({final:t,binary:e,objectMode:r},i,n)=>{Zm(t,`${i}.final`,n),Zm(e,`${i}.binary`,n),na(r,`${i}.objectMode`)},Zm=(t,e,r)=>{if(t!==void 0)throw new TypeError(`The \`${e}\` option can only be defined when using a generator, not a ${r}.`)},_E=({transform:t,final:e,binary:r,objectMode:i},n)=>{if(t!==void 0&&!Xm(t))throw new TypeError(`The \`${n}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Xo(e,{checkOpen:!1}))throw new TypeError(`The \`${n}.final\` option must not be a Duplex stream.`);if(oa(e))throw new TypeError(`The \`${n}.final\` option must not be a web TransformStream.`);if(e!==void 0&&!Xm(e))throw new TypeError(`The \`${n}.final\` option must be a generator.`);return na(r,`${n}.binary`),na(i,`${n}.objectMode`),ct(t)||ct(e)?"asyncGenerator":"generator"},na=(t,e)=>{if(t!==void 0&&typeof t!="boolean")throw new TypeError(`The \`${e}\` option must use a boolean.`)},Xm=t=>ct(t)||rg(t),ct=t=>Object.prototype.toString.call(t)==="[object AsyncGeneratorFunction]",rg=t=>Object.prototype.toString.call(t)==="[object GeneratorFunction]",vE=t=>L(t)&&(t.transform!==void 0||t.final!==void 0),tn=t=>Object.prototype.toString.call(t)==="[object URL]",ig=t=>tn(t)&&t.protocol!=="file:",EE=t=>L(t)&&Object.keys(t).length>0&&Object.keys(t).every(e=>OE.has(e))&&sa(t.file),OE=new Set(["file","append"]),sa=t=>typeof t=="string",ng=(t,e)=>t==="native"&&typeof e=="string"&&!TE.has(e),TE=new Set(["ipc","ignore","inherit","overlapped","pipe"]),sg=t=>Object.prototype.toString.call(t)==="[object ReadableStream]",rn=t=>Object.prototype.toString.call(t)==="[object WritableStream]",CE=t=>sg(t)||rn(t),oa=t=>sg(t?.readable)&&rn(t?.writable),AE=t=>og(t)&&typeof t[Symbol.asyncIterator]=="function",FE=t=>og(t)&&typeof t[Symbol.iterator]=="function",og=t=>typeof t=="object"&&t!==null,X=new Set(["generator","asyncGenerator","duplex","webTransform"]),nn=new Set(["fileUrl","filePath","fileNumber"]),aa=new Set(["fileUrl","filePath"]),ag=new Set([...aa,"webStream","nodeStream"]),lg=new Set(["webTransform","duplex"]),Ye={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"};var la=(t,e,r,i)=>i==="output"?DE(t,e,r):IE(t,e,r),DE=(t,e,r)=>{let i=e!==0&&r[e-1].value.readableObjectMode;return{writableObjectMode:i,readableObjectMode:t??i}},IE=(t,e,r)=>{let i=e===0?t===!0:r[e-1].value.readableObjectMode,n=e!==r.length-1&&(t??i);return{writableObjectMode:i,readableObjectMode:n}},cg=(t,e)=>{let r=t.findLast(({type:i})=>X.has(i));return r===void 0?!1:e==="input"?r.value.writableObjectMode:r.value.readableObjectMode};var ug=(t,e,r,i)=>[...t.filter(({type:n})=>!X.has(n)),...PE(t,e,r,i)],PE=(t,e,r,{encoding:i})=>{let n=t.filter(({type:o})=>X.has(o)),s=Array.from({length:n.length});for(let[o,a]of Object.entries(n))s[o]=ME({stdioItem:a,index:Number(o),newTransforms:s,optionName:e,direction:r,encoding:i});return kE(s,r)},ME=({stdioItem:t,stdioItem:{type:e},index:r,newTransforms:i,optionName:n,direction:s,encoding:o})=>e==="duplex"?RE({stdioItem:t,optionName:n}):e==="webTransform"?$E({stdioItem:t,index:r,newTransforms:i,direction:s}):BE({stdioItem:t,index:r,newTransforms:i,direction:s,encoding:o}),RE=({stdioItem:t,stdioItem:{value:{transform:e,transform:{writableObjectMode:r,readableObjectMode:i},objectMode:n=i}},optionName:s})=>{if(n&&!i)throw new TypeError(`The \`${s}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!n&&i)throw new TypeError(`The \`${s}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...t,value:{transform:e,writableObjectMode:r,readableObjectMode:i}}},$E=({stdioItem:t,stdioItem:{value:e},index:r,newTransforms:i,direction:n})=>{let{transform:s,objectMode:o}=L(e)?e:{transform:e},{writableObjectMode:a,readableObjectMode:l}=la(o,r,i,n);return{...t,value:{transform:s,writableObjectMode:a,readableObjectMode:l}}},BE=({stdioItem:t,stdioItem:{value:e},index:r,newTransforms:i,direction:n,encoding:s})=>{let{transform:o,final:a,binary:l=!1,preserveNewlines:c=!1,objectMode:u}=L(e)?e:{transform:e},h=l||H.has(s),{writableObjectMode:f,readableObjectMode:m}=la(u,r,i,n);return{...t,value:{transform:o,final:a,binary:h,preserveNewlines:c,writableObjectMode:f,readableObjectMode:m}}},kE=(t,e)=>e==="input"?t.reverse():t;var sn=F(require("process"),1);var hg=(t,e,r)=>{let i=t.map(n=>NE(n,e));if(i.includes("input")&&i.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return i.find(Boolean)??UE},NE=({type:t,value:e},r)=>LE[r]??dg[t](e),LE=["input","output","output"],Ut=()=>{},ca=()=>"input",dg={generator:Ut,asyncGenerator:Ut,fileUrl:Ut,filePath:Ut,iterable:ca,asyncIterable:ca,uint8Array:ca,webStream:t=>rn(t)?"output":"input",nodeStream(t){return lt(t,{checkOpen:!1})?Zo(t,{checkOpen:!1})?void 0:"input":"output"},webTransform:Ut,duplex:Ut,native(t){let e=jE(t);if(e!==void 0)return e;if(se(t,{checkOpen:!1}))return dg.nodeStream(t)}},jE=t=>{if([0,sn.default.stdin].includes(t))return"input";if([1,2,sn.default.stdout,sn.default.stderr].includes(t))return"output"},UE="output";var fg=(t,e)=>e&&!t.includes("ipc")?[...t,"ipc"]:t;var pg=({stdio:t,ipc:e,buffer:r,...i},n,s)=>{let o=qE(t,i).map((a,l)=>mg(a,l));return s?VE(o,r,n):fg(o,e)},qE=(t,e)=>{if(t===void 0)return Z.map(i=>e[i]);if(GE(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Z.map(i=>`\`${i}\``).join(", ")}`);if(typeof t=="string")return[t,t,t];if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let r=Math.max(t.length,Z.length);return Array.from({length:r},(i,n)=>t[n])},GE=t=>Z.some(e=>t[e]!==void 0),mg=(t,e)=>Array.isArray(t)?t.map(r=>mg(r,e)):t??(e>=Z.length?"ignore":"pipe"),VE=(t,e,r)=>t.map((i,n)=>!e[n]&&n!==0&&!Ft(r,n)&&HE(i)?"ignore":i),HE=t=>t==="pipe"||Array.isArray(t)&&t.every(e=>e==="pipe");var bg=require("fs"),yg=F(require("tty"),1);var wg=({stdioItem:t,stdioItem:{type:e},isStdioArray:r,fdNumber:i,direction:n,isSync:s})=>!r||e!=="native"?t:s?WE({stdioItem:t,fdNumber:i,direction:n}):KE({stdioItem:t,fdNumber:i}),WE=({stdioItem:t,stdioItem:{value:e,optionName:r},fdNumber:i,direction:n})=>{let s=zE({value:e,optionName:r,fdNumber:i,direction:n});if(s!==void 0)return s;if(se(e,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return t},zE=({value:t,optionName:e,fdNumber:r,direction:i})=>{let n=YE(t,r);if(n!==void 0){if(i==="output")return{type:"fileNumber",value:n,optionName:e};if(yg.default.isatty(n))throw new TypeError(`The \`${e}: ${Ii(t)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Re((0,bg.readFileSync)(n)),optionName:e}}},YE=(t,e)=>{if(t==="inherit")return e;if(typeof t=="number")return t;let r=pi.indexOf(t);if(r!==-1)return r},KE=({stdioItem:t,stdioItem:{value:e,optionName:r},fdNumber:i})=>e==="inherit"?{type:"nodeStream",value:gg(i,e,r),optionName:r}:typeof e=="number"?{type:"nodeStream",value:gg(e,e,r),optionName:r}:se(e,{checkOpen:!1})?{type:"nodeStream",value:e,optionName:r}:t,gg=(t,e,r)=>{let i=pi[t];if(i===void 0)throw new TypeError(`The \`${r}: ${e}\` option is invalid: no such standard stream.`);return i};var Sg=({input:t,inputFile:e},r)=>r===0?[...JE(t),...XE(e)]:[],JE=t=>t===void 0?[]:[{type:ZE(t),value:t,optionName:"input"}],ZE=t=>{if(lt(t,{checkOpen:!1}))return"nodeStream";if(typeof t=="string")return"string";if(j(t))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},XE=t=>t===void 0?[]:[{...QE(t),optionName:"inputFile"}],QE=t=>{if(tn(t))return{type:"fileUrl",value:t};if(sa(t))return{type:"filePath",value:{file:t}};throw new Error("The `inputFile` option must be a file path string or a file URL.")};var xg=t=>t.filter((e,r)=>t.every((i,n)=>e.value!==i.value||r>=n||e.type==="generator"||e.type==="asyncGenerator")),_g=({stdioItem:{type:t,value:e,optionName:r},direction:i,fileDescriptors:n,isSync:s})=>{let o=e1(n,t);if(o.length!==0){if(s){t1({otherStdioItems:o,type:t,value:e,optionName:r,direction:i});return}if(ag.has(t))return vg({otherStdioItems:o,type:t,value:e,optionName:r,direction:i});lg.has(t)&&i1({otherStdioItems:o,type:t,value:e,optionName:r})}},e1=(t,e)=>t.flatMap(({direction:r,stdioItems:i})=>i.filter(n=>n.type===e).map((n=>({...n,direction:r})))),t1=({otherStdioItems:t,type:e,value:r,optionName:i,direction:n})=>{aa.has(e)&&vg({otherStdioItems:t,type:e,value:r,optionName:i,direction:n})},vg=({otherStdioItems:t,type:e,value:r,optionName:i,direction:n})=>{let s=t.filter(a=>r1(a,r));if(s.length===0)return;let o=s.find(a=>a.direction!==n);return Eg(o,i,e),n==="output"?s[0].stream:void 0},r1=({type:t,value:e},r)=>t==="filePath"?e.file===r.file:t==="fileUrl"?e.href===r.href:e===r,i1=({otherStdioItems:t,type:e,value:r,optionName:i})=>{let n=t.find(({value:{transform:s}})=>s===r.transform);Eg(n,i,e)},Eg=(t,e,r)=>{if(t!==void 0)throw new TypeError(`The \`${t.optionName}\` and \`${e}\` options must not target ${Ye[r]} that is the same.`)};var on=(t,e,r,i)=>{let s=pg(e,r,i).map((a,l)=>n1({stdioOption:a,fdNumber:l,options:e,isSync:i})),o=d1({initialFileDescriptors:s,addProperties:t,options:e,isSync:i});return e.stdio=o.map(({stdioItems:a})=>m1(a)),o},n1=({stdioOption:t,fdNumber:e,options:r,isSync:i})=>{let n=mi(e),{stdioItems:s,isStdioArray:o}=s1({stdioOption:t,fdNumber:e,options:r,optionName:n}),a=hg(s,e,n),l=s.map(h=>wg({stdioItem:h,isStdioArray:o,fdNumber:e,direction:a,isSync:i})),c=ug(l,n,a,r),u=cg(c,a);return h1(c,u),{direction:a,objectMode:u,stdioItems:c}},s1=({stdioOption:t,fdNumber:e,options:r,optionName:i})=>{let s=[...(Array.isArray(t)?t:[t]).map(l=>o1(l,i)),...Sg(r,e)],o=xg(s),a=o.length>1;return a1(o,a,i),c1(o),{stdioItems:o,isStdioArray:a}},o1=(t,e)=>({type:Qm(t,e),value:t,optionName:e}),a1=(t,e,r)=>{if(t.length===0)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(e){for(let{value:i,optionName:n}of t)if(l1.has(i))throw new Error(`The \`${n}\` option must not include \`${i}\`.`)}},l1=new Set(["ignore","ipc"]),c1=t=>{for(let e of t)u1(e)},u1=({type:t,value:e,optionName:r})=>{if(ig(e))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.
163
+ For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(ng(t,e))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},h1=(t,e)=>{if(!e)return;let r=t.find(({type:i})=>nn.has(i));if(r!==void 0)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},d1=({initialFileDescriptors:t,addProperties:e,options:r,isSync:i})=>{let n=[];try{for(let s of t)n.push(f1({fileDescriptor:s,fileDescriptors:n,addProperties:e,options:r,isSync:i}));return n}catch(s){throw ua(n),s}},f1=({fileDescriptor:{direction:t,objectMode:e,stdioItems:r},fileDescriptors:i,addProperties:n,options:s,isSync:o})=>{let a=r.map(l=>p1({stdioItem:l,addProperties:n,direction:t,options:s,fileDescriptors:i,isSync:o}));return{direction:t,objectMode:e,stdioItems:a}},p1=({stdioItem:t,addProperties:e,direction:r,options:i,fileDescriptors:n,isSync:s})=>{let o=_g({stdioItem:t,direction:r,fileDescriptors:n,isSync:s});return o!==void 0?{...t,stream:o}:{...t,...e[r][t.type](t,i)}},ua=t=>{for(let{stdioItems:e}of t)for(let{stream:r}of e)r!==void 0&&!re(r)&&r.destroy()},m1=t=>{if(t.length>1)return t.some(({value:i})=>i==="overlapped")?"overlapped":"pipe";let[{type:e,value:r}]=t;return e==="native"?r:"pipe"};var Tg=(t,e)=>on(b1,t,e,!0),we=({type:t,optionName:e})=>{Cg(e,Ye[t])},g1=({optionName:t,value:e})=>((e==="ipc"||e==="overlapped")&&Cg(t,`"${e}"`),{}),Cg=(t,e)=>{throw new TypeError(`The \`${t}\` option cannot be ${e} with synchronous methods.`)},Og={generator(){},asyncGenerator:we,webStream:we,nodeStream:we,webTransform:we,duplex:we,asyncIterable:we,native:g1},b1={input:{...Og,fileUrl:({value:t})=>({contents:[Re((0,ha.readFileSync)(t))]}),filePath:({value:{file:t}})=>({contents:[Re((0,ha.readFileSync)(t))]}),fileNumber:we,iterable:({value:t})=>({contents:[...t]}),string:({value:t})=>({contents:[t]}),uint8Array:({value:t})=>({contents:[t]})},output:{...Og,fileUrl:({value:t})=>({path:t}),filePath:({value:{file:t,append:e}})=>({path:t,append:e}),fileNumber:({value:t})=>({path:t}),iterable:we,string:we,uint8Array:we}};var ke=(t,{stripFinalNewline:e},r)=>da(e,r)&&t!==void 0&&!Array.isArray(t)?Bt(t):t,da=(t,e)=>e==="all"?t[1]||t[2]:t[e];var Dr=require("stream");var an=(t,e,r,i)=>t||r?void 0:Fg(e,i),pa=(t,e,r)=>r?t.flatMap(i=>Ag(i,e)):Ag(t,e),Ag=(t,e)=>{let{transform:r,final:i}=Fg(e,{});return[...r(t),...i()]},Fg=(t,e)=>(e.previousChunks="",{transform:y1.bind(void 0,e,t),final:S1.bind(void 0,e)}),y1=function*(t,e,r){if(typeof r!="string"){yield r;return}let{previousChunks:i}=t,n=-1;for(let s=0;s<r.length;s+=1)if(r[s]===`
164
+ `){let o=w1(r,s,e,t),a=r.slice(n+1,s+1-o);i.length>0&&(a=fa(i,a),i=""),yield a,n=s}n!==r.length-1&&(i=fa(i,r.slice(n+1))),t.previousChunks=i},w1=(t,e,r,i)=>r?0:(i.isWindowsNewline=e!==0&&t[e-1]==="\r",i.isWindowsNewline?2:1),S1=function*({previousChunks:t}){t.length>0&&(yield t)},Dg=({binary:t,preserveNewlines:e,readableObjectMode:r,state:i})=>t||e||r?void 0:{transform:x1.bind(void 0,i)},x1=function*({isWindowsNewline:t=!1},e){let{unixNewline:r,windowsNewline:i,LF:n,concatBytes:s}=typeof e=="string"?_1:E1;if(e.at(-1)===n){yield e;return}yield s(e,t?i:r)},fa=(t,e)=>`${t}${e}`,_1={windowsNewline:`\r
165
+ `,unixNewline:`
166
+ `,LF:`
167
+ `,concatBytes:fa},v1=(t,e)=>{let r=new Uint8Array(t.length+e.length);return r.set(t,0),r.set(e,t.length),r},E1={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:v1};var Ig=require("buffer");var Pg=(t,e)=>t?void 0:O1.bind(void 0,e),O1=function*(t,e){if(typeof e!="string"&&!j(e)&&!Ig.Buffer.isBuffer(e))throw new TypeError(`The \`${t}\` option's transform must use "objectMode: true" to receive as input: ${typeof e}.`);yield e},Mg=(t,e)=>t?T1.bind(void 0,e):C1.bind(void 0,e),T1=function*(t,e){Rg(t,e),yield e},C1=function*(t,e){if(Rg(t,e),typeof e!="string"&&!j(e))throw new TypeError(`The \`${t}\` option's function must yield a string or an Uint8Array, not ${typeof e}.`);yield e},Rg=(t,e)=>{if(e==null)throw new TypeError(`The \`${t}\` option's function must not call \`yield ${e}\`.
168
+ Instead, \`yield\` should either be called with a value, or not be called at all. For example:
169
+ if (condition) { yield value; }`)};var $g=require("buffer"),Bg=require("string_decoder");var ln=(t,e,r)=>{if(r)return;if(t)return{transform:A1.bind(void 0,new TextEncoder)};let i=new Bg.StringDecoder(e);return{transform:F1.bind(void 0,i),final:D1.bind(void 0,i)}},A1=function*(t,e){$g.Buffer.isBuffer(e)?yield Re(e):typeof e=="string"?yield t.encode(e):yield e},F1=function*(t,e){yield j(e)?t.write(e):e},D1=function*(t){let e=t.end();e!==""&&(yield e)};var ma=require("util"),ga=(0,ma.callbackify)(async(t,e,r,i)=>{e.currentIterable=t(...r);try{for await(let n of e.currentIterable)i.push(n)}finally{delete e.currentIterable}}),cn=async function*(t,e,r){if(r===e.length){yield t;return}let{transform:i=P1}=e[r];for await(let n of i(t))yield*cn(n,e,r+1)},kg=async function*(t){for(let[e,{final:r}]of Object.entries(t))yield*I1(r,Number(e),t)},I1=async function*(t,e,r){if(t!==void 0)for await(let i of t())yield*cn(i,r,e+1)},Ng=(0,ma.callbackify)(async({currentIterable:t},e)=>{if(t!==void 0){await(e?t.throw(e):t.return());return}if(e)throw e}),P1=function*(t){yield t};var ba=(t,e,r,i)=>{try{for(let n of t(...e))r.push(n);i()}catch(n){i(n)}},Lg=(t,e)=>[...e.flatMap(r=>[...ut(r,t,0)]),...Fr(t)],ut=function*(t,e,r){if(r===e.length){yield t;return}let{transform:i=R1}=e[r];for(let n of i(t))yield*ut(n,e,r+1)},Fr=function*(t){for(let[e,{final:r}]of Object.entries(t))yield*M1(r,Number(e),t)},M1=function*(t,e,r){if(t!==void 0)for(let i of t())yield*ut(i,r,e+1)},R1=function*(t){yield t};var ya=({value:t,value:{transform:e,final:r,writableObjectMode:i,readableObjectMode:n},optionName:s},{encoding:o})=>{let a={},l=jg(t,o,s),c=ct(e),u=ct(r),h=c?ga.bind(void 0,cn,a):ba.bind(void 0,ut),f=c||u?ga.bind(void 0,kg,a):ba.bind(void 0,Fr),m=c||u?Ng.bind(void 0,a):void 0;return{stream:new Dr.Transform({writableObjectMode:i,writableHighWaterMark:(0,Dr.getDefaultHighWaterMark)(i),readableObjectMode:n,readableHighWaterMark:(0,Dr.getDefaultHighWaterMark)(n),transform(v,C,E){h([v,l,0],this,E)},flush(v){f([l],this,v)},destroy:m})}},un=(t,e,r,i)=>{let n=e.filter(({type:o})=>o==="generator"),s=i?n.reverse():n;for(let{value:o,optionName:a}of s){let l=jg(o,r,a);t=Lg(l,t)}return t},jg=({transform:t,final:e,binary:r,writableObjectMode:i,readableObjectMode:n,preserveNewlines:s},o,a)=>{let l={};return[{transform:Pg(i,a)},ln(r,o,i),an(r,s,i,l),{transform:t,final:e},{transform:Mg(n,a)},Dg({binary:r,preserveNewlines:s,readableObjectMode:n,state:l})].filter(Boolean)};var Ug=(t,e)=>{for(let r of $1(t))B1(t,r,e)},$1=t=>new Set(Object.entries(t).filter(([,{direction:e}])=>e==="input").map(([e])=>Number(e))),B1=(t,e,r)=>{let{stdioItems:i}=t[e],n=i.filter(({contents:a})=>a!==void 0);if(n.length===0)return;if(e!==0){let[{type:a,optionName:l}]=n;throw new TypeError(`Only the \`stdin\` option, not \`${l}\`, can be ${Ye[a]} with synchronous methods.`)}let o=n.map(({contents:a})=>a).map(a=>k1(a,i));r.input=yr(o)},k1=(t,e)=>{let r=un(t,e,"utf8",!0);return N1(r),yr(r)},N1=t=>{let e=t.find(r=>typeof r!="string"&&!j(r));if(e!==void 0)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${e}.`)};var dn=require("fs");var hn=({stdioItems:t,encoding:e,verboseInfo:r,fdNumber:i})=>i!=="all"&&Ft(r,i)&&!H.has(e)&&L1(i)&&(t.some(({type:n,value:s})=>n==="native"&&j1.has(s))||t.every(({type:n})=>X.has(n))),L1=t=>t===1||t===2,j1=new Set(["pipe","overlapped"]),qg=async(t,e,r,i)=>{for await(let n of t)U1(e)||Vg(n,r,i)},Gg=(t,e,r)=>{for(let i of t)Vg(i,e,r)},U1=t=>t._readableState.pipes.length>0,Vg=(t,e,r)=>{let i=xi(t);pe({type:"output",verboseMessage:i,fdNumber:e,verboseInfo:r})};var Hg=({fileDescriptors:t,syncResult:{output:e},options:r,isMaxBuffer:i,verboseInfo:n})=>{if(e===null)return{output:Array.from({length:3})};let s={},o=new Set([]);return{output:e.map((l,c)=>q1({result:l,fileDescriptors:t,fdNumber:c,state:s,outputFiles:o,isMaxBuffer:i,verboseInfo:n},r)),...s}},q1=({result:t,fileDescriptors:e,fdNumber:r,state:i,outputFiles:n,isMaxBuffer:s,verboseInfo:o},{buffer:a,encoding:l,lines:c,stripFinalNewline:u,maxBuffer:h})=>{if(t===null)return;let f=Gm(t,s,h),m=Re(f),{stdioItems:g,objectMode:v}=e[r],C=G1([m],g,l,i),{serializedResult:E,finalResult:R=E}=V1({chunks:C,objectMode:v,encoding:l,lines:c,stripFinalNewline:u,fdNumber:r});H1({serializedResult:E,fdNumber:r,state:i,verboseInfo:o,encoding:l,stdioItems:g,objectMode:v});let U=a[r]?R:void 0;try{return i.error===void 0&&W1(E,g,n),U}catch(Y){return i.error=Y,U}},G1=(t,e,r,i)=>{try{return un(t,e,r,!1)}catch(n){return i.error=n,t}},V1=({chunks:t,objectMode:e,encoding:r,lines:i,stripFinalNewline:n,fdNumber:s})=>{if(e)return{serializedResult:t};if(r==="buffer")return{serializedResult:yr(t)};let o=Ad(t,r);return i[s]?{serializedResult:o,finalResult:pa(o,!n[s],e)}:{serializedResult:o}},H1=({serializedResult:t,fdNumber:e,state:r,verboseInfo:i,encoding:n,stdioItems:s,objectMode:o})=>{if(!hn({stdioItems:s,encoding:n,verboseInfo:i,fdNumber:e}))return;let a=pa(t,!1,o);try{Gg(a,e,i)}catch(l){r.error??(r.error=l)}},W1=(t,e,r)=>{for(let{path:i,append:n}of e.filter(({type:s})=>nn.has(s))){let s=typeof i=="string"?i:i.toString();n||r.has(s)?(0,dn.appendFileSync)(i,t):(r.add(s),(0,dn.writeFileSync)(i,t))}};var Wg=([,t,e],r)=>{if(r.all)return t===void 0?e:e===void 0?t:Array.isArray(t)?Array.isArray(e)?[...t,...e]:[...t,ke(e,r,"all")]:Array.isArray(e)?[ke(t,r,"all"),...e]:j(t)&&j(e)?wo([t,e]):`${t}${e}`};var fn=require("events");var zg=async(t,e)=>{let[r,i]=await z1(t);return e.isForcefullyTerminated??(e.isForcefullyTerminated=!1),[r,i]},z1=async t=>{let[e,r]=await Promise.allSettled([(0,fn.once)(t,"spawn"),(0,fn.once)(t,"exit")]);return e.status==="rejected"?[]:r.status==="rejected"?Yg(t):r.value},Yg=async t=>{try{return await(0,fn.once)(t,"exit")}catch{return Yg(t)}},Kg=async t=>{let[e,r]=await t;if(!Y1(e,r)&&wa(e,r))throw new ie;return[e,r]},Y1=(t,e)=>t===void 0&&e===void 0,wa=(t,e)=>t!==0||e!==null;var Jg=({error:t,status:e,signal:r,output:i},{maxBuffer:n})=>{let s=K1(t,e,r),o=s?.code==="ETIMEDOUT",a=qm(s,i,n);return{resultError:s,exitCode:e,signal:r,timedOut:o,isMaxBuffer:a}},K1=(t,e,r)=>t!==void 0?t:wa(e,r)?new ie:void 0;var Xg=(t,e,r)=>{let{file:i,commandArguments:n,command:s,escapedCommand:o,startTime:a,verboseInfo:l,options:c,fileDescriptors:u}=J1(t,e,r),h=Q1({file:i,commandArguments:n,options:c,command:s,escapedCommand:o,verboseInfo:l,fileDescriptors:u,startTime:a});return jt(h,l,c)},J1=(t,e,r)=>{let{command:i,escapedCommand:n,startTime:s,verboseInfo:o}=vi(t,e,r),a=Z1(r),{file:l,commandArguments:c,options:u}=Vi(t,e,a);X1(u);let h=Tg(u,o);return{file:l,commandArguments:c,command:i,escapedCommand:n,startTime:s,verboseInfo:o,options:u,fileDescriptors:h}},Z1=t=>t.node&&!t.ipc?{...t,ipc:!1}:t,X1=({ipc:t,ipcInput:e,detached:r,cancelSignal:i})=>{e&&pn("ipcInput"),t&&pn("ipc: true"),r&&pn("detached: true"),i&&pn("cancelSignal")},pn=t=>{throw new TypeError(`The "${t}" option cannot be used with synchronous methods.`)},Q1=({file:t,commandArguments:e,options:r,command:i,escapedCommand:n,verboseInfo:s,fileDescriptors:o,startTime:a})=>{let l=eO({file:t,commandArguments:e,options:r,command:i,escapedCommand:n,fileDescriptors:o,startTime:a});if(l.failed)return l;let{resultError:c,exitCode:u,signal:h,timedOut:f,isMaxBuffer:m}=Jg(l,r),{output:g,error:v=c}=Hg({fileDescriptors:o,syncResult:l,options:r,isMaxBuffer:m,verboseInfo:s}),C=g.map((R,U)=>ke(R,r,U)),E=ke(Wg(g,r),r,"all");return rO({error:v,exitCode:u,signal:h,timedOut:f,isMaxBuffer:m,stdio:C,all:E,options:r,command:i,escapedCommand:n,startTime:a})},eO=({file:t,commandArguments:e,options:r,command:i,escapedCommand:n,fileDescriptors:s,startTime:o})=>{try{Ug(s,r);let a=tO(r);return(0,Zg.spawnSync)(...Hi(t,e,a))}catch(a){return Lt({error:a,command:i,escapedCommand:n,fileDescriptors:s,options:r,startTime:o,isSync:!0})}},tO=({encoding:t,maxBuffer:e,...r})=>({...r,encoding:"buffer",maxBuffer:Qi(e)}),rO=({error:t,exitCode:e,signal:r,timedOut:i,isMaxBuffer:n,stdio:s,all:o,options:a,command:l,escapedCommand:c,startTime:u})=>t===void 0?en({command:l,escapedCommand:c,stdio:s,all:o,ipcOutput:[],options:a,startTime:u}):Ar({error:t,command:l,escapedCommand:c,timedOut:i,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:n,isForcefullyTerminated:!1,exitCode:e,signal:r,stdio:s,all:o,ipcOutput:[],options:a,startTime:u,isSync:!0});var ay=require("events"),ly=require("child_process");var xa=F(require("process"),1);var qt=require("events");var Qg=({anyProcess:t,channel:e,isSubprocess:r,ipc:i},{reference:n=!0,filter:s}={})=>(Mt({methodName:"getOneMessage",isSubprocess:r,ipc:i,isConnected:ki(t)}),iO({anyProcess:t,channel:e,isSubprocess:r,filter:s,reference:n})),iO=async({anyProcess:t,channel:e,isSubprocess:r,filter:i,reference:n})=>{Mi(e,n);let s=We(t,e,r),o=new AbortController;try{return await Promise.race([nO(s,i,o),sO(s,r,o),oO(s,r,o)])}catch(a){throw Rt(t),a}finally{o.abort(),Ri(e,n)}},nO=async(t,e,{signal:r})=>{if(e===void 0){let[i]=await(0,qt.once)(t,"message",{signal:r});return i}for await(let[i]of(0,qt.on)(t,"message",{signal:r}))if(e(i))return i},sO=async(t,e,{signal:r})=>{await(0,qt.once)(t,"disconnect",{signal:r}),Sp(e)},oO=async(t,e,{signal:r})=>{let[i]=await(0,qt.once)(t,"strict:error",{signal:r});throw Di(i,e)};var Ir=require("events");var tb=({anyProcess:t,channel:e,isSubprocess:r,ipc:i},{reference:n=!0}={})=>Sa({anyProcess:t,channel:e,isSubprocess:r,ipc:i,shouldAwait:!r,reference:n}),Sa=({anyProcess:t,channel:e,isSubprocess:r,ipc:i,shouldAwait:n,reference:s})=>{Mt({methodName:"getEachMessage",isSubprocess:r,ipc:i,isConnected:ki(t)}),Mi(e,s);let o=We(t,e,r),a=new AbortController,l={};return aO(t,o,a),lO({ipcEmitter:o,isSubprocess:r,controller:a,state:l}),cO({anyProcess:t,channel:e,ipcEmitter:o,isSubprocess:r,shouldAwait:n,controller:a,state:l,reference:s})},aO=async(t,e,r)=>{try{await(0,Ir.once)(e,"disconnect",{signal:r.signal}),r.abort()}catch{}},lO=async({ipcEmitter:t,isSubprocess:e,controller:r,state:i})=>{try{let[n]=await(0,Ir.once)(t,"strict:error",{signal:r.signal});i.error=Di(n,e),r.abort()}catch{}},cO=async function*({anyProcess:t,channel:e,ipcEmitter:r,isSubprocess:i,shouldAwait:n,controller:s,state:o,reference:a}){try{for await(let[l]of(0,Ir.on)(r,"message",{signal:s.signal}))eb(o),yield l}catch{eb(o)}finally{s.abort(),Ri(e,a),i||Rt(t),n&&await t}},eb=({error:t})=>{if(t)throw t};var rb=(t,{ipc:e})=>{Object.assign(t,nb(t,!1,e))},ib=()=>{let t=xa.default,e=!0,r=xa.default.channel!==void 0;return{...nb(t,e,r),getCancelSignal:em.bind(void 0,{anyProcess:t,channel:t.channel,isSubprocess:e,ipc:r})}},nb=(t,e,r)=>({sendMessage:Ui.bind(void 0,{anyProcess:t,channel:t.channel,isSubprocess:e,ipc:r}),getOneMessage:Qg.bind(void 0,{anyProcess:t,channel:t.channel,isSubprocess:e,ipc:r}),getEachMessage:tb.bind(void 0,{anyProcess:t,channel:t.channel,isSubprocess:e,ipc:r})});var sb=require("child_process"),Ke=require("stream");var ob=({error:t,command:e,escapedCommand:r,fileDescriptors:i,options:n,startTime:s,verboseInfo:o})=>{ua(i);let a=new sb.ChildProcess;uO(a,i),Object.assign(a,{readable:hO,writable:dO,duplex:fO});let l=Lt({error:t,command:e,escapedCommand:r,fileDescriptors:i,options:n,startTime:s,isSync:!1}),c=pO(l,o,n);return{subprocess:a,promise:c}},uO=(t,e)=>{let r=Pr(),i=Pr(),n=Pr(),s=Array.from({length:e.length-3},Pr),o=Pr(),a=[r,i,n,...s];Object.assign(t,{stdin:r,stdout:i,stderr:n,all:o,stdio:a})},Pr=()=>{let t=new Ke.PassThrough;return t.end(),t},hO=()=>new Ke.Readable({read(){}}),dO=()=>new Ke.Writable({write(){}}),fO=()=>new Ke.Duplex({read(){},write(){}}),pO=async(t,e,r)=>jt(t,e,r);var Gt=require("fs"),lb=require("buffer"),Se=require("stream");var cb=(t,e)=>on(mO,t,e,!1),Mr=({type:t,optionName:e})=>{throw new TypeError(`The \`${e}\` option cannot be ${Ye[t]}.`)},ab={fileNumber:Mr,generator:ya,asyncGenerator:ya,nodeStream:({value:t})=>({stream:t}),webTransform({value:{transform:t,writableObjectMode:e,readableObjectMode:r}}){let i=e||r;return{stream:Se.Duplex.fromWeb(t,{objectMode:i})}},duplex:({value:{transform:t}})=>({stream:t}),native(){}},mO={input:{...ab,fileUrl:({value:t})=>({stream:(0,Gt.createReadStream)(t)}),filePath:({value:{file:t}})=>({stream:(0,Gt.createReadStream)(t)}),webStream:({value:t})=>({stream:Se.Readable.fromWeb(t)}),iterable:({value:t})=>({stream:Se.Readable.from(t)}),asyncIterable:({value:t})=>({stream:Se.Readable.from(t)}),string:({value:t})=>({stream:Se.Readable.from(t)}),uint8Array:({value:t})=>({stream:Se.Readable.from(lb.Buffer.from(t))})},output:{...ab,fileUrl:({value:t})=>({stream:(0,Gt.createWriteStream)(t)}),filePath:({value:{file:t,append:e}})=>({stream:(0,Gt.createWriteStream)(t,e?{flags:"a"}:{})}),webStream:({value:t})=>({stream:Se.Writable.fromWeb(t)}),iterable:Mr,asyncIterable:Mr,string:Mr,uint8Array:Mr}};var Rr=require("events"),yn=require("stream"),Ea=require("stream/promises");function ht(t){if(!Array.isArray(t))throw new TypeError(`Expected an array, got \`${typeof t}\`.`);for(let n of t)va(n);let e=t.some(({readableObjectMode:n})=>n),r=gO(t,e),i=new _a({objectMode:e,writableHighWaterMark:r,readableHighWaterMark:r});for(let n of t)i.add(n);return i}var gO=(t,e)=>{if(t.length===0)return(0,yn.getDefaultHighWaterMark)(e);let r=t.filter(({readableObjectMode:i})=>i===e).map(({readableHighWaterMark:i})=>i);return Math.max(...r)},Je,gn,bn,$r,Br,Vt,_a=class extends yn.PassThrough{constructor(){super(...arguments);S(this,Je,new Set([]));S(this,gn,new Set([]));S(this,bn,new Set([]));S(this,$r);S(this,Br,Symbol("unpipe"));S(this,Vt,new WeakMap)}add(r){if(va(r),d(this,Je).has(r))return;d(this,Je).add(r),d(this,$r)??b(this,$r,bO(this,d(this,Je),d(this,Br)));let i=SO({passThroughStream:this,stream:r,streams:d(this,Je),ended:d(this,gn),aborted:d(this,bn),onFinished:d(this,$r),unpipeEvent:d(this,Br)});d(this,Vt).set(r,i),r.pipe(this,{end:!1})}async remove(r){if(va(r),!d(this,Je).has(r))return!1;let i=d(this,Vt).get(r);return i===void 0?!1:(d(this,Vt).delete(r),r.unpipe(this),await i,!0)}};Je=new WeakMap,gn=new WeakMap,bn=new WeakMap,$r=new WeakMap,Br=new WeakMap,Vt=new WeakMap;var bO=async(t,e,r)=>{mn(t,ub);let i=new AbortController;try{await Promise.race([yO(t,i),wO(t,e,r,i)])}finally{i.abort(),mn(t,-ub)}},yO=async(t,{signal:e})=>{try{await(0,Ea.finished)(t,{signal:e,cleanup:!0})}catch(r){throw db(t,r),r}},wO=async(t,e,r,{signal:i})=>{for await(let[n]of(0,Rr.on)(t,"unpipe",{signal:i}))e.has(n)&&n.emit(r)},va=t=>{if(typeof t?.pipe!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof t}\`.`)},SO=async({passThroughStream:t,stream:e,streams:r,ended:i,aborted:n,onFinished:s,unpipeEvent:o})=>{mn(t,hb);let a=new AbortController;try{await Promise.race([xO(s,e,a),_O({passThroughStream:t,stream:e,streams:r,ended:i,aborted:n,controller:a}),vO({stream:e,streams:r,ended:i,aborted:n,unpipeEvent:o,controller:a})])}finally{a.abort(),mn(t,-hb)}r.size>0&&r.size===i.size+n.size&&(i.size===0&&n.size>0?Oa(t):EO(t))},xO=async(t,e,{signal:r})=>{try{await t,r.aborted||Oa(e)}catch(i){r.aborted||db(e,i)}},_O=async({passThroughStream:t,stream:e,streams:r,ended:i,aborted:n,controller:{signal:s}})=>{try{await(0,Ea.finished)(e,{signal:s,cleanup:!0,readable:!0,writable:!1}),r.has(e)&&i.add(e)}catch(o){if(s.aborted||!r.has(e))return;fb(o)?n.add(e):pb(t,o)}},vO=async({stream:t,streams:e,ended:r,aborted:i,unpipeEvent:n,controller:{signal:s}})=>{if(await(0,Rr.once)(t,n,{signal:s}),!t.readable)return(0,Rr.once)(s,"abort",{signal:s});e.delete(t),r.delete(t),i.delete(t)},EO=t=>{t.writable&&t.end()},db=(t,e)=>{fb(e)?Oa(t):pb(t,e)},fb=t=>t?.code==="ERR_STREAM_PREMATURE_CLOSE",Oa=t=>{(t.readable||t.writable)&&t.destroy()},pb=(t,e)=>{t.destroyed||(t.once("error",OO),t.destroy(e))},OO=()=>{},mn=(t,e)=>{let r=t.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&t.setMaxListeners(r+e)},ub=2,hb=1;var Ta=require("stream/promises");var Ht=(t,e)=>{t.pipe(e),TO(t,e),CO(t,e)},TO=async(t,e)=>{if(!(re(t)||re(e))){try{await(0,Ta.finished)(t,{cleanup:!0,readable:!0,writable:!1})}catch{}Ca(e)}},Ca=t=>{t.writable&&t.end()},CO=async(t,e)=>{if(!(re(t)||re(e))){try{await(0,Ta.finished)(e,{cleanup:!0,readable:!1,writable:!0})}catch{}Aa(t)}},Aa=t=>{t.readable&&t.destroy()};var mb=(t,e,r)=>{let i=new Map;for(let[n,{stdioItems:s,direction:o}]of Object.entries(e)){for(let{stream:a}of s.filter(({type:l})=>X.has(l)))AO(t,a,o,n);for(let{stream:a}of s.filter(({type:l})=>!X.has(l)))DO({subprocess:t,stream:a,direction:o,fdNumber:n,pipeGroups:i,controller:r})}for(let[n,s]of i.entries()){let o=s.length===1?s[0]:ht(s);Ht(o,n)}},AO=(t,e,r,i)=>{r==="output"?Ht(t.stdio[i],e):Ht(e,t.stdio[i]);let n=FO[i];n!==void 0&&(t[n]=e),t.stdio[i]=e},FO=["stdin","stdout","stderr"],DO=({subprocess:t,stream:e,direction:r,fdNumber:i,pipeGroups:n,controller:s})=>{if(e===void 0)return;IO(e,s);let[o,a]=r==="output"?[e,t.stdio[i]]:[t.stdio[i],e],l=n.get(o)??[];n.set(o,[...l,a])},IO=(t,{signal:e})=>{re(t)&&at(t,PO,e)},PO=2;var yb=require("events");var dt=[];dt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&dt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&dt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var wn=t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function",Fa=Symbol.for("signal-exit emitter"),Da=globalThis,MO=Object.defineProperty.bind(Object),Ia=class{constructor(){Oe(this,"emitted",{afterExit:!1,exit:!1});Oe(this,"listeners",{afterExit:[],exit:[]});Oe(this,"count",0);Oe(this,"id",Math.random());if(Da[Fa])return Da[Fa];MO(Da,Fa,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,r){this.listeners[e].push(r)}removeListener(e,r){let i=this.listeners[e],n=i.indexOf(r);n!==-1&&(n===0&&i.length===1?i.length=0:i.splice(n,1))}emit(e,r,i){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(let s of this.listeners[e])n=s(r,i)===!0||n;return e==="exit"&&(n=this.emit("afterExit",r,i)||n),n}},Sn=class{},RO=t=>({onExit(e,r){return t.onExit(e,r)},load(){return t.load()},unload(){return t.unload()}}),Pa=class extends Sn{onExit(){return()=>{}}load(){}unload(){}},xn,W,N,Wt,zt,ft,Ze,Yt,gb,bb,Ma=class extends Sn{constructor(r){super();S(this,Yt);S(this,xn,Ra.platform==="win32"?"SIGINT":"SIGHUP");S(this,W,new Ia);S(this,N);S(this,Wt);S(this,zt);S(this,ft,{});S(this,Ze,!1);b(this,N,r),b(this,ft,{});for(let i of dt)d(this,ft)[i]=()=>{let n=d(this,N).listeners(i),{count:s}=d(this,W),o=r;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(s+=o.__signal_exit_emitter__.count),n.length===s){this.unload();let a=d(this,W).emit("exit",null,i),l=i==="SIGHUP"?d(this,xn):i;a||r.kill(r.pid,l)}};b(this,zt,r.reallyExit),b(this,Wt,r.emit)}onExit(r,i){if(!wn(d(this,N)))return()=>{};d(this,Ze)===!1&&this.load();let n=i?.alwaysLast?"afterExit":"exit";return d(this,W).on(n,r),()=>{d(this,W).removeListener(n,r),d(this,W).listeners.exit.length===0&&d(this,W).listeners.afterExit.length===0&&this.unload()}}load(){if(!d(this,Ze)){b(this,Ze,!0),d(this,W).count+=1;for(let r of dt)try{let i=d(this,ft)[r];i&&d(this,N).on(r,i)}catch{}d(this,N).emit=(r,...i)=>_(this,Yt,bb).call(this,r,...i),d(this,N).reallyExit=r=>_(this,Yt,gb).call(this,r)}}unload(){d(this,Ze)&&(b(this,Ze,!1),dt.forEach(r=>{let i=d(this,ft)[r];if(!i)throw new Error("Listener not defined for signal: "+r);try{d(this,N).removeListener(r,i)}catch{}}),d(this,N).emit=d(this,Wt),d(this,N).reallyExit=d(this,zt),d(this,W).count-=1)}};xn=new WeakMap,W=new WeakMap,N=new WeakMap,Wt=new WeakMap,zt=new WeakMap,ft=new WeakMap,Ze=new WeakMap,Yt=new WeakSet,gb=function(r){return wn(d(this,N))?(d(this,N).exitCode=r||0,d(this,W).emit("exit",d(this,N).exitCode,null),d(this,zt).call(d(this,N),d(this,N).exitCode)):0},bb=function(r,...i){let n=d(this,Wt);if(r==="exit"&&wn(d(this,N))){typeof i[0]=="number"&&(d(this,N).exitCode=i[0]);let s=n.call(d(this,N),r,...i);return d(this,W).emit("exit",d(this,N).exitCode,null),s}else return n.call(d(this,N),r,...i)};var Ra=globalThis.process,{onExit:_n,load:BR,unload:kR}=RO(wn(Ra)?new Ma(Ra):new Pa);var wb=(t,{cleanup:e,detached:r},{signal:i})=>{if(!e||r)return;let n=_n(()=>{t.kill()});(0,yb.addAbortListener)(i,()=>{n()})};var xb=({source:t,sourcePromise:e,boundOptions:r,createNested:i},...n)=>{let s=_i(),{destination:o,destinationStream:a,destinationError:l,from:c,unpipeSignal:u}=$O(r,i,n),{sourceStream:h,sourceError:f}=kO(t,c),{options:m,fileDescriptors:g}=ge.get(t);return{sourcePromise:e,sourceStream:h,sourceOptions:m,sourceError:f,destination:o,destinationStream:a,destinationError:l,unpipeSignal:u,fileDescriptors:g,startTime:s}},$O=(t,e,r)=>{try{let{destination:i,pipeOptions:{from:n,to:s,unpipeSignal:o}={}}=BO(t,e,...r),a=Pi(i,s);return{destination:i,destinationStream:a,from:n,unpipeSignal:o}}catch(i){return{destinationError:i}}},BO=(t,e,r,...i)=>{if(Array.isArray(r))return{destination:e(Sb,t)(r,...i),pipeOptions:t};if(typeof r=="string"||r instanceof URL||bo(r)){if(Object.keys(t).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[n,s,o]=hi(r,...i);return{destination:e(Sb)(n,s,o),pipeOptions:o}}if(ge.has(r)){if(Object.keys(t).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:i[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},Sb=({options:t})=>({options:{...t,stdin:"pipe",piped:!0}}),kO=(t,e)=>{try{return{sourceStream:$t(t,e)}}catch(r){return{sourceError:r}}};var vb=({sourceStream:t,sourceError:e,destinationStream:r,destinationError:i,fileDescriptors:n,sourceOptions:s,startTime:o})=>{let a=NO({sourceStream:t,sourceError:e,destinationStream:r,destinationError:i});if(a!==void 0)throw $a({error:a,fileDescriptors:n,sourceOptions:s,startTime:o})},NO=({sourceStream:t,sourceError:e,destinationStream:r,destinationError:i})=>{if(e!==void 0&&i!==void 0)return i;if(i!==void 0)return Aa(t),i;if(e!==void 0)return Ca(r),e},$a=({error:t,fileDescriptors:e,sourceOptions:r,startTime:i})=>Lt({error:t,command:_b,escapedCommand:_b,fileDescriptors:e,options:r,startTime:i,isSync:!1}),_b="source.pipe(destination)";var Eb=async t=>{let[{status:e,reason:r,value:i=r},{status:n,reason:s,value:o=s}]=await t;if(o.pipedFrom.includes(i)||o.pipedFrom.push(i),n==="rejected")throw o;if(e==="rejected")throw i;return o};var Ob=require("stream/promises");var Tb=(t,e,r)=>{let i=vn.has(e)?jO(t,e):LO(t,e);return at(t,qO,r.signal),at(e,GO,r.signal),UO(e),i},LO=(t,e)=>{let r=ht([t]);return Ht(r,e),vn.set(e,r),r},jO=(t,e)=>{let r=vn.get(e);return r.add(t),r},UO=async t=>{try{await(0,Ob.finished)(t,{cleanup:!0,readable:!1,writable:!0})}catch{}vn.delete(t)},vn=new WeakMap,qO=2,GO=1;var Cb=require("util");var Ab=(t,e)=>t===void 0?[]:[VO(t,e)],VO=async(t,{sourceStream:e,mergedStream:r,fileDescriptors:i,sourceOptions:n,startTime:s})=>{await(0,Cb.aborted)(t,e),await r.remove(e);let o=new Error("Pipe canceled by `unpipeSignal` option.");throw $a({error:o,fileDescriptors:i,sourceOptions:n,startTime:s})};var En=(t,...e)=>{if(L(e[0]))return En.bind(void 0,{...t,boundOptions:{...t.boundOptions,...e[0]}});let{destination:r,...i}=xb(t,...e),n=HO({...i,destination:r});return n.pipe=En.bind(void 0,{...t,source:r,sourcePromise:n,boundOptions:{}}),n},HO=async({sourcePromise:t,sourceStream:e,sourceOptions:r,sourceError:i,destination:n,destinationStream:s,destinationError:o,unpipeSignal:a,fileDescriptors:l,startTime:c})=>{let u=WO(t,n);vb({sourceStream:e,sourceError:i,destinationStream:s,destinationError:o,fileDescriptors:l,sourceOptions:r,startTime:c});let h=new AbortController;try{let f=Tb(e,s,h);return await Promise.race([Eb(u),...Ab(a,{sourceStream:e,mergedStream:f,sourceOptions:r,fileDescriptors:l,startTime:c})])}finally{h.abort()}},WO=(t,e)=>Promise.allSettled([t,e]);var Mb=require("timers/promises");var Db=require("events"),Ib=require("stream");var On=({subprocessStdout:t,subprocess:e,binary:r,shouldEncode:i,encoding:n,preserveNewlines:s})=>{let o=new AbortController;return zO(e,o),Pb({stream:t,controller:o,binary:r,shouldEncode:!t.readableObjectMode&&i,encoding:n,shouldSplit:!t.readableObjectMode,preserveNewlines:s})},zO=async(t,e)=>{try{await t}catch{}finally{e.abort()}},Ba=({stream:t,onStreamEnd:e,lines:r,encoding:i,stripFinalNewline:n,allMixed:s})=>{let o=new AbortController;YO(e,o,t);let a=t.readableObjectMode&&!s;return Pb({stream:t,controller:o,binary:i==="buffer",shouldEncode:!a,encoding:i,shouldSplit:!a&&r,preserveNewlines:!n})},YO=async(t,e,r)=>{try{await t}catch{r.destroy()}finally{e.abort()}},Pb=({stream:t,controller:e,binary:r,shouldEncode:i,encoding:n,shouldSplit:s,preserveNewlines:o})=>{let a=(0,Db.on)(t,"data",{signal:e.signal,highWaterMark:Fb,highWatermark:Fb});return KO({onStdoutChunk:a,controller:e,binary:r,shouldEncode:i,encoding:n,shouldSplit:s,preserveNewlines:o})},ka=(0,Ib.getDefaultHighWaterMark)(!0),Fb=ka,KO=async function*({onStdoutChunk:t,controller:e,binary:r,shouldEncode:i,encoding:n,shouldSplit:s,preserveNewlines:o}){let a=JO({binary:r,shouldEncode:i,encoding:n,shouldSplit:s,preserveNewlines:o});try{for await(let[l]of t)yield*ut(l,a,0)}catch(l){if(!e.signal.aborted)throw l}finally{yield*Fr(a)}},JO=({binary:t,shouldEncode:e,encoding:r,shouldSplit:i,preserveNewlines:n})=>[ln(t,r,!e),an(t,n,!i,{})].filter(Boolean);var Rb=async({stream:t,onStreamEnd:e,fdNumber:r,encoding:i,buffer:n,maxBuffer:s,lines:o,allMixed:a,stripFinalNewline:l,verboseInfo:c,streamInfo:u})=>{let h=ZO({stream:t,onStreamEnd:e,fdNumber:r,encoding:i,allMixed:a,verboseInfo:c,streamInfo:u});if(!n){await Promise.all([XO(t),h]);return}let f=da(l,r),m=Ba({stream:t,onStreamEnd:e,lines:o,encoding:i,stripFinalNewline:f,allMixed:a}),[g]=await Promise.all([QO({stream:t,iterable:m,fdNumber:r,encoding:i,maxBuffer:s,lines:o}),h]);return g},ZO=async({stream:t,onStreamEnd:e,fdNumber:r,encoding:i,allMixed:n,verboseInfo:s,streamInfo:{fileDescriptors:o}})=>{if(!hn({stdioItems:o[r]?.stdioItems,encoding:i,verboseInfo:s,fdNumber:r}))return;let a=Ba({stream:t,onStreamEnd:e,lines:!0,encoding:i,stripFinalNewline:!0,allMixed:n});await qg(a,t,r,s)},XO=async t=>{await(0,Mb.setImmediate)(),t.readableFlowing===null&&t.resume()},QO=async({stream:t,stream:{readableObjectMode:e},iterable:r,fdNumber:i,encoding:n,maxBuffer:s,lines:o})=>{try{return e||o?await Ki(r,{maxBuffer:s}):n==="buffer"?new Uint8Array(await Ji(r,{maxBuffer:s})):await Xi(r,{maxBuffer:s})}catch(a){return $b(Lm({error:a,stream:t,readableObjectMode:e,lines:o,encoding:n,fdNumber:i}))}},Na=async t=>{try{return await t}catch(e){return $b(e)}},$b=({bufferedData:t})=>Td(t)?new Uint8Array(t):t;var kb=require("stream/promises"),kr=async(t,e,r,{isSameDirection:i,stopOnExit:n=!1}={})=>{let s=eT(t,r),o=new AbortController;try{await Promise.race([...n?[r.exitPromise]:[],(0,kb.finished)(t,{cleanup:!0,signal:o.signal})])}catch(a){s.stdinCleanedUp||iT(a,e,r,i)}finally{o.abort()}},eT=(t,{originalStreams:[e],subprocess:r})=>{let i={stdinCleanedUp:!1};return t===e&&tT(t,r,i),i},tT=(t,e,r)=>{let{_destroy:i}=t;t._destroy=(...n)=>{rT(e,r),i.call(t,...n)}},rT=({exitCode:t,signalCode:e},r)=>{(t!==null||e!==null)&&(r.stdinCleanedUp=!0)},iT=(t,e,r,i)=>{if(!nT(t,e,r,i))throw t},nT=(t,e,r,i=!0)=>r.propagating?Bb(t)||Tn(t):(r.propagating=!0,La(r,e)===i?Bb(t):Tn(t)),La=({fileDescriptors:t},e)=>e!=="all"&&t[e].direction==="input",Tn=t=>t?.code==="ERR_STREAM_PREMATURE_CLOSE",Bb=t=>t?.code==="EPIPE";var Nb=({subprocess:t,encoding:e,buffer:r,maxBuffer:i,lines:n,stripFinalNewline:s,verboseInfo:o,streamInfo:a})=>t.stdio.map((l,c)=>ja({stream:l,fdNumber:c,encoding:e,buffer:r[c],maxBuffer:i[c],lines:n[c],allMixed:!1,stripFinalNewline:s,verboseInfo:o,streamInfo:a})),ja=async({stream:t,fdNumber:e,encoding:r,buffer:i,maxBuffer:n,lines:s,allMixed:o,stripFinalNewline:a,verboseInfo:l,streamInfo:c})=>{if(!t)return;let u=kr(t,e,c);if(La(c,e)){await u;return}let[h]=await Promise.all([Rb({stream:t,onStreamEnd:u,fdNumber:e,encoding:r,buffer:i,maxBuffer:n,lines:s,allMixed:o,stripFinalNewline:a,verboseInfo:l,streamInfo:c}),u]);return h};var Lb=({stdout:t,stderr:e},{all:r})=>r&&(t||e)?ht([t,e].filter(Boolean)):void 0,jb=({subprocess:t,encoding:e,buffer:r,maxBuffer:i,lines:n,stripFinalNewline:s,verboseInfo:o,streamInfo:a})=>ja({...sT(t,r),fdNumber:"all",encoding:e,maxBuffer:i[1]+i[2],lines:n[1]||n[2],allMixed:oT(t),stripFinalNewline:s,verboseInfo:o,streamInfo:a}),sT=({stdout:t,stderr:e,all:r},[,i,n])=>{let s=i||n;return s?i?n?{stream:r,buffer:s}:{stream:t,buffer:s}:{stream:e,buffer:s}:{stream:r,buffer:s}},oT=({all:t,stdout:e,stderr:r})=>t&&e&&r&&e.readableObjectMode!==r.readableObjectMode;var Hb=require("events");var Ub=t=>Ft(t,"ipc"),qb=(t,e)=>{let r=xi(t);pe({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:e})};var Gb=async({subprocess:t,buffer:e,maxBuffer:r,ipc:i,ipcOutput:n,verboseInfo:s})=>{if(!i)return n;let o=Ub(s),a=$e(e,"ipc"),l=$e(r,"ipc");for await(let c of Sa({anyProcess:t,channel:t.channel,isSubprocess:!1,ipc:i,shouldAwait:!1,reference:!0}))a&&(jm(t,n,l),n.push(c)),o&&qb(c,s);return n},Vb=async(t,e)=>(await Promise.allSettled([t]),e);var Wb=async({subprocess:t,options:{encoding:e,buffer:r,maxBuffer:i,lines:n,timeoutDuration:s,cancelSignal:o,gracefulCancel:a,forceKillAfterDelay:l,stripFinalNewline:c,ipc:u,ipcInput:h},context:f,verboseInfo:m,fileDescriptors:g,originalStreams:v,onInternalError:C,controller:E})=>{let R=zg(t,f),U={originalStreams:v,fileDescriptors:g,subprocess:t,exitPromise:R,propagating:!1},Y=Nb({subprocess:t,encoding:e,buffer:r,maxBuffer:i,lines:n,stripFinalNewline:c,verboseInfo:m,streamInfo:U}),Ee=jb({subprocess:t,encoding:e,buffer:r,maxBuffer:i,lines:n,stripFinalNewline:c,verboseInfo:m,streamInfo:U}),Ne=[],it=Gb({subprocess:t,buffer:r,maxBuffer:i,ipc:u,ipcOutput:Ne,verboseInfo:m}),St=aT(v,t,U),Le=lT(g,U);try{return await Promise.race([Promise.all([{},Kg(R),Promise.all(Y),Ee,it,hm(t,h),...St,...Le]),C,cT(t,E),...om(t,s,f,E),...wp({subprocess:t,cancelSignal:o,gracefulCancel:a,context:f,controller:E}),...im({subprocess:t,cancelSignal:o,gracefulCancel:a,forceKillAfterDelay:l,context:f,controller:E})])}catch(Bn){return f.terminationReason??(f.terminationReason="other"),Promise.all([{error:Bn},R,Promise.all(Y.map(ir=>Na(ir))),Na(Ee),Vb(it,Ne),Promise.allSettled(St),Promise.allSettled(Le)])}},aT=(t,e,r)=>t.map((i,n)=>i===e.stdio[n]?void 0:kr(i,n,r)),lT=(t,e)=>t.flatMap(({stdioItems:r},i)=>r.filter(({value:n,stream:s=n})=>se(s,{checkOpen:!1})&&!re(s)).map(({type:n,value:s,stream:o=s})=>kr(o,i,e,{isSameDirection:X.has(n),stopOnExit:n==="native"}))),cT=async(t,{signal:e})=>{let[r]=await(0,Hb.once)(t,"error",{signal:e});throw r};var zb=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),Nr=(t,e,r)=>{let i=t[r];i.has(e)||i.set(e,[]);let n=i.get(e),s=me();return n.push(s),{resolve:s.resolve.bind(s),promises:n}},Kt=async({resolve:t,promises:e},r)=>{t();let[i]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...e])]);return!i};var Kb=require("stream"),Jb=require("util");var Ua=require("stream/promises");var qa=async t=>{if(t!==void 0)try{await Ga(t)}catch{}},Yb=async t=>{if(t!==void 0)try{await Va(t)}catch{}},Ga=async t=>{await(0,Ua.finished)(t,{cleanup:!0,readable:!1,writable:!0})},Va=async t=>{await(0,Ua.finished)(t,{cleanup:!0,readable:!0,writable:!1})},Cn=async(t,e)=>{if(await t,e)throw e},An=(t,e,r)=>{r&&!Tn(r)?t.destroy(r):e&&t.destroy()};var Zb=({subprocess:t,concurrentStreams:e,encoding:r},{from:i,binary:n=!0,preserveNewlines:s=!0}={})=>{let o=n||H.has(r),{subprocessStdout:a,waitReadableDestroy:l}=Ha(t,i,e),{readableEncoding:c,readableObjectMode:u,readableHighWaterMark:h}=Wa(a,o),{read:f,onStdoutDataDone:m}=za({subprocessStdout:a,subprocess:t,binary:o,encoding:r,preserveNewlines:s}),g=new Kb.Readable({read:f,destroy:(0,Jb.callbackify)(Ka.bind(void 0,{subprocessStdout:a,subprocess:t,waitReadableDestroy:l})),highWaterMark:h,objectMode:u,encoding:c});return Ya({subprocessStdout:a,onStdoutDataDone:m,readable:g,subprocess:t}),g},Ha=(t,e,r)=>{let i=$t(t,e),n=Nr(r,i,"readableDestroy");return{subprocessStdout:i,waitReadableDestroy:n}},Wa=({readableEncoding:t,readableObjectMode:e,readableHighWaterMark:r},i)=>i?{readableEncoding:t,readableObjectMode:e,readableHighWaterMark:r}:{readableEncoding:t,readableObjectMode:!0,readableHighWaterMark:ka},za=({subprocessStdout:t,subprocess:e,binary:r,encoding:i,preserveNewlines:n})=>{let s=me(),o=On({subprocessStdout:t,subprocess:e,binary:r,shouldEncode:!r,encoding:i,preserveNewlines:n});return{read(){uT(this,o,s)},onStdoutDataDone:s}},uT=async(t,e,r)=>{try{let{value:i,done:n}=await e.next();n?r.resolve():t.push(i)}catch{}},Ya=async({subprocessStdout:t,onStdoutDataDone:e,readable:r,subprocess:i,subprocessStdin:n})=>{try{await Va(t),await i,await qa(n),await e,r.readable&&r.push(null)}catch(s){await qa(n),Xb(r,s)}},Ka=async({subprocessStdout:t,subprocess:e,waitReadableDestroy:r},i)=>{await Kt(r,e)&&(Xb(t,i),await Cn(e,i))},Xb=(t,e)=>{An(t,t.readable,e)};var Qb=require("stream"),Ja=require("util");var ey=({subprocess:t,concurrentStreams:e},{to:r}={})=>{let{subprocessStdin:i,waitWritableFinal:n,waitWritableDestroy:s}=Za(t,r,e),o=new Qb.Writable({...Xa(i,t,n),destroy:(0,Ja.callbackify)(el.bind(void 0,{subprocessStdin:i,subprocess:t,waitWritableFinal:n,waitWritableDestroy:s})),highWaterMark:i.writableHighWaterMark,objectMode:i.writableObjectMode});return Qa(i,o),o},Za=(t,e,r)=>{let i=Pi(t,e),n=Nr(r,i,"writableFinal"),s=Nr(r,i,"writableDestroy");return{subprocessStdin:i,waitWritableFinal:n,waitWritableDestroy:s}},Xa=(t,e,r)=>({write:hT.bind(void 0,t),final:(0,Ja.callbackify)(dT.bind(void 0,t,e,r))}),hT=(t,e,r,i)=>{t.write(e,r)?i():t.once("drain",i)},dT=async(t,e,r)=>{await Kt(r,e)&&(t.writable&&t.end(),await e)},Qa=async(t,e,r)=>{try{await Ga(t),e.writable&&e.end()}catch(i){await Yb(r),ty(e,i)}},el=async({subprocessStdin:t,subprocess:e,waitWritableFinal:r,waitWritableDestroy:i},n)=>{await Kt(r,e),await Kt(i,e)&&(ty(t,n),await Cn(e,n))},ty=(t,e)=>{An(t,t.writable,e)};var ry=require("stream"),iy=require("util");var ny=({subprocess:t,concurrentStreams:e,encoding:r},{from:i,to:n,binary:s=!0,preserveNewlines:o=!0}={})=>{let a=s||H.has(r),{subprocessStdout:l,waitReadableDestroy:c}=Ha(t,i,e),{subprocessStdin:u,waitWritableFinal:h,waitWritableDestroy:f}=Za(t,n,e),{readableEncoding:m,readableObjectMode:g,readableHighWaterMark:v}=Wa(l,a),{read:C,onStdoutDataDone:E}=za({subprocessStdout:l,subprocess:t,binary:a,encoding:r,preserveNewlines:o}),R=new ry.Duplex({read:C,...Xa(u,t,h),destroy:(0,iy.callbackify)(fT.bind(void 0,{subprocessStdout:l,subprocessStdin:u,subprocess:t,waitReadableDestroy:c,waitWritableFinal:h,waitWritableDestroy:f})),readableHighWaterMark:v,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:g,writableObjectMode:u.writableObjectMode,encoding:m});return Ya({subprocessStdout:l,onStdoutDataDone:E,readable:R,subprocess:t,subprocessStdin:u}),Qa(u,R,l),R},fT=async({subprocessStdout:t,subprocessStdin:e,subprocess:r,waitReadableDestroy:i,waitWritableFinal:n,waitWritableDestroy:s},o)=>{await Promise.all([Ka({subprocessStdout:t,subprocess:r,waitReadableDestroy:i},o),el({subprocessStdin:e,subprocess:r,waitWritableFinal:n,waitWritableDestroy:s},o)])};var tl=(t,e,{from:r,binary:i=!1,preserveNewlines:n=!1}={})=>{let s=i||H.has(e),o=$t(t,r),a=On({subprocessStdout:o,subprocess:t,binary:s,shouldEncode:!0,encoding:e,preserveNewlines:n});return pT(a,o,t)},pT=async function*(t,e,r){try{yield*t}finally{e.readable&&e.destroy(),await r}};var sy=(t,{encoding:e})=>{let r=zb();t.readable=Zb.bind(void 0,{subprocess:t,concurrentStreams:r,encoding:e}),t.writable=ey.bind(void 0,{subprocess:t,concurrentStreams:r}),t.duplex=ny.bind(void 0,{subprocess:t,concurrentStreams:r,encoding:e}),t.iterable=tl.bind(void 0,t,e),t[Symbol.asyncIterator]=tl.bind(void 0,t,e,{})};var oy=(t,e)=>{for(let[r,i]of gT){let n=i.value.bind(e);Reflect.defineProperty(t,r,{...i,value:n})}},mT=(async()=>{})().constructor.prototype,gT=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(mT,t)]);var cy=(t,e,r,i)=>{let{file:n,commandArguments:s,command:o,escapedCommand:a,startTime:l,verboseInfo:c,options:u,fileDescriptors:h}=bT(t,e,r),{subprocess:f,promise:m}=wT({file:n,commandArguments:s,options:u,startTime:l,verboseInfo:c,command:o,escapedCommand:a,fileDescriptors:h});return f.pipe=En.bind(void 0,{source:f,sourcePromise:m,boundOptions:{},createNested:i}),oy(f,m),ge.set(f,{options:u,fileDescriptors:h}),f},bT=(t,e,r)=>{let{command:i,escapedCommand:n,startTime:s,verboseInfo:o}=vi(t,e,r),{file:a,commandArguments:l,options:c}=Vi(t,e,r),u=yT(c),h=cb(u,o);return{file:a,commandArguments:l,command:i,escapedCommand:n,startTime:s,verboseInfo:o,options:u,fileDescriptors:h}},yT=({timeout:t,signal:e,...r})=>{if(e!==void 0)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:t}},wT=({file:t,commandArguments:e,options:r,startTime:i,verboseInfo:n,command:s,escapedCommand:o,fileDescriptors:a})=>{let l;try{l=(0,ly.spawn)(...Hi(t,e,r))}catch(g){return ob({error:g,command:s,escapedCommand:o,fileDescriptors:a,options:r,startTime:i,verboseInfo:n})}let c=new AbortController;(0,ay.setMaxListeners)(Number.POSITIVE_INFINITY,c.signal);let u=[...l.stdio];mb(l,a,c),wb(l,r,c);let h={},f=me();l.kill=gp.bind(void 0,{kill:l.kill.bind(l),options:r,onInternalError:f,context:h,controller:c}),l.all=Lb(l,r),sy(l,r),rb(l,r);let m=ST({subprocess:l,options:r,startTime:i,verboseInfo:n,fileDescriptors:a,originalStreams:u,command:s,escapedCommand:o,context:h,onInternalError:f,controller:c});return{subprocess:l,promise:m}},ST=async({subprocess:t,options:e,startTime:r,verboseInfo:i,fileDescriptors:n,originalStreams:s,command:o,escapedCommand:a,context:l,onInternalError:c,controller:u})=>{let[h,[f,m],g,v,C]=await Wb({subprocess:t,options:e,context:l,verboseInfo:i,fileDescriptors:n,originalStreams:s,onInternalError:c,controller:u});u.abort(),c.resolve();let E=g.map((Y,Ee)=>ke(Y,e,Ee)),R=ke(v,e,"all"),U=xT({errorInfo:h,exitCode:f,signal:m,stdio:E,all:R,ipcOutput:C,context:l,options:e,command:o,escapedCommand:a,startTime:r});return jt(U,i,e)},xT=({errorInfo:t,exitCode:e,signal:r,stdio:i,all:n,ipcOutput:s,context:o,options:a,command:l,escapedCommand:c,startTime:u})=>"error"in t?Ar({error:t.error,command:l,escapedCommand:c,timedOut:o.terminationReason==="timeout",isCanceled:o.terminationReason==="cancel"||o.terminationReason==="gracefulCancel",isGracefullyCanceled:o.terminationReason==="gracefulCancel",isMaxBuffer:t.error instanceof ye,isForcefullyTerminated:o.isForcefullyTerminated,exitCode:e,signal:r,stdio:i,all:n,ipcOutput:s,options:a,startTime:u,isSync:!1}):en({command:l,escapedCommand:c,stdio:i,all:n,ipcOutput:s,options:a,startTime:u});var Fn=(t,e)=>{let r=Object.fromEntries(Object.entries(e).map(([i,n])=>[i,_T(i,t[i],n)]));return{...t,...r}},_T=(t,e,r)=>vT.has(t)&&L(e)&&L(r)?{...e,...r}:r,vT=new Set(["env",..._o]);var Xe=(t,e,r,i)=>{let n=(o,a,l)=>Xe(o,a,r,l),s=(...o)=>ET({mapArguments:t,deepOptions:r,boundOptions:e,setBoundExeca:i,createNested:n},...o);return i!==void 0&&i(s,n,e),s},ET=({mapArguments:t,deepOptions:e={},boundOptions:r={},setBoundExeca:i,createNested:n},s,...o)=>{if(L(s))return n(t,Fn(r,s),i);let{file:a,commandArguments:l,options:c,isSync:u}=OT({mapArguments:t,firstArgument:s,nextArguments:o,deepOptions:e,boundOptions:r});return u?Xg(a,l,c):cy(a,l,c,n)},OT=({mapArguments:t,firstArgument:e,nextArguments:r,deepOptions:i,boundOptions:n})=>{let s=Md(e)?Rd(e,r):[e,...r],[o,a,l]=hi(...s),c=Fn(Fn(i,n),l),{file:u=o,commandArguments:h=a,options:f=c,isSync:m=!1}=t({file:o,commandArguments:a,options:c});return{file:u,commandArguments:h,options:f,isSync:m}};var uy=({file:t,commandArguments:e})=>dy(t,e),hy=({file:t,commandArguments:e})=>({...dy(t,e),isSync:!0}),dy=(t,e)=>{if(e.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${t} ${e}.`);let[r,...i]=TT(t);return{file:r,commandArguments:i}},TT=t=>{if(typeof t!="string")throw new TypeError(`The command must be a string: ${String(t)}.`);let e=t.trim();if(e==="")return[];let r=[];for(let i of e.split(CT)){let n=r.at(-1);n&&n.endsWith("\\")?r[r.length-1]=`${n.slice(0,-1)} ${i}`:r.push(i)}return r},CT=/ +/g;var fy=(t,e,r)=>{t.sync=e(AT,r),t.s=t.sync},py=({options:t})=>my(t),AT=({options:t})=>({...my(t),isSync:!0}),my=t=>({options:{...FT(t),...t}}),FT=({input:t,inputFile:e,stdio:r})=>t===void 0&&e===void 0&&r===void 0?{stdin:"inherit"}:{},gy={preferLocal:!0};var k=Xe(()=>({})),uk=Xe(()=>({isSync:!0})),hk=Xe(uy),dk=Xe(hy),fk=Xe(am),pk=Xe(py,{},gy,fy),{sendMessage:mk,getOneMessage:gk,getEachMessage:bk,getCancelSignal:yk}=ib();var ve=F(require("fs")),rt=F(require("path"));var Qt=F(require("process"),1),Ty=require("util");var il=F(require("process"),1);var Lr=F(require("process"),1);var DT=(t,e,r,i)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let n=Object.getOwnPropertyDescriptor(t,r),s=Object.getOwnPropertyDescriptor(e,r);!IT(n,s)&&i||Object.defineProperty(t,r,s)},IT=function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},PT=(t,e)=>{let r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},MT=(t,e)=>`/* Wrapped ${t}*/
170
+ ${e}`,RT=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),$T=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),BT=(t,e,r)=>{let i=r===""?"":`with ${r.trim()}() `,n=MT.bind(null,i,e.toString());Object.defineProperty(n,"name",$T);let{writable:s,enumerable:o,configurable:a}=RT;Object.defineProperty(t,"toString",{value:n,writable:s,enumerable:o,configurable:a})};function rl(t,e,{ignoreNonConfigurable:r=!1}={}){let{name:i}=t;for(let n of Reflect.ownKeys(e))DT(t,e,n,r);return PT(t,e),BT(t,e,i),t}var Dn=new WeakMap,by=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,i=0,n=t.displayName||t.name||"<anonymous>",s=function(...o){if(Dn.set(s,++i),i===1)r=t.apply(this,o),t=void 0;else if(e.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return r};return rl(s,t),Dn.set(s,i),s};by.callCount=t=>{if(!Dn.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return Dn.get(t)};var yy=by;var wy=Lr.default.stderr.isTTY?Lr.default.stderr:Lr.default.stdout.isTTY?Lr.default.stdout:void 0,kT=wy?yy(()=>{_n(()=>{wy.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},Sy=kT;var In=!1,Jt={};Jt.show=(t=il.default.stderr)=>{t.isTTY&&(In=!1,t.write("\x1B[?25h"))};Jt.hide=(t=il.default.stderr)=>{t.isTTY&&(Sy(),In=!0,t.write("\x1B[?25l"))};Jt.toggle=(t,e)=>{t!==void 0&&(In=t),In?Jt.show(e):Jt.hide(e)};var nl=Jt;var sl={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots14:{interval:80,frames:["\u2809\u2809","\u2808\u2819","\u2800\u2839","\u2800\u28B8","\u2800\u28F0","\u2880\u28E0","\u28C0\u28C0","\u28C4\u2840","\u28C6\u2800","\u2847\u2800","\u280F\u2800","\u280B\u2801"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},dotsCircle:{interval:80,frames:["\u288E ","\u280E\u2801","\u280A\u2811","\u2808\u2831"," \u2871","\u2880\u2870","\u2884\u2860","\u2886\u2840"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},rollingLine:{interval:80,frames:["/ "," - "," \\ "," |"," |"," \\ "," - ","/ "]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u{1F497} "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]},fish:{interval:80,frames:["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","\xBA> ~~~~~~~~~~~~~~~~~","(\xBA> ~~~~~~~~~~~~~~~~","((\xBA> ~~~~~~~~~~~~~~~","<((\xBA> ~~~~~~~~~~~~~~","><((\xBA> ~~~~~~~~~~~~~"," ><((\xBA> ~~~~~~~~~~~~","~ ><((\xBA> ~~~~~~~~~~~","~~ <>((\xBA> ~~~~~~~~~~","~~~ ><((\xBA> ~~~~~~~~~","~~~~ <>((\xBA> ~~~~~~~~","~~~~~ ><((\xBA> ~~~~~~~","~~~~~~ <>((\xBA> ~~~~~~","~~~~~~~ ><((\xBA> ~~~~~","~~~~~~~~ <>((\xBA> ~~~~","~~~~~~~~~ ><((\xBA> ~~~","~~~~~~~~~~ <>((\xBA> ~~","~~~~~~~~~~~ ><((\xBA> ~","~~~~~~~~~~~~ <>((\xBA> ","~~~~~~~~~~~~~ ><((\xBA>","~~~~~~~~~~~~~~ <>((\xBA","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}};var jr=sl,Dk=Object.keys(sl);var pt={};Uy(pt,{error:()=>qT,info:()=>LT,success:()=>jT,warning:()=>UT});var Pn=ot(),LT=Jd(Pn?"\u2139":"i"),jT=Yd(Pn?"\u2714":"\u221A"),UT=Kd(Pn?"\u26A0":"\u203C"),qT=zd(Pn?"\u2716":"\xD7");function ol({onlyFirst:t=!1}={}){let n="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(n,t?void 0:"g")}var GT=ol();function al(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(GT,"")}function xy(t){return t===161||t===164||t===167||t===168||t===170||t===173||t===174||t>=176&&t<=180||t>=182&&t<=186||t>=188&&t<=191||t===198||t===208||t===215||t===216||t>=222&&t<=225||t===230||t>=232&&t<=234||t===236||t===237||t===240||t===242||t===243||t>=247&&t<=250||t===252||t===254||t===257||t===273||t===275||t===283||t===294||t===295||t===299||t>=305&&t<=307||t===312||t>=319&&t<=322||t===324||t>=328&&t<=331||t===333||t===338||t===339||t===358||t===359||t===363||t===462||t===464||t===466||t===468||t===470||t===472||t===474||t===476||t===593||t===609||t===708||t===711||t>=713&&t<=715||t===717||t===720||t>=728&&t<=731||t===733||t===735||t>=768&&t<=879||t>=913&&t<=929||t>=931&&t<=937||t>=945&&t<=961||t>=963&&t<=969||t===1025||t>=1040&&t<=1103||t===1105||t===8208||t>=8211&&t<=8214||t===8216||t===8217||t===8220||t===8221||t>=8224&&t<=8226||t>=8228&&t<=8231||t===8240||t===8242||t===8243||t===8245||t===8251||t===8254||t===8308||t===8319||t>=8321&&t<=8324||t===8364||t===8451||t===8453||t===8457||t===8467||t===8470||t===8481||t===8482||t===8486||t===8491||t===8531||t===8532||t>=8539&&t<=8542||t>=8544&&t<=8555||t>=8560&&t<=8569||t===8585||t>=8592&&t<=8601||t===8632||t===8633||t===8658||t===8660||t===8679||t===8704||t===8706||t===8707||t===8711||t===8712||t===8715||t===8719||t===8721||t===8725||t===8730||t>=8733&&t<=8736||t===8739||t===8741||t>=8743&&t<=8748||t===8750||t>=8756&&t<=8759||t===8764||t===8765||t===8776||t===8780||t===8786||t===8800||t===8801||t>=8804&&t<=8807||t===8810||t===8811||t===8814||t===8815||t===8834||t===8835||t===8838||t===8839||t===8853||t===8857||t===8869||t===8895||t===8978||t>=9312&&t<=9449||t>=9451&&t<=9547||t>=9552&&t<=9587||t>=9600&&t<=9615||t>=9618&&t<=9621||t===9632||t===9633||t>=9635&&t<=9641||t===9650||t===9651||t===9654||t===9655||t===9660||t===9661||t===9664||t===9665||t>=9670&&t<=9672||t===9675||t>=9678&&t<=9681||t>=9698&&t<=9701||t===9711||t===9733||t===9734||t===9737||t===9742||t===9743||t===9756||t===9758||t===9792||t===9794||t===9824||t===9825||t>=9827&&t<=9829||t>=9831&&t<=9834||t===9836||t===9837||t===9839||t===9886||t===9887||t===9919||t>=9926&&t<=9933||t>=9935&&t<=9939||t>=9941&&t<=9953||t===9955||t===9960||t===9961||t>=9963&&t<=9969||t===9972||t>=9974&&t<=9977||t===9979||t===9980||t===9982||t===9983||t===10045||t>=10102&&t<=10111||t>=11094&&t<=11097||t>=12872&&t<=12879||t>=57344&&t<=63743||t>=65024&&t<=65039||t===65533||t>=127232&&t<=127242||t>=127248&&t<=127277||t>=127280&&t<=127337||t>=127344&&t<=127373||t===127375||t===127376||t>=127387&&t<=127404||t>=917760&&t<=917999||t>=983040&&t<=1048573||t>=1048576&&t<=1114109}function _y(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function vy(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9776&&t<=9783||t>=9800&&t<=9811||t===9855||t>=9866&&t<=9871||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12773||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t>=94192&&t<=94198||t>=94208&&t<=101589||t>=101631&&t<=101662||t>=101760&&t<=101874||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t>=119552&&t<=119638||t>=119648&&t<=119670||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128728||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129674||t>=129678&&t<=129734||t===129736||t>=129741&&t<=129756||t>=129759&&t<=129770||t>=129775&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}function VT(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function ll(t,{ambiguousAsWide:e=!1}={}){return VT(t),_y(t)||vy(t)||e&&xy(t)?2:1}var HT=new Intl.Segmenter,WT=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$","v"),zT=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),YT=new RegExp("^\\p{RGI_Emoji}$","v");function KT(t){return t.replace(zT,"")}function JT(t){return WT.test(t)}function ZT(t,e){let r=0;if(t.length>1)for(let i of t.slice(1))i>="\uFF00"&&i<="\uFFEF"&&(r+=ll(i.codePointAt(0),e));return r}function cl(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:i=!1}=e,n=t;if(i||(n=al(n)),n.length===0)return 0;let s=0,o={ambiguousAsWide:!r};for(let{segment:a}of HT.segment(n)){if(JT(a))continue;if(YT.test(a)){s+=2;continue}let l=KT(a).codePointAt(0);s+=ll(l,o),s+=ZT(a,o)}return s}function ul({stream:t=process.stdout}={}){return!!(t&&t.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var mt=F(require("process"),1);var XT=3,gt,Qe,bt,Zt,Ur,Xt,Ey,Oy,hl=class{constructor(){S(this,Xt);S(this,gt,0);S(this,Qe);S(this,bt,!1);S(this,Zt,!1);S(this,Ur,e=>{if(!e?.length)return;(typeof e=="string"?e.codePointAt(0):e[0])===XT&&(mt.default.listenerCount("SIGINT")>0?mt.default.emit("SIGINT"):mt.default.kill(mt.default.pid,"SIGINT"))})}start(){Nn(this,gt)._++,d(this,gt)===1&&_(this,Xt,Ey).call(this)}stop(){d(this,gt)!==0&&--Nn(this,gt)._===0&&_(this,Xt,Oy).call(this)}};gt=new WeakMap,Qe=new WeakMap,bt=new WeakMap,Zt=new WeakMap,Ur=new WeakMap,Xt=new WeakSet,Ey=function(){let{stdin:e}=mt.default;if(mt.default.platform==="win32"||!e?.isTTY||typeof e.setRawMode!="function"){b(this,Qe,void 0);return}b(this,Qe,e),b(this,bt,e.isPaused()),b(this,Zt,!!e.isRaw),e.setRawMode(!0),e.prependListener("data",d(this,Ur)),d(this,bt)&&e.resume()},Oy=function(){if(!d(this,Qe))return;let e=d(this,Qe);e.off("data",d(this,Ur)),e.isTTY&&e.setRawMode?.(d(this,Zt)),d(this,bt)&&e.pause(),b(this,Qe,void 0),b(this,bt,!1),b(this,Zt,!1)};var QT=new hl,dl=Object.freeze(QT);var eC=200,tC="\x1B[?2026h",rC="\x1B[?2026l",Mn=new Map,et,xe,er,y,ae,I,wt,tt,tr,_e,z,rr,w,yt,pl,Cy,Ay,Fy,ml,gl,bl,yl,wl,Rn,Dy,Iy,Py,My,fl=class{constructor(e){S(this,w);S(this,et,0);S(this,xe,-1);S(this,er,0);S(this,y);S(this,ae);S(this,I);S(this,wt);S(this,tt,new Map);S(this,tr,!1);S(this,_e);S(this,z);S(this,rr,!1);Oe(this,"color");typeof e=="string"&&(e={text:e}),b(this,y,{color:"cyan",stream:Qt.default.stderr,discardStdin:!0,hideCursor:!0,...e}),this.color=d(this,y).color,b(this,I,d(this,y).stream),typeof d(this,y).isEnabled!="boolean"&&(d(this,y).isEnabled=ul({stream:d(this,I)})),typeof d(this,y).isSilent!="boolean"&&(d(this,y).isSilent=!1);let r=d(this,y).interval;this.spinner=d(this,y).spinner,d(this,y).interval=r,this.text=d(this,y).text,this.prefixText=d(this,y).prefixText,this.suffixText=d(this,y).suffixText,this.indent=d(this,y).indent,Qt.default.env.NODE_ENV==="test"&&(this._stream=d(this,I),this._isEnabled=d(this,y).isEnabled,Object.defineProperty(this,"_linesToClear",{get(){return d(this,et)},set(i){b(this,et,i)}}),Object.defineProperty(this,"_frameIndex",{get(){return d(this,xe)}}),Object.defineProperty(this,"_lineCount",{get(){let i=d(this,I).columns??80,n=typeof d(this,y).prefixText=="function"?"":d(this,y).prefixText,s=typeof d(this,y).suffixText=="function"?"":d(this,y).suffixText,o=typeof n=="string"&&n!==""?n+" ":"",a=typeof s=="string"&&s!==""?" "+s:"",c=" ".repeat(d(this,y).indent)+o+"-"+(typeof d(this,y).text=="string"?" "+d(this,y).text:"")+a;return _(this,w,Rn).call(this,c,i)}}))}get indent(){return d(this,y).indent}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");d(this,y).indent=e}get interval(){return d(this,y).interval??d(this,ae).interval??100}get spinner(){return d(this,ae)}set spinner(e){if(b(this,xe,-1),d(this,y).interval=void 0,typeof e=="object"){if(!Array.isArray(e.frames)||e.frames.length===0||e.frames.some(r=>typeof r!="string"))throw new Error("The given spinner must have a non-empty `frames` array of strings");if(e.interval!==void 0&&!(Number.isInteger(e.interval)&&e.interval>0))throw new Error("`spinner.interval` must be a positive integer if provided");b(this,ae,e)}else if(!ot())b(this,ae,jr.line);else if(e===void 0)b(this,ae,jr.dots);else if(e!=="default"&&jr[e])b(this,ae,jr[e]);else throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return d(this,y).text}set text(e=""){d(this,y).text=e}get prefixText(){return d(this,y).prefixText}set prefixText(e=""){d(this,y).prefixText=e}get suffixText(){return d(this,y).suffixText}set suffixText(e=""){d(this,y).suffixText=e}get isSpinning(){return d(this,wt)!==void 0}get isEnabled(){return d(this,y).isEnabled&&!d(this,y).isSilent}set isEnabled(e){if(typeof e!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");d(this,y).isEnabled=e}get isSilent(){return d(this,y).isSilent}set isSilent(e){if(typeof e!="boolean")throw new TypeError("The `isSilent` option must be a boolean");d(this,y).isSilent=e}frame(){let e=Date.now();(d(this,xe)===-1||e-d(this,er)>=this.interval)&&(b(this,xe,(d(this,xe)+1)%d(this,ae).frames.length),b(this,er,e));let{frames:r}=d(this,ae),i=r[d(this,xe)];this.color&&(i=T[this.color](i));let n=_(this,w,yl).call(this,d(this,y).prefixText," "),s=typeof this.text=="string"?" "+this.text:"",o=_(this,w,wl).call(this,d(this,y).suffixText," ");return n+i+s+o}clear(){return!this.isEnabled||!d(this,I).isTTY?this:(_(this,w,yt).call(this,()=>{d(this,I).cursorTo(0);for(let e=0;e<d(this,et);e++)e>0&&d(this,I).moveCursor(0,-1),d(this,I).clearLine(1);d(this,y).indent&&d(this,I).cursorTo(d(this,y).indent)}),b(this,et,0),this)}render(){if(!this.isEnabled||d(this,_e)||d(this,z))return this;let e=d(this,I).isTTY,r=!1;try{e&&(_(this,w,yt).call(this,()=>d(this,I).write(tC)),r=!0),this.clear();let i=this.frame(),n=d(this,I).columns??80,s=_(this,w,Rn).call(this,i,n),o=d(this,I).rows;if(o&&o>1&&s>o){let l=i.split(`
171
+ `),c=o-1;i=[...l.slice(0,c),"... (content truncated to fit terminal)"].join(`
172
+ `)}_(this,w,yt).call(this,()=>d(this,I).write(i))===!1&&d(this,I).isTTY&&(b(this,_e,()=>{b(this,_e,void 0),_(this,w,pl).call(this)}),d(this,I).once("drain",d(this,_e))),b(this,et,_(this,w,Rn).call(this,i,n))}finally{r&&_(this,w,yt).call(this,()=>d(this,I).write(rC))}return this}start(e){if(e&&(this.text=e),this.isSilent)return this;if(!this.isEnabled){let r=this.text?"-":"",i=" ".repeat(d(this,y).indent)+_(this,w,gl).call(this,r,this.text,d(this,y).prefixText,d(this,y).suffixText);return i.trim()!==""&&_(this,w,yt).call(this,()=>d(this,I).write(i+`
173
+ `)),this}return this.isSpinning?this:(d(this,y).hideCursor&&nl.hide(d(this,I)),d(this,y).discardStdin&&Qt.default.stdin.isTTY&&(dl.start(),b(this,rr,!0)),_(this,w,Iy).call(this),this.render(),b(this,wt,setInterval(this.render.bind(this),this.interval)),this)}stop(){return clearInterval(d(this,wt)),b(this,wt,void 0),b(this,xe,-1),b(this,er,0),_(this,w,ml).call(this),_(this,w,Py).call(this),d(this,_e)&&(d(this,I).removeListener("drain",d(this,_e)),b(this,_e,void 0)),this.isEnabled&&(this.clear(),d(this,y).hideCursor&&nl.show(d(this,I))),d(this,rr)&&(b(this,rr,!1),dl.stop()),this}succeed(e){return this.stopAndPersist({symbol:pt.success,text:e})}fail(e){return this.stopAndPersist({symbol:pt.error,text:e})}warn(e){return this.stopAndPersist({symbol:pt.warning,text:e})}info(e){return this.stopAndPersist({symbol:pt.info,text:e})}stopAndPersist(e={}){if(this.isSilent)return this;let r=e.symbol??" ",i=e.text??this.text,n=e.prefixText??d(this,y).prefixText,s=e.suffixText??d(this,y).suffixText,o=_(this,w,gl).call(this,r,i,n,s)+`
174
+ `;return this.stop(),_(this,w,yt).call(this,()=>d(this,I).write(o)),this}};et=new WeakMap,xe=new WeakMap,er=new WeakMap,y=new WeakMap,ae=new WeakMap,I=new WeakMap,wt=new WeakMap,tt=new WeakMap,tr=new WeakMap,_e=new WeakMap,z=new WeakMap,rr=new WeakMap,w=new WeakSet,yt=function(e){b(this,tr,!0);try{return e()}finally{b(this,tr,!1)}},pl=function(){this.isSpinning&&this.render()},Cy=function(e,r){if(e==null)return"";if(typeof e=="string")return e;if(Buffer.isBuffer(e)||ArrayBuffer.isView(e)){let i=typeof r=="string"&&r&&r!=="buffer"?r:"utf8";return Buffer.from(e).toString(i)}return String(e)},Ay=function(e){if(!e)return!1;let r=e.at(-1);return r===`
175
+ `||r==="\r"},Fy=function(){d(this,z)||(b(this,z,setTimeout(()=>{b(this,z,void 0),this.isSpinning&&_(this,w,pl).call(this)},eC)),typeof d(this,z)?.unref=="function"&&d(this,z).unref())},ml=function(){d(this,z)&&(clearTimeout(d(this,z)),b(this,z,void 0))},gl=function(e,r,i,n){let s=_(this,w,yl).call(this,i," "),a=typeof r=="string"?(e?" ":"")+r:"",l=_(this,w,wl).call(this,n," ");return s+e+a+l},bl=function(e,r,i=!1){let n=typeof e=="function"?e():e;return typeof n=="string"&&n!==""?i?r+n:n+r:""},yl=function(e=d(this,y).prefixText,r=" "){return _(this,w,bl).call(this,e,r,!1)},wl=function(e=d(this,y).suffixText,r=" "){return _(this,w,bl).call(this,e,r,!0)},Rn=function(e,r){let i=0;for(let n of(0,Ty.stripVTControlCharacters)(e).split(`
176
+ `))i+=Math.max(1,Math.ceil(cl(n)/r));return i},Dy=function(e){if(!e||d(this,tt).has(e)||!e.isTTY||typeof e.write!="function")return;Mn.has(e)&&console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.");let r=e.write;d(this,tt).set(e,r),Mn.set(e,this),e.write=(i,n,s)=>_(this,w,My).call(this,e,r,i,n,s)},Iy=function(){if(!this.isEnabled||d(this,tt).size>0)return;let e=new Set([d(this,I),Qt.default.stdout,Qt.default.stderr]);for(let r of e)_(this,w,Dy).call(this,r)},Py=function(){for(let[e,r]of d(this,tt))e.write=r,Mn.get(e)===this&&Mn.delete(e);d(this,tt).clear()},My=function(e,r,i,n,s){if(typeof n=="function"&&(s=n,n=void 0),d(this,tr))return r.call(e,i,n,s);this.clear();let o=_(this,w,Cy).call(this,i,n),a=_(this,w,Ay).call(this,o),l=r.call(e,i,n,s);return a?_(this,w,ml).call(this):o.length>0&&_(this,w,Fy).call(this),this.isSpinning&&!d(this,z)&&this.render(),l};function V(t){return new fl(t)}var Sl=new $l;async function $n(t,e,r,i){let n=V(t).start(),s=k(e,r,{...i,all:!0});s.stdout?.on("data",o=>{let a=o.toString().trim().split(`
177
+ `).pop();a&&(n.text=`${t} ${T.dim(`(${a.substring(0,60).trim()}...)`)}`)}),s.stderr?.on("data",o=>{let a=o.toString().trim().split(`
178
+ `).pop();a&&(n.text=`${t} ${T.dim(`(${a.substring(0,60).trim()}...)`)}`)});try{await s,n.succeed(t)}catch(o){n.fail(`${t} failed.`),o.all&&console.error(T.red(o.all)),process.exit(1)}}Sl.name("brezel-installer").description("Installer for Brezel (SPA + API)").version("1.0.0").option("-d, --dir <directory>","Installation directory","./brezel").option("-m, --mode <mode>","Installation mode (native, docker)","native").option("-s, --system <name>","System name","example").option("-u, --url <url>","API URL","http://brezel-api.test").option("--spa-url <url>","SPA URL","http://localhost:5173").option("--db-host <host>","Database host","127.0.0.1").option("--db-port <port>","Database port","3306").option("--db-name <name>","Database name","brezel_meta").option("--db-user <user>","Database user","root").option("--db-password <password>","Database password","").option("--php-path <path>","Path to PHP executable","php").option("--gitlab-token <token>","GitLab Personal Access Token").option("--no-interactive","Run in non-interactive mode").option("--source-mode <mode>","Source control mode (clone, fork)","clone").option("--components <list>","Optional components to install (mariadb, nginx, ssl, cron)","");var iC="https://github.com/brezelio/brezel.git";Sl.action(async t=>{console.log(T.bold.blue(`
179
+ \u{1F968} Welcome to the Brezel Installer!
180
+ `));let e=async a=>{try{let{stdout:l}=await k(a,["-r","echo PHP_VERSION;"]),c=l.match(/(\d+)\.(\d+)\.(\d+)/);if(!c)return null;let u=parseInt(c[1],10),h=parseInt(c[2],10);return{version:c[0],valid:u>8||u===8&&h>=3}}catch{return null}},r=V("Checking prerequisites...").start(),i={};try{for(let l of["git","node","npm"])await k(l,["--version"]),i[l]=!0;let a=await e(t.phpPath||"php");a?(i.php=a.version,i.phpValid=a.valid):(i.php=!1,i.phpValid=!1);try{await k("composer",["--version"]),i.composer=!0}catch{i.composer=!1}try{await k("docker",["--version"]),i.docker=!0}catch{i.docker=!1}if(process.platform==="darwin")try{await k("valet",["--version"]),i.valet=!0}catch{i.valet=!1}r.succeed("System check complete.")}catch{r.fail("Missing critical prerequisites (git, node, or npm)."),process.exit(1)}let n=t;if(t.interactive!==!1){let a=await(0,Ry.default)([{type:"select",name:"mode",message:"How do you want to install Brezel?",choices:[{title:`Native (Bare metal) ${!i.phpValid&&i.php?T.yellow("(PHP 8.3+ required, current: "+i.php+")"):i.php?"":T.red("(PHP not found)")}`,value:"native",disabled:!1},...i.valet?[{title:`Valet (macOS Magic) ${T.dim("- handles domain mapping automatically")}`,value:"valet"}]:[],{title:`Docker (Containerized) ${i.docker?"":T.red("(Docker required)")}`,value:"docker",disabled:!i.docker}],initial:t.mode==="valet"&&i.valet?1:t.mode==="docker"&&i.docker?i.valet?2:1:0},{type:(l,c)=>c.mode==="native"||c.mode==="valet"?"text":null,name:"phpPath",message:"Path to PHP 8.3+ executable:",initial:t.phpPath||"php",validate:async l=>{let c=await e(l);return c?c.valid?!0:`PHP version ${c.version} is too old. 8.3+ required.`:"PHP not found at this path."}},{type:"select",name:"sourceMode",message:"Source control mode:",choices:[{title:"Clone without history",value:"clone"},{title:"Fork and clone",value:"fork"}],initial:t.sourceMode==="fork"?1:0},{type:l=>l==="fork"?"text":null,name:"forkUrl",message:"Enter your fork URL (git@...):",validate:l=>l.length>0?!0:"Fork URL is required"},{type:"text",name:"gitlabToken",message:"GitLab Personal Access Token (for @kibro packages, scope: read_api, read_registry)",initial:t.gitlabToken,validate:l=>l&&l.length>0?!0:"Token is required"},{type:"text",name:"dir",message:"Installation directory:",initial:t.dir},{type:"text",name:"system",message:"System name:",initial:t.system},{type:"text",name:"url",message:"API URL:",initial:(l,c)=>t.url!=="http://brezel-api.test"?t.url:`http://${c.system}.test`},{type:"text",name:"spaUrl",message:"SPA URL:",initial:(l,c)=>t.spaUrl!=="http://localhost:5173"?t.spaUrl:c.mode==="valet"?`http://${c.system}.test:5173`:"http://localhost:5173"},{type:"multiselect",name:"components",message:"Select optional components to install:",choices:[{title:"MariaDB",value:"mariadb"},{title:"Nginx",value:"nginx"},{title:"SSL (Certbot)",value:"ssl"},{title:"Cron jobs",value:"cron"}],initial:t.components&&typeof t.components=="string"?t.components.split(",").map(l=>["mariadb","nginx","ssl","cron"].indexOf(l)):void 0},{type:"text",name:"dbHost",message:"Database Host",initial:t.dbHost},{type:"text",name:"dbPort",message:"Database Port",initial:t.dbPort},{type:"text",name:"dbName",message:"Database Name",initial:t.dbName},{type:"text",name:"dbUser",message:"Database User",initial:t.dbUser},{type:"password",name:"dbPassword",message:"Database Password",initial:t.dbPassword}]);n={...t,...a}}else typeof n.components=="string"&&(n.components=n.components.split(",").filter(Boolean));n.dir||process.exit(1);let s=n.mode==="native"||n.mode==="valet";if(s){let a=await e(n.phpPath);(!a||!a.valid)&&(V(`Native/Valet mode requires PHP 8.3+, but version ${a?.version||"none"} was found at ${n.phpPath}.`).fail(),process.exit(1)),i.composer||(V("Native/Valet mode requires Composer, but it was not found.").fail(),process.exit(1))}else n.mode==="docker"&&!i.docker&&(V("Docker mode requires Docker, but it was not found.").fail(),process.exit(1));let o=rt.default.resolve(n.dir);if(!ve.default.existsSync(o)){let a=V(`Cloning Brezel skeleton (${n.sourceMode==="clone"?"no history":"fork"})...`).start();try{let l=n.sourceMode==="fork"?n.forkUrl:iC,c=["clone"];n.sourceMode==="clone"&&c.push("--depth","1"),c.push(l,o),await k("git",c),n.sourceMode==="clone"&&(ve.default.rmSync(rt.default.join(o,".git"),{recursive:!0,force:!0}),await k("git",["init"],{cwd:o}),await k("git",["add","."],{cwd:o}),await k("git",["commit","-m","Initial commit from Brezel Installer"],{cwd:o})),a.succeed("Brezel skeleton cloned.")}catch(l){a.fail("Failed to clone repository."),console.error(l),process.exit(1)}}if(n.mode==="native"&&n.components&&n.components.length>0){console.log(T.bold.cyan(`
181
+ \u{1F6E0} Installing optional components...`));for(let a of n.components){let l=V(`Installing ${a}...`).start();try{if(process.platform==="linux"){if(a==="mariadb")await k("sudo",["apt-get","update"]),await k("sudo",["apt-get","install","-y","mariadb-server"]),l.succeed("MariaDB installed.");else if(a==="nginx")await k("sudo",["apt-get","install","-y","nginx"]),l.succeed("Nginx installed.");else if(a==="ssl")await k("sudo",["apt-get","install","-y","certbot","python3-certbot-nginx"]),l.succeed("Certbot installed.");else if(a==="cron"){let c=`* * * * * cd ${o} && ${n.phpPath} bakery schedule:run >> /dev/null 2>&1`;l.info("Cron job suggested: "+c)}}else process.platform==="darwin"?a==="mariadb"?(await k("brew",["install","mariadb"]),l.succeed("MariaDB installed via Homebrew.")):a==="nginx"?(await k("brew",["install","nginx"]),l.succeed("Nginx installed via Homebrew.")):l.warn(`${a} installation not fully automated for macOS.`):l.warn(`${a} installation not supported on this OS.`)}catch{l.fail(`Failed to install ${a}.`)}}}if(n.mode==="docker"){console.log(T.bold.cyan(`
182
+ \u{1F433} Setting up Docker environment...`));let a=rt.default.join(o,".env.example"),l=rt.default.join(o,".env");if(ve.default.existsSync(a)){let h=ve.default.readFileSync(a,"utf-8");h=h.replace(/APP_URL=.*/,`APP_URL=${n.url}`),h=h.replace(/VITE_APP_API_URL=.*/,`VITE_APP_API_URL=${n.url}`),h=h.replace(/VITE_APP_SYSTEM=.*/,`VITE_APP_SYSTEM=${n.system}`),h=h.replace(/TENANCY_HOST=.*/,"TENANCY_HOST=db"),h=h.replace(/TENANCY_PASSWORD=.*/,"TENANCY_PASSWORD=password"),h.includes("APP_SYSTEM=")?h=h.replace(/APP_SYSTEM=.*/,`APP_SYSTEM=${n.system}`):h+=`
183
+ APP_SYSTEM=${n.system}
184
+ `,ve.default.writeFileSync(l,h),V("Configured .env for Docker").succeed()}await $n("Building and starting Docker containers","docker",["compose","up","-d","--build"],{cwd:o,env:{...process.env,COMPOSER_TOKEN:n.gitlabToken,NPM_TOKEN:n.gitlabToken,APP_SYSTEM:n.system,APP_URL:n.url}}),console.log(T.bold.cyan(`
185
+ \u{1F950} Initializing Brezel in Docker...`));let c=V("Waiting for database...").start();await new Promise(h=>setTimeout(h,1e4));let u=async h=>{await k("docker",["compose","exec","api",...h],{cwd:o,stdio:"inherit"})};try{c.text="Running bakery init...",await u(["php","bakery","init"]),console.log(T.dim(`Creating system "${n.system}"...`)),await u(["php","bakery","system","create",n.system]),console.log(T.dim("Applying system config...")),await u(["php","bakery","apply"]),c.succeed("Brezel initialized in Docker.")}catch(h){c.fail("Initialization in Docker failed."),console.error(h)}console.log(T.bold.green(`
186
+ \u2705 Docker Installation complete!`)),console.log(T.white(`
187
+ Services are running:
188
+ API: ${n.url} (mapped to localhost:8081)
189
+ SPA: ${n.spaUrl} (mapped to localhost:3000)
190
+
191
+ To stop:
192
+ cd ${o}
193
+ docker compose down
194
+ `));return}if(s){console.log(T.bold.cyan(`
195
+ \u{1F4E6} Installing Dependencies...`)),await k("composer",["config","gitlab-token.gitlab.kiwis-and-brownies.de",n.gitlabToken],{cwd:o}),await $n("Installing PHP dependencies (Composer)","composer",["install","--no-interaction"],{cwd:o});let a=rt.default.join(o,".npmrc"),l=`
196
+ @kibro:registry=https://gitlab.kiwis-and-brownies.de/api/v4/packages/npm/
197
+ //gitlab.kiwis-and-brownies.de/api/v4/packages/npm/:_authToken=${n.gitlabToken}
198
+ `;ve.default.writeFileSync(a,l),await $n("Installing Node dependencies (npm)","npm",["install"],{cwd:o});let c=rt.default.join(o,".env.example"),u=rt.default.join(o,".env");if(ve.default.existsSync(c)){let f=ve.default.readFileSync(c,"utf-8");f=f.replace(/APP_URL=.*/,`APP_URL=${n.url}`),f=f.replace(/VITE_APP_API_URL=.*/,`VITE_APP_API_URL=${n.url}`),f=f.replace(/VITE_APP_SYSTEM=.*/,`VITE_APP_SYSTEM=${n.system}`),f=f.replace(/TENANCY_HOST=.*/,`TENANCY_HOST=${n.dbHost}`),f=f.replace(/TENANCY_PORT=.*/,`TENANCY_PORT=${n.dbPort}`),f=f.replace(/TENANCY_DATABASE=.*/,`TENANCY_DATABASE=${n.dbName}`),f=f.replace(/TENANCY_USERNAME=.*/,`TENANCY_USERNAME=${n.dbUser}`),f=f.replace(/TENANCY_PASSWORD=.*/,`TENANCY_PASSWORD=${n.dbPassword}`),ve.default.writeFileSync(u,f),V("Configured .env").succeed()}console.log(T.bold.cyan(`
199
+ \u{1F950} Initializing Brezel...`));let h=async f=>{await k(n.phpPath,["bakery",...f],{cwd:o,stdio:"inherit"})};try{console.log(T.dim("Running initialization...")),await h(["init"]),console.log(T.dim(`Creating system "${n.system}"...`)),await h(["system","create",n.system]),console.log(T.dim("Applying system config...")),await h(["apply"])}catch(f){console.error(T.red("Initialization failed.")),console.error(f)}if(await $n("Building SPA","npm",["run","build"],{cwd:o}),n.mode==="valet"){console.log(T.bold.cyan(`
200
+ \u{1F3A9} Valet Setup...`));try{await k("valet",["link",n.system],{cwd:o}),V(`Linked ${n.system}.test to Valet.`).succeed(),n.url.startsWith("https://")&&(await k("valet",["secure",n.system],{cwd:o}),V(`Secured ${n.system}.test with SSL.`).succeed())}catch{console.warn(T.yellow("Valet link/secure failed. You might need to run it manually."))}}}console.log(T.bold.cyan(`
201
+ \u{1F4E6} Installing Export Services...`));try{await k("npx",["@kibro/export-installer@latest"],{stdio:"inherit"})}catch{console.warn(T.yellow("Export services installer finished with warning or error."))}console.log(T.bold.green(`
202
+ \u2705 Installation complete!`)),console.log(T.white(`
203
+ To start the server (API + SPA dev):
204
+ cd ${n.dir}
205
+ npm run dev
206
+
207
+ For Windows users:
208
+ bin\\serve_on_windows.ps1
209
+ `))});Sl.parse();