@descript/platform-cli 0.2.3 → 0.2.5

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.
Files changed (2) hide show
  1. package/dist/descript-cli.cjs +106 -173
  2. package/package.json +4 -2
@@ -1,133 +1,99 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var ap=Object.create;var Cs=Object.defineProperty;var cp=Object.getOwnPropertyDescriptor;var lp=Object.getOwnPropertyNames;var fp=Object.getPrototypeOf,pp=Object.prototype.hasOwnProperty;var C=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var hp=(e,t,r,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of lp(t))!pp.call(e,n)&&n!==r&&Cs(e,n,{get:()=>t[n],enumerable:!(u=cp(t,n))||u.enumerable});return e};var I=(e,t,r)=>(r=e!=null?ap(fp(e)):{},hp(t||!e||!e.__esModule?Cs(r,"default",{value:e,enumerable:!0}):r,e));var Qt=C(rn=>{var kr=class extends Error{constructor(t,r,u){super(u),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},tn=class extends kr{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};rn.CommanderError=kr;rn.InvalidArgumentError=tn});var qr=C(nn=>{var{InvalidArgumentError:dp}=Qt(),un=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,u)=>{if(!this.argChoices.includes(r))throw new dp(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,u):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function mp(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}nn.Argument=un;nn.humanReadableArgName=mp});var on=C(ys=>{var{humanReadableArgName:Fp}=qr(),sn=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(t){let r=t.commands.filter(n=>!n._hidden),u=t._getHelpCommand();return u&&!u._hidden&&r.push(u),this.sortSubcommands&&r.sort((n,s)=>n.name().localeCompare(s.name())),r}compareOptions(t,r){let u=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return u(t).localeCompare(u(r))}visibleOptions(t){let r=t.options.filter(n=>!n.hidden),u=t._getHelpOption();if(u&&!u.hidden){let n=u.short&&t._findOption(u.short),s=u.long&&t._findOption(u.long);!n&&!s?r.push(u):u.long&&!s?r.push(t.createOption(u.long,u.description)):u.short&&!n&&r.push(t.createOption(u.short,u.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let u=t.parent;u;u=u.parent){let n=u.options.filter(s=>!s.hidden);r.push(...n)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(u=>Fp(u)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((u,n)=>Math.max(u,r.subcommandTerm(n).length),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((u,n)=>Math.max(u,r.optionTerm(n).length),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((u,n)=>Math.max(u,r.optionTerm(n).length),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((u,n)=>Math.max(u,r.argumentTerm(n).length),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let u="";for(let n=t.parent;n;n=n.parent)u=n.name()+" "+u;return u+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];return t.argChoices&&r.push(`choices: ${t.argChoices.map(u=>JSON.stringify(u)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0?`${t.description} (${r.join(", ")})`:t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(u=>JSON.stringify(u)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let u=`(${r.join(", ")})`;return t.description?`${t.description} ${u}`:u}return t.description}formatHelp(t,r){let u=r.padWidth(t,r),n=r.helpWidth||80,s=2,i=2;function o(h,m){if(m){let F=`${h.padEnd(u+i)}${m}`;return r.wrap(F,n-s,u+i)}return h}function c(h){return h.join(`
3
- `).replace(/^/gm," ".repeat(s))}let a=[`Usage: ${r.commandUsage(t)}`,""],D=r.commandDescription(t);D.length>0&&(a=a.concat([r.wrap(D,n,0),""]));let l=r.visibleArguments(t).map(h=>o(r.argumentTerm(h),r.argumentDescription(h)));l.length>0&&(a=a.concat(["Arguments:",c(l),""]));let p=r.visibleOptions(t).map(h=>o(r.optionTerm(h),r.optionDescription(h)));if(p.length>0&&(a=a.concat(["Options:",c(p),""])),this.showGlobalOptions){let h=r.visibleGlobalOptions(t).map(m=>o(r.optionTerm(m),r.optionDescription(m)));h.length>0&&(a=a.concat(["Global Options:",c(h),""]))}let f=r.visibleCommands(t).map(h=>o(r.subcommandTerm(h),r.subcommandDescription(h)));return f.length>0&&(a=a.concat(["Commands:",c(f),""])),a.join(`
4
- `)}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}wrap(t,r,u,n=40){let s=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",i=new RegExp(`[\\n][${s}]+`);if(t.match(i))return t;let o=r-u;if(o<n)return t;let c=t.slice(0,u),a=t.slice(u).replace(`\r
2
+ "use strict";var Zi=Object.create;var jt=Object.defineProperty;var Qi=Object.getOwnPropertyDescriptor;var Xi=Object.getOwnPropertyNames;var er=Object.getPrototypeOf,tr=Object.prototype.hasOwnProperty;var q=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);var ir=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of Xi(e))!tr.call(i,u)&&u!==t&&jt(i,u,{get:()=>e[u],enumerable:!(n=Qi(e,u))||n.enumerable});return i};var L=(i,e,t)=>(t=i!=null?Zi(er(i)):{},ir(e||!i||!i.__esModule?jt(t,"default",{value:i,enumerable:!0}):t,i));var fe=q(ze=>{var _e=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},Je=class extends _e{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};ze.CommanderError=_e;ze.InvalidArgumentError=Je});var ve=q(Ze=>{var{InvalidArgumentError:rr}=fe(),Ye=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new rr(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function nr(i){let e=i.name()+(i.variadic===!0?"...":"");return i.required?"<"+e+">":"["+e+"]"}Ze.Argument=Ye;Ze.humanReadableArgName=nr});var Xe=q(Rt=>{var{humanReadableArgName:ur}=ve(),Qe=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let t=e.commands.filter(u=>!u._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((u,s)=>u.name().localeCompare(s.name())),t}compareOptions(e,t){let n=u=>u.short?u.short.replace(/^-/,""):u.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(u=>!u.hidden),n=e._getHelpOption();if(n&&!n.hidden){let u=n.short&&e._findOption(n.short),s=n.long&&e._findOption(n.long);!u&&!s?t.push(n):n.long&&!s?t.push(e.createOption(n.long,n.description)):n.short&&!u&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let u=n.options.filter(s=>!s.hidden);t.push(...u)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(n=>ur(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((n,u)=>Math.max(n,t.subcommandTerm(u).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((n,u)=>Math.max(n,t.optionTerm(u).length),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((n,u)=>Math.max(n,t.optionTerm(u).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((n,u)=>Math.max(n,t.argumentTerm(u).length),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let u=e.parent;u;u=u.parent)n=u.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){let n=t.padWidth(e,t),u=t.helpWidth||80,s=2,r=2;function o(h,f){if(f){let F=`${h.padEnd(n+r)}${f}`;return t.wrap(F,u-s,n+r)}return h}function a(h){return h.join(`
3
+ `).replace(/^/gm," ".repeat(s))}let l=[`Usage: ${t.commandUsage(e)}`,""],c=t.commandDescription(e);c.length>0&&(l=l.concat([t.wrap(c,u,0),""]));let p=t.visibleArguments(e).map(h=>o(t.argumentTerm(h),t.argumentDescription(h)));p.length>0&&(l=l.concat(["Arguments:",a(p),""]));let m=t.visibleOptions(e).map(h=>o(t.optionTerm(h),t.optionDescription(h)));if(m.length>0&&(l=l.concat(["Options:",a(m),""])),this.showGlobalOptions){let h=t.visibleGlobalOptions(e).map(f=>o(t.optionTerm(f),t.optionDescription(f)));h.length>0&&(l=l.concat(["Global Options:",a(h),""]))}let C=t.visibleCommands(e).map(h=>o(t.subcommandTerm(h),t.subcommandDescription(h)));return C.length>0&&(l=l.concat(["Commands:",a(C),""])),l.join(`
4
+ `)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,u=40){let s=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",r=new RegExp(`[\\n][${s}]+`);if(e.match(r))return e;let o=t-n;if(o<u)return e;let a=e.slice(0,n),l=e.slice(n).replace(`\r
5
5
  `,`
6
- `),D=" ".repeat(u),p="\\s\u200B",f=new RegExp(`
7
- |.{1,${o-1}}([${p}]|$)|[^${p}]+?([${p}]|$)`,"g"),h=a.match(f)||[];return c+h.map((m,F)=>m===`
8
- `?"":(F>0?D:"")+m.trimEnd()).join(`
9
- `)}};ys.Help=sn});var ln=C(cn=>{var{InvalidArgumentError:Ep}=Qt(),Dn=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let u=Cp(t);this.short=u.shortFlag,this.long=u.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}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,u)=>{if(!this.argChoices.includes(r))throw new Ep(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,u):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return gp(this.name().replace(/^no-/,""))}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},an=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,u)=>{this.positiveOptions.has(u)&&this.dualOptions.add(u)})}valueFromOption(t,r){let u=r.attributeName();if(!this.dualOptions.has(u))return!0;let n=this.negativeOptions.get(u).presetArg,s=n!==void 0?n:!1;return r.negate===(s===t)}};function gp(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function Cp(e){let t,r,u=e.split(/[ |,]+/);return u.length>1&&!/^[[<]/.test(u[1])&&(t=u.shift()),r=u.shift(),!t&&/^-[^-]$/.test(r)&&(t=r,r=void 0),{shortFlag:t,longFlag:r}}cn.Option=Dn;cn.DualOptions=an});var bs=C(As=>{function yp(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let u=0;u<=e.length;u++)r[u]=[u];for(let u=0;u<=t.length;u++)r[0][u]=u;for(let u=1;u<=t.length;u++)for(let n=1;n<=e.length;n++){let s=1;e[n-1]===t[u-1]?s=0:s=1,r[n][u]=Math.min(r[n-1][u]+1,r[n][u-1]+1,r[n-1][u-1]+s),n>1&&u>1&&e[n-1]===t[u-2]&&e[n-2]===t[u-1]&&(r[n][u]=Math.min(r[n][u],r[n-2][u-2]+1))}return r[e.length][t.length]}function Ap(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let r=e.startsWith("--");r&&(e=e.slice(2),t=t.map(i=>i.slice(2)));let u=[],n=3,s=.4;return t.forEach(i=>{if(i.length<=1)return;let o=yp(e,i),c=Math.max(e.length,i.length);(c-o)/c>s&&(o<n?(n=o,u=[i]):o===n&&u.push(i))}),u.sort((i,o)=>i.localeCompare(o)),r&&(u=u.map(i=>`--${i}`)),u.length>1?`
10
- (Did you mean one of ${u.join(", ")}?)`:u.length===1?`
11
- (Did you mean ${u[0]}?)`:""}As.suggestSimilar=Ap});var Ss=C(xs=>{var bp=require("node:events").EventEmitter,fn=require("node:child_process"),Ue=require("node:path"),pn=require("node:fs"),Q=require("node:process"),{Argument:wp,humanReadableArgName:Bp}=qr(),{CommanderError:hn}=Qt(),{Help:vp}=on(),{Option:ws,DualOptions:xp}=ln(),{suggestSimilar:Bs}=bs(),dn=class e extends bp{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=t||"",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._outputConfiguration={writeOut:r=>Q.stdout.write(r),writeErr:r=>Q.stderr.write(r),getOutHelpWidth:()=>Q.stdout.isTTY?Q.stdout.columns:void 0,getErrHelpWidth:()=>Q.stderr.isTTY?Q.stderr.columns:void 0,outputError:(r,u)=>u(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,u){let n=r,s=u;typeof n=="object"&&n!==null&&(s=n,n=null),s=s||{};let[,i,o]=t.match(/([^ ]+) *(.*)/),c=this.createCommand(i);return n&&(c.description(n),c._executableHandler=!0),s.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(s.noHelp||s.hidden),c._executableFile=s.executableFile||null,o&&c.arguments(o),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),n?this:c}createCommand(t){return new e(t)}createHelp(){return Object.assign(new vp,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,t),this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
12
- - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new wp(t,r)}argument(t,r,u,n){let s=this.createArgument(t,r);return typeof u=="function"?s.default(n).argParser(u):s.default(u),this.addArgument(s),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,this;t=t??"help [command]";let[,u,n]=t.match(/([^ ]+) *(.*)/),s=r??"display help for command",i=this.createCommand(u);return i.helpOption(!1),n&&i.arguments(n),s&&i.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=i,this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,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(t,r){let u=["preSubcommand","preAction","postAction"];if(!u.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
13
- Expecting one of '${u.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,u){this._exitCallback&&this._exitCallback(new hn(t,r,u)),Q.exit(t)}action(t){let r=u=>{let n=this.registeredArguments.length,s=u.slice(0,n);return this._storeOptionsAsProperties?s[n]=this:s[n]=this.opts(),s.push(this),t.apply(this,s)};return this._actionHandler=r,this}createOption(t,r){return new ws(t,r)}_callParseArg(t,r,u,n){try{return t.parseArg(r,u)}catch(s){if(s.code==="commander.invalidArgument"){let i=`${n} ${s.message}`;this.error(i,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let u=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${u}'
14
- - already used by option '${r.flags}'`)}this.options.push(t)}_registerCommand(t){let r=n=>[n.name()].concat(n.aliases()),u=r(t).find(n=>this._findCommand(n));if(u){let n=r(this._findCommand(u)).join("|"),s=r(t).join("|");throw new Error(`cannot add command '${s}' as already have command '${n}'`)}this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),u=t.attributeName();if(t.negate){let s=t.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(u,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(u,t.defaultValue,"default");let n=(s,i,o)=>{s==null&&t.presetArg!==void 0&&(s=t.presetArg);let c=this.getOptionValue(u);s!==null&&t.parseArg?s=this._callParseArg(t,s,c,i):s!==null&&t.variadic&&(s=t._concatValue(s,c)),s==null&&(t.negate?s=!1:t.isBoolean()||t.optional?s=!0:s=""),this.setOptionValueWithSource(u,s,o)};return this.on("option:"+r,s=>{let i=`error: option '${t.flags}' argument '${s}' is invalid.`;n(s,i,"cli")}),t.envVar&&this.on("optionEnv:"+r,s=>{let i=`error: option '${t.flags}' value '${s}' from env '${t.envVar}' is invalid.`;n(s,i,"env")}),this}_optionEx(t,r,u,n,s){if(typeof r=="object"&&r instanceof ws)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let i=this.createOption(r,u);if(i.makeOptionMandatory(!!t.mandatory),typeof n=="function")i.default(s).argParser(n);else if(n instanceof RegExp){let o=n;n=(c,a)=>{let D=o.exec(c);return D?D[0]:a},i.default(s).argParser(n)}else i.default(n);return this.addOption(i)}option(t,r,u,n){return this._optionEx({},t,r,u,n)}requiredOption(t,r,u,n){return this._optionEx({mandatory:!0},t,r,u,n)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,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(t=!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=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,u){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=u,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(u=>{u.getOptionValueSource(t)!==void 0&&(r=u.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){Q.versions?.electron&&(r.from="electron");let n=Q.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}t===void 0&&(t=Q.argv),this.rawArgs=t.slice();let u;switch(r.from){case void 0:case"node":this._scriptPath=t[1],u=t.slice(2);break;case"electron":Q.defaultApp?(this._scriptPath=t[1],u=t.slice(2)):u=t.slice(1);break;case"user":u=t.slice(0);break;case"eval":u=t.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",u}parse(t,r){let u=this._prepareUserArgs(t,r);return this._parseCommand([],u),this}async parseAsync(t,r){let u=this._prepareUserArgs(t,r);return await this._parseCommand([],u),this}_executeSubCommand(t,r){r=r.slice();let u=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function s(D,l){let p=Ue.resolve(D,l);if(pn.existsSync(p))return p;if(n.includes(Ue.extname(l)))return;let f=n.find(h=>pn.existsSync(`${p}${h}`));if(f)return`${p}${f}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=t._executableFile||`${this._name}-${t._name}`,o=this._executableDir||"";if(this._scriptPath){let D;try{D=pn.realpathSync(this._scriptPath)}catch{D=this._scriptPath}o=Ue.resolve(Ue.dirname(D),o)}if(o){let D=s(o,i);if(!D&&!t._executableFile&&this._scriptPath){let l=Ue.basename(this._scriptPath,Ue.extname(this._scriptPath));l!==this._name&&(D=s(o,`${l}-${t._name}`))}i=D||i}u=n.includes(Ue.extname(i));let c;Q.platform!=="win32"?u?(r.unshift(i),r=vs(Q.execArgv).concat(r),c=fn.spawn(Q.argv[0],r,{stdio:"inherit"})):c=fn.spawn(i,r,{stdio:"inherit"}):(r.unshift(i),r=vs(Q.execArgv).concat(r),c=fn.spawn(Q.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(l=>{Q.on(l,()=>{c.killed===!1&&c.exitCode===null&&c.kill(l)})});let a=this._exitCallback;c.on("close",D=>{D=D??1,a?a(new hn(D,"commander.executeSubCommandAsync","(close)")):Q.exit(D)}),c.on("error",D=>{if(D.code==="ENOENT"){let l=o?`searched for local subcommand relative to directory '${o}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",p=`'${i}' does not exist
15
- - if '${t._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
6
+ `),c=" ".repeat(n),m="\\s\u200B",C=new RegExp(`
7
+ |.{1,${o-1}}([${m}]|$)|[^${m}]+?([${m}]|$)`,"g"),h=l.match(C)||[];return a+h.map((f,F)=>f===`
8
+ `?"":(F>0?c:"")+f.trimEnd()).join(`
9
+ `)}};Rt.Help=Qe});var rt=q(it=>{var{InvalidArgumentError:sr}=fe(),et=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=ar(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new sr(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return or(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},tt=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let u=this.negativeOptions.get(n).presetArg,s=u!==void 0?u:!1;return t.negate===(s===e)}};function or(i){return i.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function ar(i){let e,t,n=i.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),t=n.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}it.Option=et;it.DualOptions=tt});var Vt=q(Tt=>{function Dr(i,e){if(Math.abs(i.length-e.length)>3)return Math.max(i.length,e.length);let t=[];for(let n=0;n<=i.length;n++)t[n]=[n];for(let n=0;n<=e.length;n++)t[0][n]=n;for(let n=1;n<=e.length;n++)for(let u=1;u<=i.length;u++){let s=1;i[u-1]===e[n-1]?s=0:s=1,t[u][n]=Math.min(t[u-1][n]+1,t[u][n-1]+1,t[u-1][n-1]+s),u>1&&n>1&&i[u-1]===e[n-2]&&i[u-2]===e[n-1]&&(t[u][n]=Math.min(t[u][n],t[u-2][n-2]+1))}return t[i.length][e.length]}function lr(i,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=i.startsWith("--");t&&(i=i.slice(2),e=e.map(r=>r.slice(2)));let n=[],u=3,s=.4;return e.forEach(r=>{if(r.length<=1)return;let o=Dr(i,r),a=Math.max(i.length,r.length);(a-o)/a>s&&(o<u?(u=o,n=[r]):o===u&&n.push(r))}),n.sort((r,o)=>r.localeCompare(o)),t&&(n=n.map(r=>`--${r}`)),n.length>1?`
10
+ (Did you mean one of ${n.join(", ")}?)`:n.length===1?`
11
+ (Did you mean ${n[0]}?)`:""}Tt.suggestSimilar=lr});var Lt=q(qt=>{var cr=require("node:events").EventEmitter,nt=require("node:child_process"),H=require("node:path"),ut=require("node:fs"),$=require("node:process"),{Argument:pr,humanReadableArgName:hr}=ve(),{CommanderError:st}=fe(),{Help:dr}=Xe(),{Option:Mt,DualOptions:mr}=rt(),{suggestSimilar:Nt}=Vt(),ot=class i extends cr{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,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._outputConfiguration={writeOut:t=>$.stdout.write(t),writeErr:t=>$.stderr.write(t),getOutHelpWidth:()=>$.stdout.isTTY?$.stdout.columns:void 0,getErrHelpWidth:()=>$.stderr.isTTY?$.stderr.columns:void 0,outputError:(t,n)=>n(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let u=t,s=n;typeof u=="object"&&u!==null&&(s=u,u=null),s=s||{};let[,r,o]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(r);return u&&(a.description(u),a._executableHandler=!0),s.isDefault&&(this._defaultCommandName=a._name),a._hidden=!!(s.noHelp||s.hidden),a._executableFile=s.executableFile||null,o&&a.arguments(o),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),u?this:a}createCommand(e){return new i(e)}createHelp(){return Object.assign(new dr,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
12
+ - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new pr(e,t)}argument(e,t,n,u){let s=this.createArgument(e,t);return typeof n=="function"?s.default(u).argParser(n):s.default(n),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,n,u]=e.match(/([^ ]+) *(.*)/),s=t??"display help for command",r=this.createCommand(n);return r.helpOption(!1),u&&r.arguments(u),s&&r.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=r,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
13
+ Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new st(e,t,n)),$.exit(e)}action(e){let t=n=>{let u=this.registeredArguments.length,s=n.slice(0,u);return this._storeOptionsAsProperties?s[u]=this:s[u]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new Mt(e,t)}_callParseArg(e,t,n,u){try{return e.parseArg(t,n)}catch(s){if(s.code==="commander.invalidArgument"){let r=`${u} ${s.message}`;this.error(r,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
14
+ - already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=u=>[u.name()].concat(u.aliases()),n=t(e).find(u=>this._findCommand(u));if(n){let u=t(this._findCommand(n)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${u}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let u=(s,r,o)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let a=this.getOptionValue(n);s!==null&&e.parseArg?s=this._callParseArg(e,s,a,r):s!==null&&e.variadic&&(s=e._concatValue(s,a)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(n,s,o)};return this.on("option:"+t,s=>{let r=`error: option '${e.flags}' argument '${s}' is invalid.`;u(s,r,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let r=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;u(s,r,"env")}),this}_optionEx(e,t,n,u,s){if(typeof t=="object"&&t instanceof Mt)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let r=this.createOption(t,n);if(r.makeOptionMandatory(!!e.mandatory),typeof u=="function")r.default(s).argParser(u);else if(u instanceof RegExp){let o=u;u=(a,l)=>{let c=o.exec(a);return c?c[0]:l},r.default(s).argParser(u)}else r.default(u);return this.addOption(r)}option(e,t,n,u){return this._optionEx({},e,t,n,u)}requiredOption(e,t,n,u){return this._optionEx({mandatory:!0},e,t,n,u)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){$.versions?.electron&&(t.from="electron");let u=$.execArgv??[];(u.includes("-e")||u.includes("--eval")||u.includes("-p")||u.includes("--print"))&&(t.from="eval")}e===void 0&&(e=$.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":$.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_executeSubCommand(e,t){t=t.slice();let n=!1,u=[".js",".ts",".tsx",".mjs",".cjs"];function s(c,p){let m=H.resolve(c,p);if(ut.existsSync(m))return m;if(u.includes(H.extname(p)))return;let C=u.find(h=>ut.existsSync(`${m}${h}`));if(C)return`${m}${C}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=e._executableFile||`${this._name}-${e._name}`,o=this._executableDir||"";if(this._scriptPath){let c;try{c=ut.realpathSync(this._scriptPath)}catch{c=this._scriptPath}o=H.resolve(H.dirname(c),o)}if(o){let c=s(o,r);if(!c&&!e._executableFile&&this._scriptPath){let p=H.basename(this._scriptPath,H.extname(this._scriptPath));p!==this._name&&(c=s(o,`${p}-${e._name}`))}r=c||r}n=u.includes(H.extname(r));let a;$.platform!=="win32"?n?(t.unshift(r),t=Ut($.execArgv).concat(t),a=nt.spawn($.argv[0],t,{stdio:"inherit"})):a=nt.spawn(r,t,{stdio:"inherit"}):(t.unshift(r),t=Ut($.execArgv).concat(t),a=nt.spawn($.execPath,t,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(p=>{$.on(p,()=>{a.killed===!1&&a.exitCode===null&&a.kill(p)})});let l=this._exitCallback;a.on("close",c=>{c=c??1,l?l(new st(c,"commander.executeSubCommandAsync","(close)")):$.exit(c)}),a.on("error",c=>{if(c.code==="ENOENT"){let p=o?`searched for local subcommand relative to directory '${o}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",m=`'${r}' does not exist
15
+ - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
16
16
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
17
- - ${l}`;throw new Error(p)}else if(D.code==="EACCES")throw new Error(`'${i}' not executable`);if(!a)Q.exit(1);else{let l=new hn(1,"commander.executeSubCommandAsync","(error)");l.nestedError=D,a(l)}}),this.runningCommand=c}_dispatchSubcommand(t,r,u){let n=this._findCommand(t);n||this.help({error:!0});let s;return s=this._chainOrCallSubCommandHook(s,n,"preSubcommand"),s=this._chainOrCall(s,()=>{if(n._executableHandler)this._executeSubCommand(n,r.concat(u));else return n._parseCommand(r,u)}),s}_dispatchHelpCommand(t){t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(u,n,s)=>{let i=n;if(n!==null&&u.parseArg){let o=`error: command-argument value '${n}' is invalid for argument '${u.name()}'.`;i=this._callParseArg(u,n,s,o)}return i};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((u,n)=>{let s=u.defaultValue;u.variadic?n<this.args.length?(s=this.args.slice(n),u.parseArg&&(s=s.reduce((i,o)=>t(u,o,i),u.defaultValue))):s===void 0&&(s=[]):n<this.args.length&&(s=this.args[n],u.parseArg&&(s=t(u,s,u.defaultValue))),r[n]=s}),this.processedArgs=r}_chainOrCall(t,r){return t&&t.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let u=t,n=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[r]!==void 0).forEach(s=>{s._lifeCycleHooks[r].forEach(i=>{n.push({hookedCommand:s,callback:i})})}),r==="postAction"&&n.reverse(),n.forEach(s=>{u=this._chainOrCall(u,()=>s.callback(s.hookedCommand,this))}),u}_chainOrCallSubCommandHook(t,r,u){let n=t;return this._lifeCycleHooks[u]!==void 0&&this._lifeCycleHooks[u].forEach(s=>{n=this._chainOrCall(n,()=>s(this,r))}),n}_parseCommand(t,r){let u=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(u.operands),r=u.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(u.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{u.unknown.length>0&&this.unknownOption(u.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let i;return i=this._chainOrCallHooks(i,"preAction"),i=this._chainOrCall(i,()=>this._actionHandler(this.processedArgs)),this.parent&&(i=this._chainOrCall(i,()=>{this.parent.emit(s,t,r)})),i=this._chainOrCallHooks(i,"postAction"),i}if(this.parent&&this.parent.listenerCount(s))n(),this._processArguments(),this.parent.emit(s,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(u=>{let n=u.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});t.filter(u=>u.conflictsWith.length>0).forEach(u=>{let n=t.find(s=>u.conflictsWith.includes(s.attributeName()));n&&this._conflictingOption(u,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],u=[],n=r,s=t.slice();function i(c){return c.length>1&&c[0]==="-"}let o=null;for(;s.length;){let c=s.shift();if(c==="--"){n===u&&n.push(c),n.push(...s);break}if(o&&!i(c)){this.emit(`option:${o.name()}`,c);continue}if(o=null,i(c)){let a=this._findOption(c);if(a){if(a.required){let D=s.shift();D===void 0&&this.optionMissingArgument(a),this.emit(`option:${a.name()}`,D)}else if(a.optional){let D=null;s.length>0&&!i(s[0])&&(D=s.shift()),this.emit(`option:${a.name()}`,D)}else this.emit(`option:${a.name()}`);o=a.variadic?a:null;continue}}if(c.length>2&&c[0]==="-"&&c[1]!=="-"){let a=this._findOption(`-${c[1]}`);if(a){a.required||a.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${a.name()}`,c.slice(2)):(this.emit(`option:${a.name()}`),s.unshift(`-${c.slice(2)}`));continue}}if(/^--[^=]+=/.test(c)){let a=c.indexOf("="),D=this._findOption(c.slice(0,a));if(D&&(D.required||D.optional)){this.emit(`option:${D.name()}`,c.slice(a+1));continue}}if(i(c)&&(n=u),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&u.length===0){if(this._findCommand(c)){r.push(c),s.length>0&&u.push(...s);break}else if(this._getHelpCommand()&&c===this._getHelpCommand().name()){r.push(c),s.length>0&&r.push(...s);break}else if(this._defaultCommandName){u.push(c),s.length>0&&u.push(...s);break}}if(this._passThroughOptions){n.push(c),s.length>0&&n.push(...s);break}n.push(c)}return{operands:r,unknown:u}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let u=0;u<r;u++){let n=this.options[u].attributeName();t[n]=n===this._versionOptionName?this._version:this[n]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
17
+ - ${p}`;throw new Error(m)}else if(c.code==="EACCES")throw new Error(`'${r}' not executable`);if(!l)$.exit(1);else{let p=new st(1,"commander.executeSubCommandAsync","(error)");p.nestedError=c,l(p)}}),this.runningCommand=a}_dispatchSubcommand(e,t,n){let u=this._findCommand(e);u||this.help({error:!0});let s;return s=this._chainOrCallSubCommandHook(s,u,"preSubcommand"),s=this._chainOrCall(s,()=>{if(u._executableHandler)this._executeSubCommand(u,t.concat(n));else return u._parseCommand(t,n)}),s}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,u,s)=>{let r=u;if(u!==null&&n.parseArg){let o=`error: command-argument value '${u}' is invalid for argument '${n.name()}'.`;r=this._callParseArg(n,u,s,o)}return r};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,u)=>{let s=n.defaultValue;n.variadic?u<this.args.length?(s=this.args.slice(u),n.parseArg&&(s=s.reduce((r,o)=>e(n,o,r),n.defaultValue))):s===void 0&&(s=[]):u<this.args.length&&(s=this.args[u],n.parseArg&&(s=e(n,s,n.defaultValue))),t[u]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,u=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(r=>{u.push({hookedCommand:s,callback:r})})}),t==="postAction"&&u.reverse(),u.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let u=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(s=>{u=this._chainOrCall(u,()=>s(this,t))}),u}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let u=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){u(),this._processArguments();let r;return r=this._chainOrCallHooks(r,"preAction"),r=this._chainOrCall(r,()=>this._actionHandler(this.processedArgs)),this.parent&&(r=this._chainOrCall(r,()=>{this.parent.emit(s,e,t)})),r=this._chainOrCallHooks(r,"postAction"),r}if(this.parent&&this.parent.listenerCount(s))u(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(u(),this._processArguments())}else this.commands.length?(u(),this.help({error:!0})):(u(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let u=n.attributeName();return this.getOptionValue(u)===void 0?!1:this.getOptionValueSource(u)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let u=e.find(s=>n.conflictsWith.includes(s.attributeName()));u&&this._conflictingOption(n,u)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],u=t,s=e.slice();function r(a){return a.length>1&&a[0]==="-"}let o=null;for(;s.length;){let a=s.shift();if(a==="--"){u===n&&u.push(a),u.push(...s);break}if(o&&!r(a)){this.emit(`option:${o.name()}`,a);continue}if(o=null,r(a)){let l=this._findOption(a);if(l){if(l.required){let c=s.shift();c===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,c)}else if(l.optional){let c=null;s.length>0&&!r(s[0])&&(c=s.shift()),this.emit(`option:${l.name()}`,c)}else this.emit(`option:${l.name()}`);o=l.variadic?l:null;continue}}if(a.length>2&&a[0]==="-"&&a[1]!=="-"){let l=this._findOption(`-${a[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,a.slice(2)):(this.emit(`option:${l.name()}`),s.unshift(`-${a.slice(2)}`));continue}}if(/^--[^=]+=/.test(a)){let l=a.indexOf("="),c=this._findOption(a.slice(0,l));if(c&&(c.required||c.optional)){this.emit(`option:${c.name()}`,a.slice(l+1));continue}}if(r(a)&&(u=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(a)){t.push(a),s.length>0&&n.push(...s);break}else if(this._getHelpCommand()&&a===this._getHelpCommand().name()){t.push(a),s.length>0&&t.push(...s);break}else if(this._defaultCommandName){n.push(a),s.length>0&&n.push(...s);break}}if(this._passThroughOptions){u.push(a),s.length>0&&u.push(...s);break}u.push(a)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let u=this.options[n].attributeName();e[u]=u===this._versionOptionName?this._version:this[u]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
18
18
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
19
19
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
20
- `),this.outputHelp({error:!0}));let u=r||{},n=u.exitCode||1,s=u.code||"commander.error";this._exit(n,s,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in Q.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,Q.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new xp(this.options),r=u=>this.getOptionValue(u)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(u));this.options.filter(u=>u.implied!==void 0&&r(u.attributeName())&&t.valueFromOption(this.getOptionValue(u.attributeName()),u)).forEach(u=>{Object.keys(u.implied).filter(n=>!r(n)).forEach(n=>{this.setOptionValueWithSource(n,u.implied[n],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let u=i=>{let o=i.attributeName(),c=this.getOptionValue(o),a=this.options.find(l=>l.negate&&o===l.attributeName()),D=this.options.find(l=>!l.negate&&o===l.attributeName());return a&&(a.presetArg===void 0&&c===!1||a.presetArg!==void 0&&c===a.presetArg)?a:D||i},n=i=>{let o=u(i),c=o.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${o.envVar}'`:`option '${o.flags}'`},s=`error: ${n(t)} cannot be used with ${n(r)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let n=[],s=this;do{let i=s.createHelp().visibleOptions(s).filter(o=>o.long).map(o=>o.long);n=n.concat(i),s=s.parent}while(s&&!s._enablePositionalOptions);r=Bs(t,n)}let u=`error: unknown option '${t}'${r}`;this.error(u,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,u=r===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${u} but got ${t.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let t=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=Bs(t,n)}let u=`error: unknown command '${t}'${r}`;this.error(u,{code:"commander.unknownCommand"})}version(t,r,u){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",u=u||"output the version number";let n=this.createOption(r,u);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${t}
21
- `),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===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]),t===r._name)throw new Error("Command alias can't be the same as its name");let u=this.parent?._findCommand(t);if(u){let n=[u.name()].concat(u.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${n}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(u=>Bp(u));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}nameFromFilename(t){return this._name=Ue.basename(t,Ue.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp();return r.helpWidth===void 0&&(r.helpWidth=t&&t.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),r.formatHelp(this,r)}_getHelpContext(t){t=t||{};let r={error:!!t.error},u;return r.error?u=n=>this._outputConfiguration.writeErr(n):u=n=>this._outputConfiguration.writeOut(n),r.write=t.write||u,r.command=this,r}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let u=this._getHelpContext(t);this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",u)),this.emit("beforeHelp",u);let n=this.helpInformation(u);if(r&&(n=r(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");u.write(n),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",u),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",u))}helpOption(t,r){return typeof t=="boolean"?(t?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(t=t??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(t,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this}help(t){this.outputHelp(t);let r=Q.exitCode||0;r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let u=["beforeAll","before","after","afterAll"];if(!u.includes(t))throw new Error(`Unexpected value for position to addHelpText.
22
- Expecting one of '${u.join("', '")}'`);let n=`${t}Help`;return this.on(n,s=>{let i;typeof r=="function"?i=r({error:s.error,command:s.command}):i=r,i&&s.write(`${i}
23
- `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function vs(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,u="127.0.0.1",n="9229",s;return(s=t.match(/^(--inspect(-brk)?)$/))!==null?r=s[1]:(s=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=s[1],/^\d+$/.test(s[3])?n=s[3]:u=s[3]):(s=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=s[1],u=s[3],n=s[4]),r&&n!=="0"?`${r}=${u}:${parseInt(n)+1}`:t})}xs.Command=dn});var Rs=C(Ae=>{var{Argument:_s}=qr(),{Command:mn}=Ss(),{CommanderError:Sp,InvalidArgumentError:$s}=Qt(),{Help:_p}=on(),{Option:Os}=ln();Ae.program=new mn;Ae.createCommand=e=>new mn(e);Ae.createOption=(e,t)=>new Os(e,t);Ae.createArgument=(e,t)=>new _s(e,t);Ae.Command=mn;Ae.Option=Os;Ae.Argument=_s;Ae.Help=_p;Ae.CommanderError=Sp;Ae.InvalidArgumentError=$s;Ae.InvalidOptionArgumentError=$s});var Ns=C((nC,Ts)=>{var Ze=require("constants"),$p=process.cwd,Mr=null,Op=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Mr||(Mr=$p.call(process)),Mr};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Fn=process.chdir,process.chdir=function(e){Mr=null,Fn.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Fn));var Fn;Ts.exports=Rp;function Rp(e){Ze.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=u(e.chmod),e.fchmod=u(e.fchmod),e.lchmod=u(e.lchmod),e.chownSync=i(e.chownSync),e.fchownSync=i(e.fchownSync),e.lchownSync=i(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=c(e.statSync),e.fstatSync=c(e.fstatSync),e.lstatSync=c(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(D,l,p){p&&process.nextTick(p)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(D,l,p,f){f&&process.nextTick(f)},e.lchownSync=function(){}),Op==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:(function(D){function l(p,f,h){var m=Date.now(),F=0;D(p,f,function g($){if($&&($.code==="EACCES"||$.code==="EPERM"||$.code==="EBUSY")&&Date.now()-m<6e4){setTimeout(function(){e.stat(f,function(v,w){v&&v.code==="ENOENT"?D(p,f,g):h($)})},F),F<100&&(F+=10);return}h&&h($)})}return Object.setPrototypeOf&&Object.setPrototypeOf(l,D),l})(e.rename)),e.read=typeof e.read!="function"?e.read:(function(D){function l(p,f,h,m,F,g){var $;if(g&&typeof g=="function"){var v=0;$=function(w,V,L){if(w&&w.code==="EAGAIN"&&v<10)return v++,D.call(e,p,f,h,m,F,$);g.apply(this,arguments)}}return D.call(e,p,f,h,m,F,$)}return Object.setPrototypeOf&&Object.setPrototypeOf(l,D),l})(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:(function(D){return function(l,p,f,h,m){for(var F=0;;)try{return D.call(e,l,p,f,h,m)}catch(g){if(g.code==="EAGAIN"&&F<10){F++;continue}throw g}}})(e.readSync);function t(D){D.lchmod=function(l,p,f){D.open(l,Ze.O_WRONLY|Ze.O_SYMLINK,p,function(h,m){if(h){f&&f(h);return}D.fchmod(m,p,function(F){D.close(m,function(g){f&&f(F||g)})})})},D.lchmodSync=function(l,p){var f=D.openSync(l,Ze.O_WRONLY|Ze.O_SYMLINK,p),h=!0,m;try{m=D.fchmodSync(f,p),h=!1}finally{if(h)try{D.closeSync(f)}catch{}else D.closeSync(f)}return m}}function r(D){Ze.hasOwnProperty("O_SYMLINK")&&D.futimes?(D.lutimes=function(l,p,f,h){D.open(l,Ze.O_SYMLINK,function(m,F){if(m){h&&h(m);return}D.futimes(F,p,f,function(g){D.close(F,function($){h&&h(g||$)})})})},D.lutimesSync=function(l,p,f){var h=D.openSync(l,Ze.O_SYMLINK),m,F=!0;try{m=D.futimesSync(h,p,f),F=!1}finally{if(F)try{D.closeSync(h)}catch{}else D.closeSync(h)}return m}):D.futimes&&(D.lutimes=function(l,p,f,h){h&&process.nextTick(h)},D.lutimesSync=function(){})}function u(D){return D&&function(l,p,f){return D.call(e,l,p,function(h){a(h)&&(h=null),f&&f.apply(this,arguments)})}}function n(D){return D&&function(l,p){try{return D.call(e,l,p)}catch(f){if(!a(f))throw f}}}function s(D){return D&&function(l,p,f,h){return D.call(e,l,p,f,function(m){a(m)&&(m=null),h&&h.apply(this,arguments)})}}function i(D){return D&&function(l,p,f){try{return D.call(e,l,p,f)}catch(h){if(!a(h))throw h}}}function o(D){return D&&function(l,p,f){typeof p=="function"&&(f=p,p=null);function h(m,F){F&&(F.uid<0&&(F.uid+=4294967296),F.gid<0&&(F.gid+=4294967296)),f&&f.apply(this,arguments)}return p?D.call(e,l,p,h):D.call(e,l,h)}}function c(D){return D&&function(l,p){var f=p?D.call(e,l,p):D.call(e,l);return f&&(f.uid<0&&(f.uid+=4294967296),f.gid<0&&(f.gid+=4294967296)),f}}function a(D){if(!D||D.code==="ENOSYS")return!0;var l=!process.getuid||process.getuid()!==0;return!!(l&&(D.code==="EINVAL"||D.code==="EPERM"))}}});var js=C((iC,Ls)=>{var Ps=require("stream").Stream;Ls.exports=Ip;function Ip(e){return{ReadStream:t,WriteStream:r};function t(u,n){if(!(this instanceof t))return new t(u,n);Ps.call(this);var s=this;this.path=u,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,n=n||{};for(var i=Object.keys(n),o=0,c=i.length;o<c;o++){var a=i[o];this[a]=n[a]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}e.open(this.path,this.flags,this.mode,function(D,l){if(D){s.emit("error",D),s.readable=!1;return}s.fd=l,s.emit("open",l),s._read()})}function r(u,n){if(!(this instanceof r))return new r(u,n);Ps.call(this),this.path=u,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var s=Object.keys(n),i=0,o=s.length;i<o;i++){var c=s[i];this[c]=n[c]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var qs=C((sC,ks)=>{"use strict";ks.exports=Np;var Tp=Object.getPrototypeOf||function(e){return e.__proto__};function Np(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:Tp(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}});var Gs=C((oC,Cn)=>{var z=require("fs"),Pp=Ns(),Lp=js(),jp=qs(),Ur=require("util"),ie,Gr;typeof Symbol=="function"&&typeof Symbol.for=="function"?(ie=Symbol.for("graceful-fs.queue"),Gr=Symbol.for("graceful-fs.previous")):(ie="___graceful-fs.queue",Gr="___graceful-fs.previous");function kp(){}function Vs(e,t){Object.defineProperty(e,ie,{get:function(){return t}})}var Dt=kp;Ur.debuglog?Dt=Ur.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Dt=function(){var e=Ur.format.apply(Ur,arguments);e="GFS4: "+e.split(/\n/).join(`
24
- GFS4: `),console.error(e)});z[ie]||(Ms=global[ie]||[],Vs(z,Ms),z.close=(function(e){function t(r,u){return e.call(z,r,function(n){n||Us(),typeof u=="function"&&u.apply(this,arguments)})}return Object.defineProperty(t,Gr,{value:e}),t})(z.close),z.closeSync=(function(e){function t(r){e.apply(z,arguments),Us()}return Object.defineProperty(t,Gr,{value:e}),t})(z.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Dt(z[ie]),require("assert").equal(z[ie].length,0)}));var Ms;global[ie]||Vs(global,z[ie]);Cn.exports=En(jp(z));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!z.__patched&&(Cn.exports=En(z),z.__patched=!0);function En(e){Pp(e),e.gracefulify=En,e.createReadStream=V,e.createWriteStream=L;var t=e.readFile;e.readFile=r;function r(E,y,B){return typeof y=="function"&&(B=y,y=null),k(E,y,B);function k(q,j,O,R){return t(q,j,function(S){S&&(S.code==="EMFILE"||S.code==="ENFILE")?$t([k,[q,j,O],S,R||Date.now(),Date.now()]):typeof O=="function"&&O.apply(this,arguments)})}}var u=e.writeFile;e.writeFile=n;function n(E,y,B,k){return typeof B=="function"&&(k=B,B=null),q(E,y,B,k);function q(j,O,R,S,M){return u(j,O,R,function(_){_&&(_.code==="EMFILE"||_.code==="ENFILE")?$t([q,[j,O,R,S],_,M||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=i);function i(E,y,B,k){return typeof B=="function"&&(k=B,B=null),q(E,y,B,k);function q(j,O,R,S,M){return s(j,O,R,function(_){_&&(_.code==="EMFILE"||_.code==="ENFILE")?$t([q,[j,O,R,S],_,M||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}var o=e.copyFile;o&&(e.copyFile=c);function c(E,y,B,k){return typeof B=="function"&&(k=B,B=0),q(E,y,B,k);function q(j,O,R,S,M){return o(j,O,R,function(_){_&&(_.code==="EMFILE"||_.code==="ENFILE")?$t([q,[j,O,R,S],_,M||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}var a=e.readdir;e.readdir=l;var D=/^v[0-5]\./;function l(E,y,B){typeof y=="function"&&(B=y,y=null);var k=D.test(process.version)?function(O,R,S,M){return a(O,q(O,R,S,M))}:function(O,R,S,M){return a(O,R,q(O,R,S,M))};return k(E,y,B);function q(j,O,R,S){return function(M,_){M&&(M.code==="EMFILE"||M.code==="ENFILE")?$t([k,[j,O,R],M,S||Date.now(),Date.now()]):(_&&_.sort&&_.sort(),typeof R=="function"&&R.call(this,M,_))}}}if(process.version.substr(0,4)==="v0.8"){var p=Lp(e);g=p.ReadStream,v=p.WriteStream}var f=e.ReadStream;f&&(g.prototype=Object.create(f.prototype),g.prototype.open=$);var h=e.WriteStream;h&&(v.prototype=Object.create(h.prototype),v.prototype.open=w),Object.defineProperty(e,"ReadStream",{get:function(){return g},set:function(E){g=E},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return v},set:function(E){v=E},enumerable:!0,configurable:!0});var m=g;Object.defineProperty(e,"FileReadStream",{get:function(){return m},set:function(E){m=E},enumerable:!0,configurable:!0});var F=v;Object.defineProperty(e,"FileWriteStream",{get:function(){return F},set:function(E){F=E},enumerable:!0,configurable:!0});function g(E,y){return this instanceof g?(f.apply(this,arguments),this):g.apply(Object.create(g.prototype),arguments)}function $(){var E=this;Z(E.path,E.flags,E.mode,function(y,B){y?(E.autoClose&&E.destroy(),E.emit("error",y)):(E.fd=B,E.emit("open",B),E.read())})}function v(E,y){return this instanceof v?(h.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}function w(){var E=this;Z(E.path,E.flags,E.mode,function(y,B){y?(E.destroy(),E.emit("error",y)):(E.fd=B,E.emit("open",B))})}function V(E,y){return new e.ReadStream(E,y)}function L(E,y){return new e.WriteStream(E,y)}var N=e.open;e.open=Z;function Z(E,y,B,k){return typeof B=="function"&&(k=B,B=null),q(E,y,B,k);function q(j,O,R,S,M){return N(j,O,R,function(_,Dp){_&&(_.code==="EMFILE"||_.code==="ENFILE")?$t([q,[j,O,R,S],_,M||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}return e}function $t(e){Dt("ENQUEUE",e[0].name,e[1]),z[ie].push(e),gn()}var Vr;function Us(){for(var e=Date.now(),t=0;t<z[ie].length;++t)z[ie][t].length>2&&(z[ie][t][3]=e,z[ie][t][4]=e);gn()}function gn(){if(clearTimeout(Vr),Vr=void 0,z[ie].length!==0){var e=z[ie].shift(),t=e[0],r=e[1],u=e[2],n=e[3],s=e[4];if(n===void 0)Dt("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-n>=6e4){Dt("TIMEOUT",t.name,r);var i=r.pop();typeof i=="function"&&i.call(null,u)}else{var o=Date.now()-s,c=Math.max(s-n,1),a=Math.min(c*1.2,100);o>=a?(Dt("RETRY",t.name,r),t.apply(null,r.concat([n]))):z[ie].push(e)}Vr===void 0&&(Vr=setTimeout(gn,0))}}});var Dr=C((g2,xo)=>{"use strict";var ph=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};xo.exports=ph});var ar=C((C2,So)=>{"use strict";var hh="2.0.0",dh=Number.MAX_SAFE_INTEGER||9007199254740991,mh=16,Fh=250,Eh=["major","premajor","minor","preminor","patch","prepatch","prerelease"];So.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:mh,MAX_SAFE_BUILD_LENGTH:Fh,MAX_SAFE_INTEGER:dh,RELEASE_TYPES:Eh,SEMVER_SPEC_VERSION:hh,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Nt=C((Ne,_o)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Pn,MAX_SAFE_BUILD_LENGTH:gh,MAX_LENGTH:Ch}=ar(),yh=Dr();Ne=_o.exports={};var Ah=Ne.re=[],bh=Ne.safeRe=[],A=Ne.src=[],wh=Ne.safeSrc=[],b=Ne.t={},Bh=0,Ln="[a-zA-Z0-9-]",vh=[["\\s",1],["\\d",Ch],[Ln,gh]],xh=e=>{for(let[t,r]of vh)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},T=(e,t,r)=>{let u=xh(t),n=Bh++;yh(e,n,t),b[e]=n,A[n]=t,wh[n]=u,Ah[n]=new RegExp(t,r?"g":void 0),bh[n]=new RegExp(u,r?"g":void 0)};T("NUMERICIDENTIFIER","0|[1-9]\\d*");T("NUMERICIDENTIFIERLOOSE","\\d+");T("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ln}*`);T("MAINVERSION",`(${A[b.NUMERICIDENTIFIER]})\\.(${A[b.NUMERICIDENTIFIER]})\\.(${A[b.NUMERICIDENTIFIER]})`);T("MAINVERSIONLOOSE",`(${A[b.NUMERICIDENTIFIERLOOSE]})\\.(${A[b.NUMERICIDENTIFIERLOOSE]})\\.(${A[b.NUMERICIDENTIFIERLOOSE]})`);T("PRERELEASEIDENTIFIER",`(?:${A[b.NONNUMERICIDENTIFIER]}|${A[b.NUMERICIDENTIFIER]})`);T("PRERELEASEIDENTIFIERLOOSE",`(?:${A[b.NONNUMERICIDENTIFIER]}|${A[b.NUMERICIDENTIFIERLOOSE]})`);T("PRERELEASE",`(?:-(${A[b.PRERELEASEIDENTIFIER]}(?:\\.${A[b.PRERELEASEIDENTIFIER]})*))`);T("PRERELEASELOOSE",`(?:-?(${A[b.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${A[b.PRERELEASEIDENTIFIERLOOSE]})*))`);T("BUILDIDENTIFIER",`${Ln}+`);T("BUILD",`(?:\\+(${A[b.BUILDIDENTIFIER]}(?:\\.${A[b.BUILDIDENTIFIER]})*))`);T("FULLPLAIN",`v?${A[b.MAINVERSION]}${A[b.PRERELEASE]}?${A[b.BUILD]}?`);T("FULL",`^${A[b.FULLPLAIN]}$`);T("LOOSEPLAIN",`[v=\\s]*${A[b.MAINVERSIONLOOSE]}${A[b.PRERELEASELOOSE]}?${A[b.BUILD]}?`);T("LOOSE",`^${A[b.LOOSEPLAIN]}$`);T("GTLT","((?:<|>)?=?)");T("XRANGEIDENTIFIERLOOSE",`${A[b.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);T("XRANGEIDENTIFIER",`${A[b.NUMERICIDENTIFIER]}|x|X|\\*`);T("XRANGEPLAIN",`[v=\\s]*(${A[b.XRANGEIDENTIFIER]})(?:\\.(${A[b.XRANGEIDENTIFIER]})(?:\\.(${A[b.XRANGEIDENTIFIER]})(?:${A[b.PRERELEASE]})?${A[b.BUILD]}?)?)?`);T("XRANGEPLAINLOOSE",`[v=\\s]*(${A[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${A[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${A[b.XRANGEIDENTIFIERLOOSE]})(?:${A[b.PRERELEASELOOSE]})?${A[b.BUILD]}?)?)?`);T("XRANGE",`^${A[b.GTLT]}\\s*${A[b.XRANGEPLAIN]}$`);T("XRANGELOOSE",`^${A[b.GTLT]}\\s*${A[b.XRANGEPLAINLOOSE]}$`);T("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Pn}})(?:\\.(\\d{1,${Pn}}))?(?:\\.(\\d{1,${Pn}}))?`);T("COERCE",`${A[b.COERCEPLAIN]}(?:$|[^\\d])`);T("COERCEFULL",A[b.COERCEPLAIN]+`(?:${A[b.PRERELEASE]})?(?:${A[b.BUILD]})?(?:$|[^\\d])`);T("COERCERTL",A[b.COERCE],!0);T("COERCERTLFULL",A[b.COERCEFULL],!0);T("LONETILDE","(?:~>?)");T("TILDETRIM",`(\\s*)${A[b.LONETILDE]}\\s+`,!0);Ne.tildeTrimReplace="$1~";T("TILDE",`^${A[b.LONETILDE]}${A[b.XRANGEPLAIN]}$`);T("TILDELOOSE",`^${A[b.LONETILDE]}${A[b.XRANGEPLAINLOOSE]}$`);T("LONECARET","(?:\\^)");T("CARETTRIM",`(\\s*)${A[b.LONECARET]}\\s+`,!0);Ne.caretTrimReplace="$1^";T("CARET",`^${A[b.LONECARET]}${A[b.XRANGEPLAIN]}$`);T("CARETLOOSE",`^${A[b.LONECARET]}${A[b.XRANGEPLAINLOOSE]}$`);T("COMPARATORLOOSE",`^${A[b.GTLT]}\\s*(${A[b.LOOSEPLAIN]})$|^$`);T("COMPARATOR",`^${A[b.GTLT]}\\s*(${A[b.FULLPLAIN]})$|^$`);T("COMPARATORTRIM",`(\\s*)${A[b.GTLT]}\\s*(${A[b.LOOSEPLAIN]}|${A[b.XRANGEPLAIN]})`,!0);Ne.comparatorTrimReplace="$1$2$3";T("HYPHENRANGE",`^\\s*(${A[b.XRANGEPLAIN]})\\s+-\\s+(${A[b.XRANGEPLAIN]})\\s*$`);T("HYPHENRANGELOOSE",`^\\s*(${A[b.XRANGEPLAINLOOSE]})\\s+-\\s+(${A[b.XRANGEPLAINLOOSE]})\\s*$`);T("STAR","(<|>)?=?\\s*\\*");T("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");T("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Zr=C((y2,$o)=>{"use strict";var Sh=Object.freeze({loose:!0}),_h=Object.freeze({}),$h=e=>e?typeof e!="object"?Sh:e:_h;$o.exports=$h});var jn=C((A2,Io)=>{"use strict";var Oo=/^[0-9]+$/,Ro=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;let r=Oo.test(e),u=Oo.test(t);return r&&u&&(e=+e,t=+t),e===t?0:r&&!u?-1:u&&!r?1:e<t?-1:1},Oh=(e,t)=>Ro(t,e);Io.exports={compareIdentifiers:Ro,rcompareIdentifiers:Oh}});var ce=C((b2,No)=>{"use strict";var Qr=Dr(),{MAX_LENGTH:To,MAX_SAFE_INTEGER:eu}=ar(),{safeRe:tu,t:ru}=Nt(),Rh=Zr(),{compareIdentifiers:kn}=jn(),qn=class e{constructor(t,r){if(r=Rh(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>To)throw new TypeError(`version is longer than ${To} characters`);Qr("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let u=t.trim().match(r.loose?tu[ru.LOOSE]:tu[ru.FULL]);if(!u)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>eu||this.major<0)throw new TypeError("Invalid major version");if(this.minor>eu||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>eu||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let s=+n;if(s>=0&&s<eu)return s}return n}):this.prerelease=[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Qr("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let u=this.prerelease[r],n=t.prerelease[r];if(Qr("prerelease compare",r,u,n),u===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(u===void 0)return-1;if(u===n)continue;return kn(u,n)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let u=this.build[r],n=t.build[r];if(Qr("build compare",r,u,n),u===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(u===void 0)return-1;if(u===n)continue;return kn(u,n)}while(++r)}inc(t,r,u){if(t.startsWith("pre")){if(!r&&u===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=`-${r}`.match(this.options.loose?tu[ru.PRERELEASELOOSE]:tu[ru.PRERELEASE]);if(!n||n[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,u);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,u);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,u),this.inc("pre",r,u);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,u),this.inc("pre",r,u);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(u)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&u===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let s=[r,n];u===!1&&(s=[r]),kn(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};No.exports=qn});var ft=C((w2,Lo)=>{"use strict";var Po=ce(),Ih=(e,t,r=!1)=>{if(e instanceof Po)return e;try{return new Po(e,t)}catch(u){if(!r)return null;throw u}};Lo.exports=Ih});var Mn=C((B2,ko)=>{"use strict";var jo=ft(),Th=(e,t)=>{let r=jo(e,null,!0),u=jo(t,null,!0),n=r.compare(u);if(n===0)return null;let s=n>0,i=s?r:u,o=s?u:r,c=!!i.prerelease.length;if(!!o.prerelease.length&&!c){if(!o.patch&&!o.minor)return"major";if(o.compareMain(i)===0)return o.minor&&!o.patch?"minor":"patch"}let D=c?"pre":"";return r.major!==u.major?D+"major":r.minor!==u.minor?D+"minor":r.patch!==u.patch?D+"patch":"prerelease"};ko.exports=Th});var we=C((v2,Mo)=>{"use strict";var qo=ce(),Nh=(e,t,r)=>new qo(e,r).compare(new qo(t,r));Mo.exports=Nh});var Pt=C((x2,Uo)=>{"use strict";var Ph=we(),Lh=(e,t,r)=>Ph(e,t,r)>0;Uo.exports=Lh});var zn=C(dt=>{dt.parse=dt.decode=Wh;dt.stringify=dt.encode=aD;dt.safe=kt;dt.unsafe=Du;var Jn=typeof process<"u"&&process.platform==="win32"?`\r
25
- `:`
26
- `;function aD(e,t){var r=[],u="";typeof t=="string"?t={section:t,whitespace:!1}:(t=t||{},t.whitespace=t.whitespace===!0);var n=t.whitespace?" = ":"=";return Object.keys(e).forEach(function(s,i,o){var c=e[s];c&&Array.isArray(c)?c.forEach(function(a){u+=kt(s+"[]")+n+kt(a)+`
27
- `}):c&&typeof c=="object"?r.push(s):u+=kt(s)+n+kt(c)+Jn}),t.section&&u.length&&(u="["+kt(t.section)+"]"+Jn+u),r.forEach(function(s,i,o){var c=cD(s).join("\\."),a=(t.section?t.section+".":"")+c,D=aD(e[s],{section:a,whitespace:t.whitespace});u.length&&D.length&&(u+=Jn),u+=D}),u}function cD(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(t){return t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function Wh(e){var t={},r=t,u=null,n=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,s=e.split(/[\r\n]+/g);return s.forEach(function(i,o,c){if(!(!i||i.match(/^\s*[;#]/))){var a=i.match(n);if(a){if(a[1]!==void 0){if(u=Du(a[1]),u==="__proto__"){r={};return}r=t[u]=t[u]||{};return}var D=Du(a[2]);if(D!=="__proto__"){var l=a[3]?Du(a[4]):!0;switch(l){case"true":case"false":case"null":l=JSON.parse(l)}if(D.length>2&&D.slice(-2)==="[]"){if(D=D.substring(0,D.length-2),D==="__proto__")return;r[D]?Array.isArray(r[D])||(r[D]=[r[D]]):r[D]=[]}Array.isArray(r[D])?r[D].push(l):r[D]=l}}}}),Object.keys(t).filter(function(i,o,c){if(!t[i]||typeof t[i]!="object"||Array.isArray(t[i]))return!1;var a=cD(i),D=t,l=a.pop(),p=l.replace(/\\\./g,".");return a.forEach(function(f,h,m){f!=="__proto__"&&((!D[f]||typeof D[f]!="object")&&(D[f]={}),D=D[f])}),D===t&&p===l?!1:(D[p]=t[i],!0)}).forEach(function(i,o,c){delete t[i]}),t}function lD(e){return e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'"}function kt(e){return typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&lD(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Du(e,t){if(e=(e||"").trim(),lD(e)){e.charAt(0)==="'"&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e)}catch{}}else{for(var r=!1,u="",n=0,s=e.length;n<s;n++){var i=e.charAt(n);if(r)"\\;#".indexOf(i)!==-1?u+=i:u+="\\"+i,r=!1;else{if(";#".indexOf(i)!==-1)break;i==="\\"?r=!0:u+=i}}return r&&(u+="\\"),u.trim()}return e}});var hD=C((p3,pD)=>{"use strict";var Xn=1,fD=2;function Hh(){return""}function Kh(e,t,r){return e.slice(t,r).replace(/\S/g," ")}pD.exports=function(e,t){t=t||{};for(var r,u,n=!1,s=!1,i=0,o="",c=t.whitespace===!1?Hh:Kh,a=0;a<e.length;a++){if(r=e[a],u=e[a+1],!s&&r==='"'){var D=e[a-1]==="\\"&&e[a-2]!=="\\";D||(n=!n)}if(!n){if(!s&&r+u==="//")o+=e.slice(i,a),i=a,s=Xn,a++;else if(s===Xn&&r+u===`\r
28
- `){a++,s=!1,o+=c(e,i,a),i=a;continue}else if(s===Xn&&r===`
29
- `)s=!1,o+=c(e,i,a),i=a;else if(!s&&r+u==="/*"){o+=e.slice(i,a),i=a,s=fD,a++;continue}else if(s===fD&&r+u==="*/"){a++,s=!1,o+=c(e,i,a+1),i=a+1;continue}}}return o+(s?c(e.substr(i)):e.substr(i))}});var mD=C(qt=>{"use strict";var dD=require("fs"),Yh=zn(),pr=require("path"),Jh=hD(),zh=qt.parse=function(e){return/^\s*{/.test(e)?JSON.parse(Jh(e)):Yh.parse(e)},Xh=qt.file=function(){var e=[].slice.call(arguments).filter(function(n){return n!=null});for(var t in e)if(typeof e[t]!="string")return;var r=pr.join.apply(null,e),u;try{return dD.readFileSync(r,"utf-8")}catch{return}},h3=qt.json=function(){var e=Xh.apply(null,arguments);return e?zh(e):null},d3=qt.env=function(e,t){t=t||process.env;var r={},u=e.length;for(var n in t)if(n.toLowerCase().indexOf(e.toLowerCase())===0){for(var s=n.substring(u).split("__"),i;(i=s.indexOf(""))>-1;)s.splice(i,1);var o=r;s.forEach(function(a,D){!a||typeof o!="object"||(D===s.length-1&&(o[a]=t[n]),o[a]===void 0&&(o[a]={}),o=o[a])})}return r},m3=qt.find=function(){var e=pr.join.apply(null,[].slice.call(arguments));function t(r,u){var n=pr.join(r,u);try{return dD.statSync(n),n}catch{if(pr.dirname(r)!==r)return t(pr.dirname(r),u)}}return t(process.cwd(),e)}});var AD=C((E3,yD)=>{"use strict";function ED(e){return e instanceof Buffer||e instanceof Date||e instanceof RegExp}function gD(e){if(e instanceof Buffer){var t=Buffer.alloc?Buffer.alloc(e.length):new Buffer(e.length);return e.copy(t),t}else{if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}}function CD(e){var t=[];return e.forEach(function(r,u){typeof r=="object"&&r!==null?Array.isArray(r)?t[u]=CD(r):ED(r)?t[u]=gD(r):t[u]=Zn({},r):t[u]=r}),t}function FD(e,t){return t==="__proto__"?void 0:e[t]}var Zn=yD.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var e=arguments[0],t=Array.prototype.slice.call(arguments,1),r,u,n;return t.forEach(function(s){typeof s!="object"||s===null||Array.isArray(s)||Object.keys(s).forEach(function(i){if(u=FD(e,i),r=FD(s,i),r!==e)if(typeof r!="object"||r===null){e[i]=r;return}else if(Array.isArray(r)){e[i]=CD(r);return}else if(ED(r)){e[i]=gD(r);return}else if(typeof u!="object"||u===null||Array.isArray(u)){e[i]=Zn({},r);return}else{e[i]=Zn(u,r);return}})}),e}});var vD=C((g3,BD)=>{"use strict";function Zh(e,t){var r=e;t.slice(0,-1).forEach(function(n){r=r[n]||{}});var u=t[t.length-1];return u in r}function bD(e){return typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function wD(e,t){return t==="constructor"&&typeof e[t]=="function"||t==="__proto__"}BD.exports=function(e,t){t||(t={});var r={bools:{},strings:{},unknownFn:null};typeof t.unknown=="function"&&(r.unknownFn=t.unknown),typeof t.boolean=="boolean"&&t.boolean?r.allBools=!0:[].concat(t.boolean).filter(Boolean).forEach(function(w){r.bools[w]=!0});var u={};function n(w){return u[w].some(function(V){return r.bools[V]})}Object.keys(t.alias||{}).forEach(function(w){u[w]=[].concat(t.alias[w]),u[w].forEach(function(V){u[V]=[w].concat(u[w].filter(function(L){return V!==L}))})}),[].concat(t.string).filter(Boolean).forEach(function(w){r.strings[w]=!0,u[w]&&[].concat(u[w]).forEach(function(V){r.strings[V]=!0})});var s=t.default||{},i={_:[]};function o(w,V){return r.allBools&&/^--[^=]+$/.test(V)||r.strings[w]||r.bools[w]||u[w]}function c(w,V,L){for(var N=w,Z=0;Z<V.length-1;Z++){var E=V[Z];if(wD(N,E))return;N[E]===void 0&&(N[E]={}),(N[E]===Object.prototype||N[E]===Number.prototype||N[E]===String.prototype)&&(N[E]={}),N[E]===Array.prototype&&(N[E]=[]),N=N[E]}var y=V[V.length-1];wD(N,y)||((N===Object.prototype||N===Number.prototype||N===String.prototype)&&(N={}),N===Array.prototype&&(N=[]),N[y]===void 0||r.bools[y]||typeof N[y]=="boolean"?N[y]=L:Array.isArray(N[y])?N[y].push(L):N[y]=[N[y],L])}function a(w,V,L){if(!(L&&r.unknownFn&&!o(w,L)&&r.unknownFn(L)===!1)){var N=!r.strings[w]&&bD(V)?Number(V):V;c(i,w.split("."),N),(u[w]||[]).forEach(function(Z){c(i,Z.split("."),N)})}}Object.keys(r.bools).forEach(function(w){a(w,s[w]===void 0?!1:s[w])});var D=[];e.indexOf("--")!==-1&&(D=e.slice(e.indexOf("--")+1),e=e.slice(0,e.indexOf("--")));for(var l=0;l<e.length;l++){var p=e[l],f,h;if(/^--.+=/.test(p)){var m=p.match(/^--([^=]+)=([\s\S]*)$/);f=m[1];var F=m[2];r.bools[f]&&(F=F!=="false"),a(f,F,p)}else if(/^--no-.+/.test(p))f=p.match(/^--no-(.+)/)[1],a(f,!1,p);else if(/^--.+/.test(p))f=p.match(/^--(.+)/)[1],h=e[l+1],h!==void 0&&!/^(-|--)[^-]/.test(h)&&!r.bools[f]&&!r.allBools&&(!u[f]||!n(f))?(a(f,h,p),l+=1):/^(true|false)$/.test(h)?(a(f,h==="true",p),l+=1):a(f,r.strings[f]?"":!0,p);else if(/^-[^-]+/.test(p)){for(var g=p.slice(1,-1).split(""),$=!1,v=0;v<g.length;v++){if(h=p.slice(v+2),h==="-"){a(g[v],h,p);continue}if(/[A-Za-z]/.test(g[v])&&h[0]==="="){a(g[v],h.slice(1),p),$=!0;break}if(/[A-Za-z]/.test(g[v])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(h)){a(g[v],h,p),$=!0;break}if(g[v+1]&&g[v+1].match(/\W/)){a(g[v],p.slice(v+2),p),$=!0;break}else a(g[v],r.strings[g[v]]?"":!0,p)}f=p.slice(-1)[0],!$&&f!=="-"&&(e[l+1]&&!/^(-|--)[^-]/.test(e[l+1])&&!r.bools[f]&&(!u[f]||!n(f))?(a(f,e[l+1],p),l+=1):e[l+1]&&/^(true|false)$/.test(e[l+1])?(a(f,e[l+1]==="true",p),l+=1):a(f,r.strings[f]?"":!0,p))}else if((!r.unknownFn||r.unknownFn(p)!==!1)&&i._.push(r.strings._||!bD(p)?p:Number(p)),t.stopEarly){i._.push.apply(i._,e.slice(l+1));break}}return Object.keys(s).forEach(function(w){Zh(i,w.split("."))||(c(i,w.split("."),s[w]),(u[w]||[]).forEach(function(V){c(i,V.split("."),s[w])}))}),t["--"]?i["--"]=D.slice():D.forEach(function(w){i._.push(w)}),i}});var $D=C((C3,_D)=>{var hr=mD(),Mt=require("path").join,Qh=AD(),xD="/etc",SD=process.platform==="win32",dr=SD?process.env.USERPROFILE:process.env.HOME;_D.exports=function(e,t,r,u){if(typeof e!="string")throw new Error("rc(name): name *must* be string");r||(r=vD()(process.argv.slice(2))),t=(typeof t=="string"?hr.json(t):t)||{},u=u||hr.parse;var n=hr.env(e+"_"),s=[t],i=[];function o(c){if(!(i.indexOf(c)>=0)){var a=hr.file(c);a&&(s.push(u(a)),i.push(c))}}return SD||[Mt(xD,e,"config"),Mt(xD,e+"rc")].forEach(o),dr&&[Mt(dr,".config",e,"config"),Mt(dr,".config",e),Mt(dr,"."+e,"config"),Mt(dr,"."+e+"rc")].forEach(o),o(hr.find("."+e+"rc")),n.config&&o(n.config),r.config&&o(r.config),Qh.apply(null,s.concat([n,r,i.length?{configs:i,config:i[i.length-1]}:void 0]))}});var ID=C((A3,RD)=>{var rt=require("constants"),e0=process.cwd,au=null,t0=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return au||(au=e0.call(process)),au};try{process.cwd()}catch{}typeof process.chdir=="function"&&(ei=process.chdir,process.chdir=function(e){au=null,ei.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,ei));var ei;RD.exports=r0;function r0(e){rt.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=u(e.chmod),e.fchmod=u(e.fchmod),e.lchmod=u(e.lchmod),e.chownSync=i(e.chownSync),e.fchownSync=i(e.fchownSync),e.lchownSync=i(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=c(e.statSync),e.fstatSync=c(e.fstatSync),e.lstatSync=c(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(D,l,p){p&&process.nextTick(p)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(D,l,p,f){f&&process.nextTick(f)},e.lchownSync=function(){}),t0==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:(function(D){function l(p,f,h){var m=Date.now(),F=0;D(p,f,function g($){if($&&($.code==="EACCES"||$.code==="EPERM")&&Date.now()-m<6e4){setTimeout(function(){e.stat(f,function(v,w){v&&v.code==="ENOENT"?D(p,f,g):h($)})},F),F<100&&(F+=10);return}h&&h($)})}return Object.setPrototypeOf&&Object.setPrototypeOf(l,D),l})(e.rename)),e.read=typeof e.read!="function"?e.read:(function(D){function l(p,f,h,m,F,g){var $;if(g&&typeof g=="function"){var v=0;$=function(w,V,L){if(w&&w.code==="EAGAIN"&&v<10)return v++,D.call(e,p,f,h,m,F,$);g.apply(this,arguments)}}return D.call(e,p,f,h,m,F,$)}return Object.setPrototypeOf&&Object.setPrototypeOf(l,D),l})(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:(function(D){return function(l,p,f,h,m){for(var F=0;;)try{return D.call(e,l,p,f,h,m)}catch(g){if(g.code==="EAGAIN"&&F<10){F++;continue}throw g}}})(e.readSync);function t(D){D.lchmod=function(l,p,f){D.open(l,rt.O_WRONLY|rt.O_SYMLINK,p,function(h,m){if(h){f&&f(h);return}D.fchmod(m,p,function(F){D.close(m,function(g){f&&f(F||g)})})})},D.lchmodSync=function(l,p){var f=D.openSync(l,rt.O_WRONLY|rt.O_SYMLINK,p),h=!0,m;try{m=D.fchmodSync(f,p),h=!1}finally{if(h)try{D.closeSync(f)}catch{}else D.closeSync(f)}return m}}function r(D){rt.hasOwnProperty("O_SYMLINK")&&D.futimes?(D.lutimes=function(l,p,f,h){D.open(l,rt.O_SYMLINK,function(m,F){if(m){h&&h(m);return}D.futimes(F,p,f,function(g){D.close(F,function($){h&&h(g||$)})})})},D.lutimesSync=function(l,p,f){var h=D.openSync(l,rt.O_SYMLINK),m,F=!0;try{m=D.futimesSync(h,p,f),F=!1}finally{if(F)try{D.closeSync(h)}catch{}else D.closeSync(h)}return m}):D.futimes&&(D.lutimes=function(l,p,f,h){h&&process.nextTick(h)},D.lutimesSync=function(){})}function u(D){return D&&function(l,p,f){return D.call(e,l,p,function(h){a(h)&&(h=null),f&&f.apply(this,arguments)})}}function n(D){return D&&function(l,p){try{return D.call(e,l,p)}catch(f){if(!a(f))throw f}}}function s(D){return D&&function(l,p,f,h){return D.call(e,l,p,f,function(m){a(m)&&(m=null),h&&h.apply(this,arguments)})}}function i(D){return D&&function(l,p,f){try{return D.call(e,l,p,f)}catch(h){if(!a(h))throw h}}}function o(D){return D&&function(l,p,f){typeof p=="function"&&(f=p,p=null);function h(m,F){F&&(F.uid<0&&(F.uid+=4294967296),F.gid<0&&(F.gid+=4294967296)),f&&f.apply(this,arguments)}return p?D.call(e,l,p,h):D.call(e,l,h)}}function c(D){return D&&function(l,p){var f=p?D.call(e,l,p):D.call(e,l);return f&&(f.uid<0&&(f.uid+=4294967296),f.gid<0&&(f.gid+=4294967296)),f}}function a(D){if(!D||D.code==="ENOSYS")return!0;var l=!process.getuid||process.getuid()!==0;return!!(l&&(D.code==="EINVAL"||D.code==="EPERM"))}}});var PD=C((b3,ND)=>{var TD=require("stream").Stream;ND.exports=u0;function u0(e){return{ReadStream:t,WriteStream:r};function t(u,n){if(!(this instanceof t))return new t(u,n);TD.call(this);var s=this;this.path=u,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,n=n||{};for(var i=Object.keys(n),o=0,c=i.length;o<c;o++){var a=i[o];this[a]=n[a]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}e.open(this.path,this.flags,this.mode,function(D,l){if(D){s.emit("error",D),s.readable=!1;return}s.fd=l,s.emit("open",l),s._read()})}function r(u,n){if(!(this instanceof r))return new r(u,n);TD.call(this),this.path=u,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var s=Object.keys(n),i=0,o=s.length;i<o;i++){var c=s[i];this[c]=n[c]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var jD=C((w3,LD)=>{"use strict";LD.exports=i0;var n0=Object.getPrototypeOf||function(e){return e.__proto__};function i0(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:n0(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}});var UD=C((B3,ui)=>{var X=require("fs"),s0=ID(),o0=PD(),D0=jD(),cu=require("util"),De,fu;typeof Symbol=="function"&&typeof Symbol.for=="function"?(De=Symbol.for("graceful-fs.queue"),fu=Symbol.for("graceful-fs.previous")):(De="___graceful-fs.queue",fu="___graceful-fs.previous");function a0(){}function MD(e,t){Object.defineProperty(e,De,{get:function(){return t}})}var mt=a0;cu.debuglog?mt=cu.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(mt=function(){var e=cu.format.apply(cu,arguments);e="GFS4: "+e.split(/\n/).join(`
30
- GFS4: `),console.error(e)});X[De]||(kD=global[De]||[],MD(X,kD),X.close=(function(e){function t(r,u){return e.call(X,r,function(n){n||qD(),typeof u=="function"&&u.apply(this,arguments)})}return Object.defineProperty(t,fu,{value:e}),t})(X.close),X.closeSync=(function(e){function t(r){e.apply(X,arguments),qD()}return Object.defineProperty(t,fu,{value:e}),t})(X.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){mt(X[De]),require("assert").equal(X[De].length,0)}));var kD;global[De]||MD(global,X[De]);ui.exports=ti(D0(X));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!X.__patched&&(ui.exports=ti(X),X.__patched=!0);function ti(e){s0(e),e.gracefulify=ti,e.createReadStream=V,e.createWriteStream=L;var t=e.readFile;e.readFile=r;function r(E,y,B){return typeof y=="function"&&(B=y,y=null),k(E,y,B);function k(q,j,O,R){return t(q,j,function(S){S&&(S.code==="EMFILE"||S.code==="ENFILE")?Ut([k,[q,j,O],S,R||Date.now(),Date.now()]):typeof O=="function"&&O.apply(this,arguments)})}}var u=e.writeFile;e.writeFile=n;function n(E,y,B,k){return typeof B=="function"&&(k=B,B=null),q(E,y,B,k);function q(j,O,R,S,M){return u(j,O,R,function(_){_&&(_.code==="EMFILE"||_.code==="ENFILE")?Ut([q,[j,O,R,S],_,M||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=i);function i(E,y,B,k){return typeof B=="function"&&(k=B,B=null),q(E,y,B,k);function q(j,O,R,S,M){return s(j,O,R,function(_){_&&(_.code==="EMFILE"||_.code==="ENFILE")?Ut([q,[j,O,R,S],_,M||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}var o=e.copyFile;o&&(e.copyFile=c);function c(E,y,B,k){return typeof B=="function"&&(k=B,B=0),q(E,y,B,k);function q(j,O,R,S,M){return o(j,O,R,function(_){_&&(_.code==="EMFILE"||_.code==="ENFILE")?Ut([q,[j,O,R,S],_,M||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}var a=e.readdir;e.readdir=l;var D=/^v[0-5]\./;function l(E,y,B){typeof y=="function"&&(B=y,y=null);var k=D.test(process.version)?function(O,R,S,M){return a(O,q(O,R,S,M))}:function(O,R,S,M){return a(O,R,q(O,R,S,M))};return k(E,y,B);function q(j,O,R,S){return function(M,_){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Ut([k,[j,O,R],M,S||Date.now(),Date.now()]):(_&&_.sort&&_.sort(),typeof R=="function"&&R.call(this,M,_))}}}if(process.version.substr(0,4)==="v0.8"){var p=o0(e);g=p.ReadStream,v=p.WriteStream}var f=e.ReadStream;f&&(g.prototype=Object.create(f.prototype),g.prototype.open=$);var h=e.WriteStream;h&&(v.prototype=Object.create(h.prototype),v.prototype.open=w),Object.defineProperty(e,"ReadStream",{get:function(){return g},set:function(E){g=E},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return v},set:function(E){v=E},enumerable:!0,configurable:!0});var m=g;Object.defineProperty(e,"FileReadStream",{get:function(){return m},set:function(E){m=E},enumerable:!0,configurable:!0});var F=v;Object.defineProperty(e,"FileWriteStream",{get:function(){return F},set:function(E){F=E},enumerable:!0,configurable:!0});function g(E,y){return this instanceof g?(f.apply(this,arguments),this):g.apply(Object.create(g.prototype),arguments)}function $(){var E=this;Z(E.path,E.flags,E.mode,function(y,B){y?(E.autoClose&&E.destroy(),E.emit("error",y)):(E.fd=B,E.emit("open",B),E.read())})}function v(E,y){return this instanceof v?(h.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}function w(){var E=this;Z(E.path,E.flags,E.mode,function(y,B){y?(E.destroy(),E.emit("error",y)):(E.fd=B,E.emit("open",B))})}function V(E,y){return new e.ReadStream(E,y)}function L(E,y){return new e.WriteStream(E,y)}var N=e.open;e.open=Z;function Z(E,y,B,k){return typeof B=="function"&&(k=B,B=null),q(E,y,B,k);function q(j,O,R,S,M){return N(j,O,R,function(_,Dp){_&&(_.code==="EMFILE"||_.code==="ENFILE")?Ut([q,[j,O,R,S],_,M||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}return e}function Ut(e){mt("ENQUEUE",e[0].name,e[1]),X[De].push(e),ri()}var lu;function qD(){for(var e=Date.now(),t=0;t<X[De].length;++t)X[De][t].length>2&&(X[De][t][3]=e,X[De][t][4]=e);ri()}function ri(){if(clearTimeout(lu),lu=void 0,X[De].length!==0){var e=X[De].shift(),t=e[0],r=e[1],u=e[2],n=e[3],s=e[4];if(n===void 0)mt("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-n>=6e4){mt("TIMEOUT",t.name,r);var i=r.pop();typeof i=="function"&&i.call(null,u)}else{var o=Date.now()-s,c=Math.max(s-n,1),a=Math.min(c*1.2,100);o>=a?(mt("RETRY",t.name,r),t.apply(null,r.concat([n]))):X[De].push(e)}lu===void 0&&(lu=setTimeout(ri,0))}}});var VD=C(Vt=>{"use strict";var c0=Vt&&Vt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.readCAFileSync=void 0;var l0=c0(UD());function f0(e){try{let t=l0.default.readFileSync(e,"utf8"),r="-----END CERTIFICATE-----";return t.split(r).filter(n=>!!n.trim()).map(n=>`${n.trimLeft()}${r}`)}catch(t){if(t.code==="ENOENT")return;throw t}}Vt.readCAFileSync=f0});var GD=C(Ft=>{"use strict";var p0=Ft&&Ft.__createBinding||(Object.create?(function(e,t,r,u){u===void 0&&(u=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,u,n)}):(function(e,t,r,u){u===void 0&&(u=r),e[u]=t[r]})),h0=Ft&&Ft.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&p0(t,e,r)};Object.defineProperty(Ft,"__esModule",{value:!0});h0(VD(),Ft)});var KD=C((S3,HD)=>{HD.exports=WD;function Et(e,t){if(typeof Object.setPrototypeOf=="function")return Object.setPrototypeOf(e,t);e.__proto__=t}function WD(){this.list=[];var e=null;Object.defineProperty(this,"root",{get:function(){return e},set:function(t){e=t,this.list.length&&Et(this.list[this.list.length-1],t)},enumerable:!0,configurable:!0})}WD.prototype={get length(){return this.list.length},get keys(){var e=[];for(var t in this.list[0])e.push(t);return e},get snapshot(){var e={};return this.keys.forEach(function(t){e[t]=this.get(t)},this),e},get store(){return this.list[0]},push:function(e){return typeof e!="object"&&(e={valueOf:e}),this.list.length>=1&&Et(this.list[this.list.length-1],e),Et(e,this.root),this.list.push(e)},pop:function(){return this.list.length>=2&&Et(this.list[this.list.length-2],this.root),this.list.pop()},unshift:function(e){return Et(e,this.list[0]||this.root),this.list.unshift(e)},shift:function(){return this.list.length===1&&Et(this.list[0],this.root),this.list.shift()},get:function(e){return this.list[0][e]},set:function(e,t,r){return this.length||this.push({}),r&&this.list[0].hasOwnProperty(e)&&this.push({}),this.list[0][e]=t},forEach:function(e,t){for(var r in this.list[0])e.call(t,r,this.list[0][r])},slice:function(){return this.list.slice.apply(this.list,arguments)},splice:function(){for(var e=this.list.splice.apply(this.list,arguments),t=0,r=this.list.length;t<r;t++)Et(this.list[t],this.list[t+1]||this.root);return e}}});var XD=C((Ve,zD)=>{var YD=KD(),mr=require("path"),pu=require("fs"),ni=zn(),ii=require("events").EventEmitter,d0=require("url"),m0=require("http"),Ve=zD.exports=function(){for(var e=[].slice.call(arguments),t=new le;e.length;){var r=e.shift();r&&t.push(typeof r=="string"?E0(r):r)}return t},_3=Ve.find=function(){var e=mr.join.apply(null,[].slice.call(arguments));function t(r,u){var n=mr.join(r,u);try{return pu.statSync(n),n}catch{if(mr.dirname(r)!==r)return t(mr.dirname(r),u)}}return t(__dirname,e)},F0=Ve.parse=function(e,t,r){if(e=""+e,r)if(r==="json")if(this.emit)try{return JSON.parse(e)}catch(u){this.emit("error",u)}else return JSON.parse(e);else return ni.parse(e);else try{return JSON.parse(e)}catch{return ni.parse(e)}},E0=Ve.json=function(){var e=[].slice.call(arguments).filter(function(u){return u!=null}),t=mr.join.apply(null,e),r;try{r=pu.readFileSync(t,"utf-8")}catch{return}return F0(r,t,"json")},$3=Ve.env=function(e,t){t=t||process.env;var r={},u=e.length;for(var n in t)n.indexOf(e)===0&&(r[n.substring(u)]=t[n]);return r};Ve.ConfigChain=le;function le(){ii.apply(this),YD.apply(this,arguments),this._awaiting=0,this._saving=0,this.sources={}}var JD={constructor:{value:le}};Object.keys(ii.prototype).forEach(function(e){JD[e]=Object.getOwnPropertyDescriptor(ii.prototype,e)});le.prototype=Object.create(YD.prototype,JD);le.prototype.del=function(e,t){if(t){var r=this.sources[t];if(r=r&&r.data,!r)return this.emit("error",new Error("not found "+t));delete r[e]}else for(var u=0,n=this.list.length;u<n;u++)delete this.list[u][e];return this};le.prototype.set=function(e,t,r){var u;if(r){if(u=this.sources[r],u=u&&u.data,!u)return this.emit("error",new Error("not found "+r))}else if(u=this.list[0],!u)return this.emit("error",new Error("cannot set, no confs!"));return u[e]=t,this};le.prototype.get=function(e,t){return t?(t=this.sources[t],t&&(t=t.data),t&&Object.hasOwnProperty.call(t,e)?t[e]:void 0):this.list[0][e]};le.prototype.save=function(e,s,r){typeof s=="function"&&(r=s,s=null);var u=this.sources[e];if(!u||!(u.path||u.source)||!u.data)return this.emit("error",new Error("bad save target: "+e));if(u.source){var n=u.prefix||"";return Object.keys(u.data).forEach(function(o){u.source[n+o]=u.data[o]}),this}var s=s||u.type,i=u.data;return u.type==="json"?i=JSON.stringify(i):i=ni.stringify(i),this._saving++,pu.writeFile(u.path,i,"utf8",function(o){if(this._saving--,o)return r?r(o):this.emit("error",o);this._saving===0&&(r&&r(),this.emit("save"))}.bind(this)),this};le.prototype.addFile=function(e,t,r){r=r||e;var u={__source__:r};return this.sources[r]={path:e,type:t},this.push(u),this._await(),pu.readFile(e,"utf8",function(n,s){n&&this.emit("error",n),this.addString(s,e,t,u)}.bind(this)),this};le.prototype.addEnv=function(e,t,r){r=r||"env";var u=Ve.env(e,t);return this.sources[r]={data:u,source:t,prefix:e},this.add(u,r)};le.prototype.addUrl=function(e,t,r){this._await();var u=d0.format(e);r=r||u;var n={__source__:r};return this.sources[r]={href:u,type:t},this.push(n),m0.request(e,function(s){var i=[],o=s.headers["content-type"];t||(t=o.indexOf("json")!==-1?"json":o.indexOf("ini")!==-1?"ini":u.match(/\.json$/)?"json":u.match(/\.ini$/)?"ini":null,n.type=t),s.on("data",i.push.bind(i)).on("end",function(){this.addString(Buffer.concat(i),u,t,n)}.bind(this)).on("error",this.emit.bind(this,"error"))}.bind(this)).on("error",this.emit.bind(this,"error")).end(),this};le.prototype.addString=function(e,t,r,u){return e=this.parse(e,t,r),this.add(e,u),this};le.prototype.add=function(e,t){if(t&&typeof t=="object"){var r=this.list.indexOf(t);if(r===-1)return this.emit("error",new Error("bad marker"));this.splice(r,1,e),t=t.__source__,this.sources[t]=this.sources[t]||{},this.sources[t].data=e,this._resolve()}else typeof t=="string"&&(this.sources[t]=this.sources[t]||{},this.sources[t].data=e),this._await(),this.push(e),process.nextTick(this._resolve.bind(this));return this};le.prototype.parse=Ve.parse;le.prototype._await=function(){this._awaiting++};le.prototype._resolve=function(){this._awaiting--,this._awaiting===0&&this.emit("load",this)}});var ea=C((O3,QD)=>{QD.exports=function(e){let t=e.indexOf(":");if(t===-1)return ZD(e);let r=e.substr(0,t),u=e.substr(t+1);return`${r}:${ZD(u)}`};function ZD(e){if(e=e.toLowerCase(),e==="_authtoken")return"_authToken";let t=e[0];for(let r=1;r<e.length;r++)t+=e[r]==="_"?"-":e[r];return t}});var ta=C(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.envReplace=void 0;var g0=/(?<!\\)(\\*)\$\{([^${}]+)\}/g;function C0(e,t){return e.replace(g0,y0.bind(null,t))}hu.envReplace=C0;function y0(e,t,r,u){if(r.length%2)return t.slice((r.length+1)/2);let n=b0(e,u);if(n===void 0)throw new Error(`Failed to replace env in config: ${t}`);return`${r.slice(r.length/2)}${n}`}var A0=/([^:-]+)(:?)-(.+)/;function b0(e,t){let r=t.match(A0);if(!r)return e[t];let[,u,n,s]=r;return Object.prototype.hasOwnProperty.call(e,u)?!e[u]&&n?s:e[u]:s}});var ra=C(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.envReplace=void 0;var w0=ta();Object.defineProperty(du,"envReplace",{enumerable:!0,get:function(){return w0.envReplace}})});var ua=C(Fr=>{"use strict";var B0=require("fs"),gt=require("path"),{envReplace:si}=ra(),v0=e=>typeof e!="string"?e:si(e,process.env),x0=(e,t,r)=>{if(typeof t!="string")return t;let u=[].concat(e[r]),n=u.indexOf(gt)!==-1,s=u.indexOf(Boolean)!==-1,i=u.indexOf(String)!==-1,o=u.indexOf(Number)!==-1;if(t=`${t}`.trim(),/^".*"$/.test(t))try{t=JSON.parse(t)}catch{throw new Error(`Failed parsing JSON config key ${r}: ${t}`)}if(s&&!i&&t==="")return!0;switch(t){case"true":return!0;case"false":return!1;case"null":return null;case"undefined":return}let c=si(t,process.env);if((r.endsWith(":tokenHelper")||r==="tokenHelper")&&c!==t)throw new Error(`It is not allowed to use environment variables in the value of the ${r} setting.`);return t=c,n&&((process.platform==="win32"?/^~(\/|\\)/:/^~\//).test(t)&&process.env.HOME&&(t=gt.resolve(process.env.HOME,t.substr(2))),t=gt.resolve(t)),o&&!isNaN(t)&&(t=Number(t)),t},S0=e=>{e=gt.resolve(e);let t=!1;for(;gt.basename(e)==="node_modules";)e=gt.dirname(e),t=!0;if(t)return e;let r=(u,n)=>{let s=/^[a-zA-Z]:(\\|\/)?$/;if(u==="/"||process.platform==="win32"&&s.test(u))return n;try{let i=B0.readdirSync(u);if(i.includes("node_modules")||i.includes("package.json")||i.includes("package.json5")||i.includes("package.yaml")||i.includes("pnpm-workspace.yaml"))return u;let o=gt.dirname(u);return o===u?n:r(o,n)}catch(i){if(u===n){if(i.code==="ENOENT")return n;throw i}return n}};return r(e,e)};Fr.envReplace=si;Fr.findPrefix=S0;Fr.parseField=x0;Fr.parseKey=v0});var sa=C(ia=>{"use strict";var Ct=require("path"),_0=require("stream").Stream,mu=require("url"),$0=()=>{},O0=()=>[],na=()=>{};ia.types={access:[null,"restricted","public"],"allow-same-version":Boolean,"always-auth":Boolean,also:[null,"dev","development"],audit:Boolean,"auth-type":["legacy","sso","saml","oauth"],"bin-links":Boolean,browser:[null,String],ca:[null,String,Array],cafile:Ct,cache:Ct,"cache-lock-stale":Number,"cache-lock-retries":Number,"cache-lock-wait":Number,"cache-max":Number,"cache-min":Number,cert:[null,String],cidr:[null,String,Array],color:["always",Boolean],depth:Number,description:Boolean,dev:Boolean,"dry-run":Boolean,editor:String,"engine-strict":Boolean,force:Boolean,"fetch-retries":Number,"fetch-retry-factor":Number,"fetch-retry-mintimeout":Number,"fetch-retry-maxtimeout":Number,git:String,"git-tag-version":Boolean,"commit-hooks":Boolean,global:Boolean,globalconfig:Ct,"global-style":Boolean,group:[Number,String],"https-proxy":[null,mu],"user-agent":String,"ham-it-up":Boolean,heading:String,"if-present":Boolean,"ignore-prepublish":Boolean,"ignore-scripts":Boolean,"init-module":Ct,"init-author-name":String,"init-author-email":String,"init-author-url":["",mu],"init-license":String,"init-version":na,json:Boolean,key:[null,String],"legacy-bundling":Boolean,link:Boolean,"local-address":O0(),loglevel:["silent","error","warn","notice","http","timing","info","verbose","silly"],logstream:_0,"logs-max":Number,long:Boolean,maxsockets:Number,message:String,"metrics-registry":[null,String],"node-options":[null,String],"node-version":[null,na],"no-proxy":[null,String,Array],offline:Boolean,"onload-script":[null,String],only:[null,"dev","development","prod","production"],optional:Boolean,"package-lock":Boolean,otp:[null,String],"package-lock-only":Boolean,parseable:Boolean,"prefer-offline":Boolean,"prefer-online":Boolean,prefix:Ct,production:Boolean,progress:Boolean,proxy:[null,!1,mu],provenance:Boolean,"read-only":Boolean,"rebuild-bundle":Boolean,registry:[null,mu],rollback:Boolean,save:Boolean,"save-bundle":Boolean,"save-dev":Boolean,"save-exact":Boolean,"save-optional":Boolean,"save-prefix":String,"save-prod":Boolean,scope:String,"script-shell":[null,String],"scripts-prepend-node-path":[!1,!0,"auto","warn-only"],searchopts:String,searchexclude:[null,String],searchlimit:Number,searchstaleness:Number,"send-metrics":Boolean,shell:String,shrinkwrap:Boolean,"sign-git-tag":Boolean,"sso-poll-frequency":Number,"sso-type":[null,"oauth","saml"],"strict-ssl":Boolean,tag:String,timing:Boolean,tmp:Ct,unicode:Boolean,"unsafe-perm":Boolean,usage:Boolean,user:[Number,String],userconfig:Ct,umask:$0,version:Boolean,"tag-version-prefix":String,versions:Boolean,viewer:String,_exit:Boolean}});var aa=C((P3,Da)=>{"use strict";var{readCAFileSync:R0}=GD(),oa=require("fs"),oi=require("path"),{ConfigChain:I0}=XD(),T0=ea(),Di=ua(),ai=class extends I0{constructor(t,r){super(t),this.root=t,this._parseField=Di.parseField.bind(null,r||sa())}add(t,r){try{for(let[u,n]of Object.entries(t)){let s=Di.parseKey(u);s!==u&&delete t[u],t[s]=this._parseField(n,s)}}catch(u){throw u}return super.add(t,r)}addFile(t,r){r=r||t;let u={__source__:r};this.sources[r]={path:t,type:"ini"},this.push(u),this._await();try{let n=oa.readFileSync(t,"utf8");this.addString(n,t,"ini",u)}catch(n){if(n.code==="ENOENT")this.add({},u);else if(n.code!=="EISDIR")return`Issue while reading "${t}". ${n.message}`}}addEnv(t){t=t||process.env;let r={};return Object.keys(t).filter(u=>/^npm_config_/i.test(u)).forEach(u=>{if(!t[u])return;let n=T0(u.substr(11)),s=t[u];r[n]=N0(n,s)}),super.addEnv("",r,"env")}loadPrefix(){let t=this.list[0];Object.defineProperty(this,"prefix",{enumerable:!0,set:u=>{let n=this.get("global");this[n?"globalPrefix":"localPrefix"]=u},get:()=>this.get("global")?this.globalPrefix:this.localPrefix}),Object.defineProperty(this,"globalPrefix",{enumerable:!0,set:u=>{this.set("prefix",u)},get:()=>oi.resolve(this.get("prefix"))});let r;if(Object.defineProperty(this,"localPrefix",{enumerable:!0,set:u=>{r=u},get:()=>r}),Object.prototype.hasOwnProperty.call(t,"prefix"))r=oi.resolve(t.prefix);else try{r=Di.findPrefix(process.cwd())}catch(u){throw u}return r}loadCAFile(t){if(!t)return;let r=R0(t);r&&this.set("ca",r)}loadUser(){let t=this.root;if(this.get("global"))return;if(process.env.SUDO_UID){t.user=Number(process.env.SUDO_UID);return}let r=oi.resolve(this.get("prefix"));try{let u=oa.statSync(r);t.user=u.uid}catch(u){if(u.code==="ENOENT")return;throw u}}};function N0(e,t){function r(u){return u.indexOf(`
31
-
32
- `)?u.split(`
33
-
34
- `):u.split(",")}switch(e){case"hoist-pattern":case"public-hoist-pattern":return r(t)}return t}Da.exports=ai});var da=C(ha=>{"use strict";var fa=require("os"),Ge=require("path"),pa=fa.tmpdir(),P0=process.getuid?process.getuid():process.pid,L0=()=>!0,ca=process.platform==="win32",la={editor:()=>process.env.EDITOR||process.env.VISUAL||(ca?"notepad.exe":"vi"),shell:()=>ca?process.env.COMSPEC||"cmd.exe":process.env.SHELL||"/bin/bash"},j0={fromString:()=>process.umask()},Gt=fa.homedir();Gt?process.env.HOME=Gt:Gt=Ge.resolve(pa,"npm-"+P0);var k0=process.platform==="win32"?"npm-cache":".npm",q0=process.platform==="win32"&&process.env.APPDATA||Gt,M0=Ge.resolve(q0,k0),Fu,yt;Object.defineProperty(ha,"defaults",{get:function(){return Fu||(process.env.PREFIX?yt=process.env.PREFIX:process.platform==="win32"?yt=Ge.dirname(process.execPath):(yt=Ge.dirname(Ge.dirname(process.execPath)),process.env.DESTDIR&&(yt=Ge.join(process.env.DESTDIR,yt))),Fu={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":"legacy","bin-links":!0,browser:null,ca:null,cafile:null,cache:M0,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:la.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:"git","git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:Ge.resolve(yt,"etc","npmrc"),"global-style":!1,group:process.platform==="win32"?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:"npm","if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":Ge.resolve(Gt,".npm-init.js"),"init-author-name":"","init-author-email":"","init-author-url":"","init-version":"1.0.0","init-license":"ISC",json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:"notice",logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:"%s","metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:yt,production:!1,progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":"npm/{npm-version} node/{node-version} {platform} {arch}","read-only":!1,"rebuild-bundle":!0,registry:"https://registry.npmjs.org/",rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":"^","save-prod":!1,scope:"","script-shell":null,"scripts-prepend-node-path":"warn-only",searchopts:"",searchexclude:null,searchlimit:20,searchstaleness:900,"send-metrics":!1,shell:la.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":"oauth","strict-ssl":!0,tag:"latest","tag-version-prefix":"v",timing:!1,tmp:pa,unicode:L0(),"unsafe-perm":process.platform==="win32"||process.platform==="cygwin"||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform==="win32"?0:"nobody",userconfig:Ge.resolve(Gt,".npmrc"),umask:process.umask?process.umask():j0.fromString("022"),version:!1,versions:!1,viewer:process.platform==="win32"?"browser":"man",_exit:!0},Fu)}})});var Fa=C((j3,ci)=>{"use strict";var At=require("path"),U0=aa(),ma=da();ci.exports=(e,t,r)=>{let u=new U0(Object.assign({},ma.defaults,r),t);u.add(Object.assign({},e),"cli");let n=[],s=!1;if(require.resolve.paths){let a=require.resolve.paths("npm"),D;try{D=require.resolve("npm",{paths:a.slice(-1)})}catch{s=!0}D&&n.push(u.addFile(At.resolve(At.dirname(D),"..","npmrc"),"builtin"))}u.addEnv(),u.loadPrefix();let i=At.resolve(u.localPrefix,".npmrc"),o=u.get("userconfig");if(!u.get("global")&&i!==o?n.push(u.addFile(i,"project")):u.add({},"project"),u.get("workspace-prefix")&&u.get("workspace-prefix")!==i){let a=At.resolve(u.get("workspace-prefix"),".npmrc");n.push(u.addFile(a,"workspace"))}if(n.push(u.addFile(u.get("userconfig"),"user")),u.get("prefix")){let a=At.resolve(u.get("prefix"),"etc");u.root.globalconfig=At.resolve(a,"npmrc"),u.root.globalignorefile=At.resolve(a,"npmignore")}n.push(u.addFile(u.get("globalconfig"),"global")),u.loadUser();let c=u.get("cafile");return c&&u.loadCAFile(c),{config:u,warnings:n.filter(Boolean),failedToLoadBuiltInConfig:s}};Object.defineProperty(ci.exports,"defaults",{get(){return ma.defaults},enumerable:!0})});var Ba=C((k3,wa)=>{var Ea=Fa(),ga=":_authToken",Ca=":_auth",ya=":username",Aa=":_password";wa.exports=function(){let t,r;arguments.length>=2?(t=arguments[0],r=Object.assign({},arguments[1])):typeof arguments[0]=="string"?t=arguments[0]:r=Object.assign({},arguments[0]),r=r||{};let u=r.npmrc;return r.npmrc=(r.npmrc?{config:{get:n=>u[n]}}:Ea()).config,t=t||r.npmrc.get("registry")||Ea.defaults.registry,ba(t,r)||G0(r.npmrc)};function V0(e,t){let r=new URL(t,new URL(e.startsWith("//")?`./${e}`:e,"resolve://"));if(r.protocol==="resolve:"){let{pathname:u,search:n,hash:s}=r;return u+n+s}return r.toString()}function ba(e,t){let r=e instanceof URL?e:new URL(e.startsWith("//")?`http:${e}`:e),u;for(;u!=="/"&&r.pathname!==u;){u=r.pathname||"/";let n="//"+r.host+u.replace(/\/$/,""),s=H0(n,t.npmrc);if(s)return s;if(!t.recursive)return/\/$/.test(e)?void 0:ba(new URL("./",r),t);r.pathname=V0(W0(u),"..")||"/"}}function G0(e){return e.get("_auth")?{token:Eu(e.get("_auth")),type:"Basic"}:void 0}function W0(e){return e[e.length-1]==="/"?e:e+"/"}function H0(e,t){let r=K0(t.get(e+ga)||t.get(e+"/"+ga));if(r)return r;let u=t.get(e+ya)||t.get(e+"/"+ya),n=t.get(e+Aa)||t.get(e+"/"+Aa),s=Y0(u,n);if(s)return s;let i=J0(t.get(e+Ca)||t.get(e+"/"+Ca));if(i)return i}function Eu(e){return e.replace(/^\$\{?([^}]*)\}?$/,function(t,r){return process.env[r]})}function K0(e){return e?{token:Eu(e),type:"Bearer"}:void 0}function Y0(e,t){if(!e||!t)return;let r=Buffer.from(Eu(t),"base64").toString("utf8");return{token:Buffer.from(e+":"+r,"utf8").toString("base64"),type:"Basic",password:r,username:e}}function J0(e){return e?{token:Eu(e),type:"Basic"}:void 0}});var xa=C((q3,va)=>{"use strict";var z0=ft(),X0=(e,t)=>{let r=z0(e,t);return r?r.version:null};va.exports=X0});var _a=C((M3,Sa)=>{"use strict";var Z0=ft(),Q0=(e,t)=>{let r=Z0(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};Sa.exports=Q0});var Ra=C((U3,Oa)=>{"use strict";var $a=ce(),ed=(e,t,r,u,n)=>{typeof r=="string"&&(n=u,u=r,r=void 0);try{return new $a(e instanceof $a?e.version:e,r).inc(t,u,n).version}catch{return null}};Oa.exports=ed});var Ta=C((V3,Ia)=>{"use strict";var td=ce(),rd=(e,t)=>new td(e,t).major;Ia.exports=rd});var Pa=C((G3,Na)=>{"use strict";var ud=ce(),nd=(e,t)=>new ud(e,t).minor;Na.exports=nd});var ja=C((W3,La)=>{"use strict";var id=ce(),sd=(e,t)=>new id(e,t).patch;La.exports=sd});var qa=C((H3,ka)=>{"use strict";var od=ft(),Dd=(e,t)=>{let r=od(e,t);return r&&r.prerelease.length?r.prerelease:null};ka.exports=Dd});var Ua=C((K3,Ma)=>{"use strict";var ad=we(),cd=(e,t,r)=>ad(t,e,r);Ma.exports=cd});var Ga=C((Y3,Va)=>{"use strict";var ld=we(),fd=(e,t)=>ld(e,t,!0);Va.exports=fd});var gu=C((J3,Ha)=>{"use strict";var Wa=ce(),pd=(e,t,r)=>{let u=new Wa(e,r),n=new Wa(t,r);return u.compare(n)||u.compareBuild(n)};Ha.exports=pd});var Ya=C((z3,Ka)=>{"use strict";var hd=gu(),dd=(e,t)=>e.sort((r,u)=>hd(r,u,t));Ka.exports=dd});var za=C((X3,Ja)=>{"use strict";var md=gu(),Fd=(e,t)=>e.sort((r,u)=>md(u,r,t));Ja.exports=Fd});var Cu=C((Z3,Xa)=>{"use strict";var Ed=we(),gd=(e,t,r)=>Ed(e,t,r)<0;Xa.exports=gd});var li=C((Q3,Za)=>{"use strict";var Cd=we(),yd=(e,t,r)=>Cd(e,t,r)===0;Za.exports=yd});var fi=C((e8,Qa)=>{"use strict";var Ad=we(),bd=(e,t,r)=>Ad(e,t,r)!==0;Qa.exports=bd});var yu=C((t8,ec)=>{"use strict";var wd=we(),Bd=(e,t,r)=>wd(e,t,r)>=0;ec.exports=Bd});var Au=C((r8,tc)=>{"use strict";var vd=we(),xd=(e,t,r)=>vd(e,t,r)<=0;tc.exports=xd});var pi=C((u8,rc)=>{"use strict";var Sd=li(),_d=fi(),$d=Pt(),Od=yu(),Rd=Cu(),Id=Au(),Td=(e,t,r,u)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return Sd(e,r,u);case"!=":return _d(e,r,u);case">":return $d(e,r,u);case">=":return Od(e,r,u);case"<":return Rd(e,r,u);case"<=":return Id(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}};rc.exports=Td});var nc=C((n8,uc)=>{"use strict";var Nd=ce(),Pd=ft(),{safeRe:bu,t:wu}=Nt(),Ld=(e,t)=>{if(e instanceof Nd)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?bu[wu.COERCEFULL]:bu[wu.COERCE]);else{let c=t.includePrerelease?bu[wu.COERCERTLFULL]:bu[wu.COERCERTL],a;for(;(a=c.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||a.index+a[0].length!==r.index+r[0].length)&&(r=a),c.lastIndex=a.index+a[1].length+a[2].length;c.lastIndex=-1}if(r===null)return null;let u=r[2],n=r[3]||"0",s=r[4]||"0",i=t.includePrerelease&&r[5]?`-${r[5]}`:"",o=t.includePrerelease&&r[6]?`+${r[6]}`:"";return Pd(`${u}.${n}.${s}${i}${o}`,t)};uc.exports=Ld});var sc=C((i8,ic)=>{"use strict";var hi=class{constructor(){this.max=1e3,this.map=new Map}get(t){let r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(t,r)}return this}};ic.exports=hi});var Be=C((s8,cc)=>{"use strict";var jd=/\s+/g,di=class e{constructor(t,r){if(r=qd(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof mi)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(jd," "),this.set=this.raw.split("||").map(u=>this.parseRange(u.trim())).filter(u=>u.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let u=this.set[0];if(this.set=this.set.filter(n=>!Dc(n[0])),this.set.length===0)this.set=[u];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&Kd(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let r=this.set[t];for(let u=0;u<r.length;u++)u>0&&(this.formatted+=" "),this.formatted+=r[u].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){let u=((this.options.includePrerelease&&Wd)|(this.options.loose&&Hd))+":"+t,n=oc.get(u);if(n)return n;let s=this.options.loose,i=s?de[fe.HYPHENRANGELOOSE]:de[fe.HYPHENRANGE];t=t.replace(i,um(this.options.includePrerelease)),W("hyphen replace",t),t=t.replace(de[fe.COMPARATORTRIM],Ud),W("comparator trim",t),t=t.replace(de[fe.TILDETRIM],Vd),W("tilde trim",t),t=t.replace(de[fe.CARETTRIM],Gd),W("caret trim",t);let o=t.split(" ").map(l=>Yd(l,this.options)).join(" ").split(/\s+/).map(l=>rm(l,this.options));s&&(o=o.filter(l=>(W("loose invalid filter",l,this.options),!!l.match(de[fe.COMPARATORLOOSE])))),W("range list",o);let c=new Map,a=o.map(l=>new mi(l,this.options));for(let l of a){if(Dc(l))return[l];c.set(l.value,l)}c.size>1&&c.has("")&&c.delete("");let D=[...c.values()];return oc.set(u,D),D}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(u=>ac(u,r)&&t.set.some(n=>ac(n,r)&&u.every(s=>n.every(i=>s.intersects(i,r)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new Md(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(nm(this.set[r],t,this.options))return!0;return!1}};cc.exports=di;var kd=sc(),oc=new kd,qd=Zr(),mi=Er(),W=Dr(),Md=ce(),{safeRe:de,t:fe,comparatorTrimReplace:Ud,tildeTrimReplace:Vd,caretTrimReplace:Gd}=Nt(),{FLAG_INCLUDE_PRERELEASE:Wd,FLAG_LOOSE:Hd}=ar(),Dc=e=>e.value==="<0.0.0-0",Kd=e=>e.value==="",ac=(e,t)=>{let r=!0,u=e.slice(),n=u.pop();for(;r&&u.length;)r=u.every(s=>n.intersects(s,t)),n=u.pop();return r},Yd=(e,t)=>(e=e.replace(de[fe.BUILD],""),W("comp",e,t),e=Xd(e,t),W("caret",e),e=Jd(e,t),W("tildes",e),e=Qd(e,t),W("xrange",e),e=tm(e,t),W("stars",e),e),me=e=>!e||e.toLowerCase()==="x"||e==="*",Jd=(e,t)=>e.trim().split(/\s+/).map(r=>zd(r,t)).join(" "),zd=(e,t)=>{let r=t.loose?de[fe.TILDELOOSE]:de[fe.TILDE];return e.replace(r,(u,n,s,i,o)=>{W("tilde",e,u,n,s,i,o);let c;return me(n)?c="":me(s)?c=`>=${n}.0.0 <${+n+1}.0.0-0`:me(i)?c=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:o?(W("replaceTilde pr",o),c=`>=${n}.${s}.${i}-${o} <${n}.${+s+1}.0-0`):c=`>=${n}.${s}.${i} <${n}.${+s+1}.0-0`,W("tilde return",c),c})},Xd=(e,t)=>e.trim().split(/\s+/).map(r=>Zd(r,t)).join(" "),Zd=(e,t)=>{W("caret",e,t);let r=t.loose?de[fe.CARETLOOSE]:de[fe.CARET],u=t.includePrerelease?"-0":"";return e.replace(r,(n,s,i,o,c)=>{W("caret",e,n,s,i,o,c);let a;return me(s)?a="":me(i)?a=`>=${s}.0.0${u} <${+s+1}.0.0-0`:me(o)?s==="0"?a=`>=${s}.${i}.0${u} <${s}.${+i+1}.0-0`:a=`>=${s}.${i}.0${u} <${+s+1}.0.0-0`:c?(W("replaceCaret pr",c),s==="0"?i==="0"?a=`>=${s}.${i}.${o}-${c} <${s}.${i}.${+o+1}-0`:a=`>=${s}.${i}.${o}-${c} <${s}.${+i+1}.0-0`:a=`>=${s}.${i}.${o}-${c} <${+s+1}.0.0-0`):(W("no pr"),s==="0"?i==="0"?a=`>=${s}.${i}.${o}${u} <${s}.${i}.${+o+1}-0`:a=`>=${s}.${i}.${o}${u} <${s}.${+i+1}.0-0`:a=`>=${s}.${i}.${o} <${+s+1}.0.0-0`),W("caret return",a),a})},Qd=(e,t)=>(W("replaceXRanges",e,t),e.split(/\s+/).map(r=>em(r,t)).join(" ")),em=(e,t)=>{e=e.trim();let r=t.loose?de[fe.XRANGELOOSE]:de[fe.XRANGE];return e.replace(r,(u,n,s,i,o,c)=>{W("xRange",e,u,n,s,i,o,c);let a=me(s),D=a||me(i),l=D||me(o),p=l;return n==="="&&p&&(n=""),c=t.includePrerelease?"-0":"",a?n===">"||n==="<"?u="<0.0.0-0":u="*":n&&p?(D&&(i=0),o=0,n===">"?(n=">=",D?(s=+s+1,i=0,o=0):(i=+i+1,o=0)):n==="<="&&(n="<",D?s=+s+1:i=+i+1),n==="<"&&(c="-0"),u=`${n+s}.${i}.${o}${c}`):D?u=`>=${s}.0.0${c} <${+s+1}.0.0-0`:l&&(u=`>=${s}.${i}.0${c} <${s}.${+i+1}.0-0`),W("xRange return",u),u})},tm=(e,t)=>(W("replaceStars",e,t),e.trim().replace(de[fe.STAR],"")),rm=(e,t)=>(W("replaceGTE0",e,t),e.trim().replace(de[t.includePrerelease?fe.GTE0PRE:fe.GTE0],"")),um=e=>(t,r,u,n,s,i,o,c,a,D,l,p)=>(me(u)?r="":me(n)?r=`>=${u}.0.0${e?"-0":""}`:me(s)?r=`>=${u}.${n}.0${e?"-0":""}`:i?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,me(a)?c="":me(D)?c=`<${+a+1}.0.0-0`:me(l)?c=`<${a}.${+D+1}.0-0`:p?c=`<=${a}.${D}.${l}-${p}`:e?c=`<${a}.${D}.${+l+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),nm=(e,t,r)=>{for(let u=0;u<e.length;u++)if(!e[u].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let u=0;u<e.length;u++)if(W(e[u].semver),e[u].semver!==mi.ANY&&e[u].semver.prerelease.length>0){let n=e[u].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}});var Er=C((o8,mc)=>{"use strict";var gr=Symbol("SemVer ANY"),gi=class e{static get ANY(){return gr}constructor(t,r){if(r=lc(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),Ei("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===gr?this.value="":this.value=this.operator+this.semver.version,Ei("comp",this)}parse(t){let r=this.options.loose?fc[pc.COMPARATORLOOSE]:fc[pc.COMPARATOR],u=t.match(r);if(!u)throw new TypeError(`Invalid comparator: ${t}`);this.operator=u[1]!==void 0?u[1]:"",this.operator==="="&&(this.operator=""),u[2]?this.semver=new hc(u[2],this.options.loose):this.semver=gr}toString(){return this.value}test(t){if(Ei("Comparator.test",t,this.options.loose),this.semver===gr||t===gr)return!0;if(typeof t=="string")try{t=new hc(t,this.options)}catch{return!1}return Fi(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new dc(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new dc(this.value,r).test(t.semver):(r=lc(r),r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||Fi(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||Fi(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};mc.exports=gi;var lc=Zr(),{safeRe:fc,t:pc}=Nt(),Fi=pi(),Ei=Dr(),hc=ce(),dc=Be()});var Cr=C((D8,Fc)=>{"use strict";var im=Be(),sm=(e,t,r)=>{try{t=new im(t,r)}catch{return!1}return t.test(e)};Fc.exports=sm});var gc=C((a8,Ec)=>{"use strict";var om=Be(),Dm=(e,t)=>new om(e,t).set.map(r=>r.map(u=>u.value).join(" ").trim().split(" "));Ec.exports=Dm});var yc=C((c8,Cc)=>{"use strict";var am=ce(),cm=Be(),lm=(e,t,r)=>{let u=null,n=null,s=null;try{s=new cm(t,r)}catch{return null}return e.forEach(i=>{s.test(i)&&(!u||n.compare(i)===-1)&&(u=i,n=new am(u,r))}),u};Cc.exports=lm});var bc=C((l8,Ac)=>{"use strict";var fm=ce(),pm=Be(),hm=(e,t,r)=>{let u=null,n=null,s=null;try{s=new pm(t,r)}catch{return null}return e.forEach(i=>{s.test(i)&&(!u||n.compare(i)===1)&&(u=i,n=new fm(u,r))}),u};Ac.exports=hm});var vc=C((f8,Bc)=>{"use strict";var Ci=ce(),dm=Be(),wc=Pt(),mm=(e,t)=>{e=new dm(e,t);let r=new Ci("0.0.0");if(e.test(r)||(r=new Ci("0.0.0-0"),e.test(r)))return r;r=null;for(let u=0;u<e.set.length;++u){let n=e.set[u],s=null;n.forEach(i=>{let o=new Ci(i.semver.version);switch(i.operator){case">":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!s||wc(o,s))&&(s=o);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),s&&(!r||wc(r,s))&&(r=s)}return r&&e.test(r)?r:null};Bc.exports=mm});var Sc=C((p8,xc)=>{"use strict";var Fm=Be(),Em=(e,t)=>{try{return new Fm(e,t).range||"*"}catch{return null}};xc.exports=Em});var Bu=C((h8,Rc)=>{"use strict";var gm=ce(),Oc=Er(),{ANY:Cm}=Oc,ym=Be(),Am=Cr(),_c=Pt(),$c=Cu(),bm=Au(),wm=yu(),Bm=(e,t,r,u)=>{e=new gm(e,u),t=new ym(t,u);let n,s,i,o,c;switch(r){case">":n=_c,s=bm,i=$c,o=">",c=">=";break;case"<":n=$c,s=wm,i=_c,o="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Am(e,t,u))return!1;for(let a=0;a<t.set.length;++a){let D=t.set[a],l=null,p=null;if(D.forEach(f=>{f.semver===Cm&&(f=new Oc(">=0.0.0")),l=l||f,p=p||f,n(f.semver,l.semver,u)?l=f:i(f.semver,p.semver,u)&&(p=f)}),l.operator===o||l.operator===c||(!p.operator||p.operator===o)&&s(e,p.semver))return!1;if(p.operator===c&&i(e,p.semver))return!1}return!0};Rc.exports=Bm});var Tc=C((d8,Ic)=>{"use strict";var vm=Bu(),xm=(e,t,r)=>vm(e,t,">",r);Ic.exports=xm});var Pc=C((m8,Nc)=>{"use strict";var Sm=Bu(),_m=(e,t,r)=>Sm(e,t,"<",r);Nc.exports=_m});var kc=C((F8,jc)=>{"use strict";var Lc=Be(),$m=(e,t,r)=>(e=new Lc(e,r),t=new Lc(t,r),e.intersects(t,r));jc.exports=$m});var Mc=C((E8,qc)=>{"use strict";var Om=Cr(),Rm=we();qc.exports=(e,t,r)=>{let u=[],n=null,s=null,i=e.sort((D,l)=>Rm(D,l,r));for(let D of i)Om(D,t,r)?(s=D,n||(n=D)):(s&&u.push([n,s]),s=null,n=null);n&&u.push([n,null]);let o=[];for(let[D,l]of u)D===l?o.push(D):!l&&D===i[0]?o.push("*"):l?D===i[0]?o.push(`<=${l}`):o.push(`${D} - ${l}`):o.push(`>=${D}`);let c=o.join(" || "),a=typeof t.raw=="string"?t.raw:String(t);return c.length<a.length?c:t}});var Kc=C((g8,Hc)=>{"use strict";var Uc=Be(),Ai=Er(),{ANY:yi}=Ai,yr=Cr(),bi=we(),Im=(e,t,r={})=>{if(e===t)return!0;e=new Uc(e,r),t=new Uc(t,r);let u=!1;e:for(let n of e.set){for(let s of t.set){let i=Nm(n,s,r);if(u=u||i!==null,i)continue e}if(u)return!1}return!0},Tm=[new Ai(">=0.0.0-0")],Vc=[new Ai(">=0.0.0")],Nm=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===yi){if(t.length===1&&t[0].semver===yi)return!0;r.includePrerelease?e=Tm:e=Vc}if(t.length===1&&t[0].semver===yi){if(r.includePrerelease)return!0;t=Vc}let u=new Set,n,s;for(let f of e)f.operator===">"||f.operator===">="?n=Gc(n,f,r):f.operator==="<"||f.operator==="<="?s=Wc(s,f,r):u.add(f.semver);if(u.size>1)return null;let i;if(n&&s){if(i=bi(n.semver,s.semver,r),i>0)return null;if(i===0&&(n.operator!==">="||s.operator!=="<="))return null}for(let f of u){if(n&&!yr(f,String(n),r)||s&&!yr(f,String(s),r))return null;for(let h of t)if(!yr(f,String(h),r))return!1;return!0}let o,c,a,D,l=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,p=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;l&&l.prerelease.length===1&&s.operator==="<"&&l.prerelease[0]===0&&(l=!1);for(let f of t){if(D=D||f.operator===">"||f.operator===">=",a=a||f.operator==="<"||f.operator==="<=",n){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator===">"||f.operator===">="){if(o=Gc(n,f,r),o===f&&o!==n)return!1}else if(n.operator===">="&&!yr(n.semver,String(f),r))return!1}if(s){if(l&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===l.major&&f.semver.minor===l.minor&&f.semver.patch===l.patch&&(l=!1),f.operator==="<"||f.operator==="<="){if(c=Wc(s,f,r),c===f&&c!==s)return!1}else if(s.operator==="<="&&!yr(s.semver,String(f),r))return!1}if(!f.operator&&(s||n)&&i!==0)return!1}return!(n&&a&&!s&&i!==0||s&&D&&!n&&i!==0||p||l)},Gc=(e,t,r)=>{if(!e)return t;let u=bi(e.semver,t.semver,r);return u>0?e:u<0||t.operator===">"&&e.operator===">="?t:e},Wc=(e,t,r)=>{if(!e)return t;let u=bi(e.semver,t.semver,r);return u<0?e:u>0||t.operator==="<"&&e.operator==="<="?t:e};Hc.exports=Im});var Xc=C((C8,zc)=>{"use strict";var wi=Nt(),Yc=ar(),Pm=ce(),Jc=jn(),Lm=ft(),jm=xa(),km=_a(),qm=Ra(),Mm=Mn(),Um=Ta(),Vm=Pa(),Gm=ja(),Wm=qa(),Hm=we(),Km=Ua(),Ym=Ga(),Jm=gu(),zm=Ya(),Xm=za(),Zm=Pt(),Qm=Cu(),eF=li(),tF=fi(),rF=yu(),uF=Au(),nF=pi(),iF=nc(),sF=Er(),oF=Be(),DF=Cr(),aF=gc(),cF=yc(),lF=bc(),fF=vc(),pF=Sc(),hF=Bu(),dF=Tc(),mF=Pc(),FF=kc(),EF=Mc(),gF=Kc();zc.exports={parse:Lm,valid:jm,clean:km,inc:qm,diff:Mm,major:Um,minor:Vm,patch:Gm,prerelease:Wm,compare:Hm,rcompare:Km,compareLoose:Ym,compareBuild:Jm,sort:zm,rsort:Xm,gt:Zm,lt:Qm,eq:eF,neq:tF,gte:rF,lte:uF,cmp:nF,coerce:iF,Comparator:sF,Range:oF,satisfies:DF,toComparators:aF,maxSatisfying:cF,minSatisfying:lF,minVersion:fF,validRange:pF,outside:hF,gtr:dF,ltr:mF,intersects:FF,simplifyRange:EF,subset:gF,SemVer:Pm,re:wi.re,src:wi.src,tokens:wi.t,SEMVER_SPEC_VERSION:Yc.SEMVER_SPEC_VERSION,RELEASE_TYPES:Yc.RELEASE_TYPES,compareIdentifiers:Jc.compareIdentifiers,rcompareIdentifiers:Jc.rcompareIdentifiers}});var il=C((_8,nl)=>{var{hasOwnProperty:$i}=Object.prototype,Oi=(e,t={})=>{typeof t=="string"&&(t={section:t}),t.align=t.align===!0,t.newline=t.newline===!0,t.sort=t.sort===!0,t.whitespace=t.whitespace===!0||t.align===!0,t.platform=t.platform||typeof process<"u"&&process.platform,t.bracketedArray=t.bracketedArray!==!1;let r=t.platform==="win32"?`\r
35
- `:`
36
- `,u=t.whitespace?" = ":"=",n=[],s=t.sort?Object.keys(e).sort():Object.keys(e),i=0;t.align&&(i=We(s.filter(a=>e[a]===null||Array.isArray(e[a])||typeof e[a]!="object").map(a=>Array.isArray(e[a])?`${a}[]`:a).concat([""]).reduce((a,D)=>We(a).length>=We(D).length?a:D)).length);let o="",c=t.bracketedArray?"[]":"";for(let a of s){let D=e[a];if(D&&Array.isArray(D))for(let l of D)o+=We(`${a}${c}`).padEnd(i," ")+u+We(l)+r;else D&&typeof D=="object"?n.push(a):o+=We(a).padEnd(i," ")+u+We(D)+r}t.section&&o.length&&(o="["+We(t.section)+"]"+(t.newline?r+r:r)+o);for(let a of n){let D=rl(a,".").join("\\."),l=(t.section?t.section+".":"")+D,p=Oi(e[a],{...t,section:l});o.length&&p.length&&(o+=r),o+=p}return o};function rl(e,t){var r=0,u=0,n=0,s=[];do if(n=e.indexOf(t,r),n!==-1){if(r=n+t.length,n>0&&e[n-1]==="\\")continue;s.push(e.slice(u,n)),u=n+t.length}while(n!==-1);return s.push(e.slice(u)),s}var tl=(e,t={})=>{t.bracketedArray=t.bracketedArray!==!1;let r=Object.create(null),u=r,n=null,s=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,i=e.split(/[\r\n]+/g),o={};for(let a of i){if(!a||a.match(/^\s*[;#]/)||a.match(/^\s*$/))continue;let D=a.match(s);if(!D)continue;if(D[1]!==void 0){if(n=xu(D[1]),n==="__proto__"){u=Object.create(null);continue}u=r[n]=r[n]||Object.create(null);continue}let l=xu(D[2]),p;t.bracketedArray?p=l.length>2&&l.slice(-2)==="[]":(o[l]=(o?.[l]||0)+1,p=o[l]>1);let f=p?l.slice(0,-2):l;if(f==="__proto__")continue;let h=D[3]?xu(D[4]):!0,m=h==="true"||h==="false"||h==="null"?JSON.parse(h):h;p&&($i.call(u,f)?Array.isArray(u[f])||(u[f]=[u[f]]):u[f]=[]),Array.isArray(u[f])?u[f].push(m):u[f]=m}let c=[];for(let a of Object.keys(r)){if(!$i.call(r,a)||typeof r[a]!="object"||Array.isArray(r[a]))continue;let D=rl(a,".");u=r;let l=D.pop(),p=l.replace(/\\\./g,".");for(let f of D)f!=="__proto__"&&((!$i.call(u,f)||typeof u[f]!="object")&&(u[f]=Object.create(null)),u=u[f]);u===r&&p===l||(u[p]=r[a],c.push(a))}for(let a of c)delete r[a];return r},ul=e=>e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"),We=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&ul(e)||e!==e.trim()?JSON.stringify(e):e.split(";").join("\\;").split("#").join("\\#"),xu=(e,t)=>{if(e=(e||"").trim(),ul(e)){e.charAt(0)==="'"&&(e=e.slice(1,-1));try{e=JSON.parse(e)}catch{}}else{let r=!1,u="";for(let n=0,s=e.length;n<s;n++){let i=e.charAt(n);if(r)"\\;#".indexOf(i)!==-1?u+=i:u+="\\"+i,r=!1;else{if(";#".indexOf(i)!==-1)break;i==="\\"?r=!0:u+=i}}return r&&(u+="\\"),u.trim()}return e};nl.exports={parse:tl,decode:tl,stringify:Oi,encode:Oi,safe:We,unsafe:xu}});var Cl=C((U8,gl)=>{gl.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var Al=C((Y8,TF)=>{TF.exports={single:{topLeft:"\u250C",top:"\u2500",topRight:"\u2510",right:"\u2502",bottomRight:"\u2518",bottom:"\u2500",bottomLeft:"\u2514",left:"\u2502"},double:{topLeft:"\u2554",top:"\u2550",topRight:"\u2557",right:"\u2551",bottomRight:"\u255D",bottom:"\u2550",bottomLeft:"\u255A",left:"\u2551"},round:{topLeft:"\u256D",top:"\u2500",topRight:"\u256E",right:"\u2502",bottomRight:"\u256F",bottom:"\u2500",bottomLeft:"\u2570",left:"\u2502"},bold:{topLeft:"\u250F",top:"\u2501",topRight:"\u2513",right:"\u2503",bottomRight:"\u251B",bottom:"\u2501",bottomLeft:"\u2517",left:"\u2503"},singleDouble:{topLeft:"\u2553",top:"\u2500",topRight:"\u2556",right:"\u2551",bottomRight:"\u255C",bottom:"\u2500",bottomLeft:"\u2559",left:"\u2551"},doubleSingle:{topLeft:"\u2552",top:"\u2550",topRight:"\u2555",right:"\u2502",bottomRight:"\u255B",bottom:"\u2550",bottomLeft:"\u2558",left:"\u2502"},classic:{topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},arrow:{topLeft:"\u2198",top:"\u2193",topRight:"\u2199",right:"\u2190",bottomRight:"\u2196",bottom:"\u2191",bottomLeft:"\u2197",left:"\u2192"}}});var Ni=C((J8,Ti)=>{"use strict";var bl=Al();Ti.exports=bl;Ti.exports.default=bl});var _l=C((X8,Sl)=>{"use strict";Sl.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Ol=C((Z8,$l)=>{"use strict";var MF=_l();$l.exports=e=>typeof e=="string"?e.replace(MF(),""):e});var Il=C((Q8,ji)=>{"use strict";var Rl=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);ji.exports=Rl;ji.exports.default=Rl});var Nl=C((ey,Tl)=>{"use strict";Tl.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var Ll=C((ty,ki)=>{"use strict";var UF=Ol(),VF=Il(),GF=Nl(),Pl=e=>{if(typeof e!="string"||e.length===0||(e=UF(e),e.length===0))return 0;e=e.replace(GF()," ");let t=0;for(let r=0;r<e.length;r++){let u=e.codePointAt(r);u<=31||u>=127&&u<=159||u>=768&&u<=879||(u>65535&&r++,t+=VF(u)?2:1)}return t};ki.exports=Pl;ki.exports.default=Pl});var kl=C((ry,jl)=>{"use strict";var WF=Ll();function bt(e,t){if(!e)return e;t=t||{};let r=t.align||"center";if(r==="left")return e;let u=t.split||`
37
- `,n=t.pad||" ",s=r!=="right"?HF:KF,i=!1;Array.isArray(e)||(i=!0,e=String(e).split(u));let o,c=0;return e=e.map(function(a){return a=String(a),o=WF(a),c=Math.max(o,c),{str:a,width:o}}).map(function(a){return new Array(s(c,a.width)+1).join(n)+a.str}),i?e.join(u):e}bt.left=function(t){return bt(t,{align:"left"})};bt.center=function(t){return bt(t,{align:"center"})};bt.right=function(t){return bt(t,{align:"right"})};jl.exports=bt;function HF(e,t){return Math.floor((e-t)/2)}function KF(e,t){return e-t}});var zi=C((Ry,of)=>{"use strict";var Ji={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let r="";return e<0?r+=`\x1B[${-e}D`:e>0&&(r+=`\x1B[${e}C`),t<0?r+=`\x1B[${-t}A`:t>0&&(r+=`\x1B[${t}B`),r},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},mE={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},FE={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?Ji.up():"");return e&&(t+=Ji.left),t}};of.exports={cursor:Ji,scroll:mE,erase:FE,beep:"\x07"}});var Zi=C((Iy,Xi)=>{var ju=process||{},Df=ju.argv||[],Lu=ju.env||{},EE=!(Lu.NO_COLOR||Df.includes("--no-color"))&&(!!Lu.FORCE_COLOR||Df.includes("--color")||ju.platform==="win32"||(ju.stdout||{}).isTTY&&Lu.TERM!=="dumb"||!!Lu.CI),gE=(e,t,r=e)=>u=>{let n=""+u,s=n.indexOf(t,e.length);return~s?e+CE(n,t,r,s)+t:e+n+t},CE=(e,t,r,u)=>{let n="",s=0;do n+=e.substring(s,u)+r,s=u+t.length,u=e.indexOf(t,s);while(~u);return n+e.substring(s)},af=(e=EE)=>{let t=e?gE:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Xi.exports=af();Xi.exports.createColors=af});var Is=I(Rs(),1),{program:Kg,createCommand:Yg,createArgument:Jg,createOption:zg,CommanderError:Xg,InvalidArgumentError:Zg,InvalidOptionArgumentError:Qg,Command:Xe,Argument:eC,Option:tC,Help:rC}=Is.default;var nt=I(require("node:process"),1),rf=require("node:child_process"),uf=require("node:url"),Ki=I(require("node:path"),1),Pu=require("node:util");var Rt=I(require("node:path"),1),ho=I(require("node:os"),1),nr=I(Gs(),1);var Hs=I(require("os"),1),er=I(require("path"),1),Qe=Hs.default.homedir(),{env:at}=process,Ws=at.XDG_DATA_HOME||(Qe?er.default.join(Qe,".local","share"):void 0),Ot=at.XDG_CONFIG_HOME||(Qe?er.default.join(Qe,".config"):void 0),DC=at.XDG_STATE_HOME||(Qe?er.default.join(Qe,".local","state"):void 0),aC=at.XDG_CACHE_HOME||(Qe?er.default.join(Qe,".cache"):void 0),cC=at.XDG_RUNTIME_DIR||void 0,qp=(at.XDG_DATA_DIRS||"/usr/local/share/:/usr/share/").split(":");Ws&&qp.unshift(Ws);var Mp=(at.XDG_CONFIG_DIRS||"/etc/xdg").split(":");Ot&&Mp.unshift(Ot);var oo=I(require("node:path"),1);var U=I(require("node:fs"),1),oe=require("node:util");var Up=(e,t)=>{let{onError:r}=t;return function(...n){return e.apply(void 0,n).catch(r)}},Re=Up;var Vp=(e,t)=>{let{onError:r}=t;return function(...n){try{return e.apply(void 0,n)}catch(s){return r(s)}}},_e=Vp;var Wp=(e,t)=>{let{isRetriable:r}=t;return function(n){let{timeout:s}=n,i=n.interval??250,o=Date.now()+s;return function c(...a){return e.apply(void 0,a).catch(D=>{if(!r(D)||Date.now()>=o)throw D;let l=Math.round(i*Math.random());return l>0?new Promise(f=>setTimeout(f,l)).then(()=>c.apply(void 0,a)):c.apply(void 0,a)})}}},Ie=Wp;var Hp=(e,t)=>{let{isRetriable:r}=t;return function(n){let{timeout:s}=n,i=Date.now()+s;return function(...c){for(;;)try{return e.apply(void 0,c)}catch(a){if(!r(a)||Date.now()>=i)throw a;continue}}}},Te=Hp;var An=I(require("node:process"),1);var tr={isChangeErrorOk:e=>{if(!tr.isNodeError(e))return!1;let{code:t}=e;return t==="ENOSYS"||!Ks&&(t==="EINVAL"||t==="EPERM")},isNodeError:e=>e instanceof Error,isRetriableError:e=>{if(!tr.isNodeError(e))return!1;let{code:t}=e;return t==="EMFILE"||t==="ENFILE"||t==="EAGAIN"||t==="EBUSY"||t==="EACCESS"||t==="EACCES"||t==="EACCS"||t==="EPERM"},onChangeError:e=>{if(!tr.isNodeError(e))throw e;if(!tr.isChangeErrorOk(e))throw e}},yn=tr;var rr={onError:yn.onChangeError},ge={onError:()=>{}},Ks=An.default.getuid?!An.default.getuid():!1,se={isRetriable:yn.isRetriableError};var Kp={attempt:{chmod:Re((0,oe.promisify)(U.default.chmod),rr),chown:Re((0,oe.promisify)(U.default.chown),rr),close:Re((0,oe.promisify)(U.default.close),ge),fsync:Re((0,oe.promisify)(U.default.fsync),ge),mkdir:Re((0,oe.promisify)(U.default.mkdir),ge),realpath:Re((0,oe.promisify)(U.default.realpath),ge),stat:Re((0,oe.promisify)(U.default.stat),ge),unlink:Re((0,oe.promisify)(U.default.unlink),ge),chmodSync:_e(U.default.chmodSync,rr),chownSync:_e(U.default.chownSync,rr),closeSync:_e(U.default.closeSync,ge),existsSync:_e(U.default.existsSync,ge),fsyncSync:_e(U.default.fsync,ge),mkdirSync:_e(U.default.mkdirSync,ge),realpathSync:_e(U.default.realpathSync,ge),statSync:_e(U.default.statSync,ge),unlinkSync:_e(U.default.unlinkSync,ge)},retry:{close:Ie((0,oe.promisify)(U.default.close),se),fsync:Ie((0,oe.promisify)(U.default.fsync),se),open:Ie((0,oe.promisify)(U.default.open),se),readFile:Ie((0,oe.promisify)(U.default.readFile),se),rename:Ie((0,oe.promisify)(U.default.rename),se),stat:Ie((0,oe.promisify)(U.default.stat),se),write:Ie((0,oe.promisify)(U.default.write),se),writeFile:Ie((0,oe.promisify)(U.default.writeFile),se),closeSync:Te(U.default.closeSync,se),fsyncSync:Te(U.default.fsyncSync,se),openSync:Te(U.default.openSync,se),readFileSync:Te(U.default.readFileSync,se),renameSync:Te(U.default.renameSync,se),statSync:Te(U.default.statSync,se),writeSync:Te(U.default.writeSync,se),writeFileSync:Te(U.default.writeFileSync,se)}},ne=Kp;var et=I(require("node:process"),1),Ys="utf8",bn=438,Js=511;var zs={},Xs=et.default.geteuid?et.default.geteuid():-1,Zs=et.default.getegid?et.default.getegid():-1;var Qs=1e3,eo=!!et.default.getuid,OC=et.default.getuid?!et.default.getuid():!1,wn=128;var to=e=>e instanceof Error&&"code"in e;var Bn=e=>typeof e=="string",Wr=e=>e===void 0;var so=I(require("node:path"),1);var ct=I(require("node:process"),1);var vn=I(require("node:process"),1),ro=vn.default.platform==="linux",Hr=vn.default.platform==="win32";var xn=["SIGHUP","SIGINT","SIGTERM"];Hr||xn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");ro&&xn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var uo=xn;var Sn=class{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=t=>{if(!this.exited){this.exited=!0;for(let r of this.callbacks)r();t&&(Hr&&t!=="SIGINT"&&t!=="SIGTERM"&&t!=="SIGKILL"?ct.default.kill(ct.default.pid,"SIGTERM"):ct.default.kill(ct.default.pid,t))}},this.hook=()=>{ct.default.once("exit",()=>this.exit());for(let t of uo)try{ct.default.once(t,()=>this.exit(t))}catch{}},this.register=t=>(this.callbacks.add(t),()=>{this.callbacks.delete(t)}),this.hook()}},no=new Sn;var Yp=no.register,io=Yp;var Ce={store:{},create:e=>{let t=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),n=`.tmp-${Date.now().toString().slice(-10)}${t}`;return`${e}${n}`},get:(e,t,r=!0)=>{let u=Ce.truncate(t(e));return u in Ce.store?Ce.get(e,t,r):(Ce.store[u]=r,[u,()=>delete Ce.store[u]])},purge:e=>{Ce.store[e]&&(delete Ce.store[e],ne.attempt.unlink(e))},purgeSync:e=>{Ce.store[e]&&(delete Ce.store[e],ne.attempt.unlinkSync(e))},purgeSyncAll:()=>{for(let e in Ce.store)Ce.purgeSync(e)},truncate:e=>{let t=so.default.basename(e);if(t.length<=wn)return e;let r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(t);if(!r)return e;let u=t.length-wn;return`${e.slice(0,-t.length)}${r[1]}${r[2].slice(0,-u)}${r[3]}`}};io(Ce.purgeSyncAll);var ur=Ce;function Kr(e,t,r=zs){if(Bn(r))return Kr(e,t,{encoding:r});let n={timeout:r.timeout??Qs},s=null,i=null,o=null;try{let c=ne.attempt.realpathSync(e),a=!!c;e=c||e,[i,s]=ur.get(e,r.tmpCreate||ur.create,r.tmpPurge!==!1);let D=eo&&Wr(r.chown),l=Wr(r.mode);if(a&&(D||l)){let p=ne.attempt.statSync(e);p&&(r={...r},D&&(r.chown={uid:p.uid,gid:p.gid}),l&&(r.mode=p.mode))}if(!a){let p=oo.default.dirname(e);ne.attempt.mkdirSync(p,{mode:Js,recursive:!0})}o=ne.retry.openSync(n)(i,"w",r.mode||bn),r.tmpCreated&&r.tmpCreated(i),Bn(t)?ne.retry.writeSync(n)(o,t,0,r.encoding||Ys):Wr(t)||ne.retry.writeSync(n)(o,t,0,t.length,0),r.fsync!==!1&&(r.fsyncWait!==!1?ne.retry.fsyncSync(n)(o):ne.attempt.fsync(o)),ne.retry.closeSync(n)(o),o=null,r.chown&&(r.chown.uid!==Xs||r.chown.gid!==Zs)&&ne.attempt.chownSync(i,r.chown.uid,r.chown.gid),r.mode&&r.mode!==bn&&ne.attempt.chmodSync(i,r.mode);try{ne.retry.renameSync(n)(i,e)}catch(p){if(!to(p)||p.code!=="ENAMETOOLONG")throw p;ne.retry.renameSync(n)(i,ur.truncate(e))}s(),i=null}finally{o&&ne.attempt.closeSync(o),i&&ur.purge(i)}}var lt=e=>{let t=typeof e;return e!==null&&(t==="object"||t==="function")};var _n=new Set(["__proto__","prototype","constructor"]),Jp=new Set("0123456789");function Yr(e){let t=[],r="",u="start",n=!1;for(let s of e)switch(s){case"\\":{if(u==="index")throw new Error("Invalid character in an index");if(u==="indexEnd")throw new Error("Invalid character after an index");n&&(r+=s),u="property",n=!n;break}case".":{if(u==="index")throw new Error("Invalid character in an index");if(u==="indexEnd"){u="property";break}if(n){n=!1,r+=s;break}if(_n.has(r))return[];t.push(r),r="",u="property";break}case"[":{if(u==="index")throw new Error("Invalid character in an index");if(u==="indexEnd"){u="index";break}if(n){n=!1,r+=s;break}if(u==="property"){if(_n.has(r))return[];t.push(r),r=""}u="index";break}case"]":{if(u==="index"){t.push(Number.parseInt(r,10)),r="",u="indexEnd";break}if(u==="indexEnd")throw new Error("Invalid character after an index")}default:{if(u==="index"&&!Jp.has(s))throw new Error("Invalid character in an index");if(u==="indexEnd")throw new Error("Invalid character after an index");u==="start"&&(u="property"),n&&(n=!1,r+="\\"),r+=s}}switch(n&&(r+="\\"),u){case"property":{if(_n.has(r))return[];t.push(r);break}case"index":throw new Error("Index was not closed");case"start":{t.push("");break}}return t}function $n(e,t){if(typeof t!="number"&&Array.isArray(e)){let r=Number.parseInt(t,10);return Number.isInteger(r)&&e[r]===e[t]}return!1}function Do(e,t){if($n(e,t))throw new Error("Cannot use string index")}function ao(e,t,r){if(!lt(e)||typeof t!="string")return r===void 0?e:r;let u=Yr(t);if(u.length===0)return r;for(let n=0;n<u.length;n++){let s=u[n];if($n(e,s)?e=n===u.length-1?void 0:null:e=e[s],e==null){if(n!==u.length-1)return r;break}}return e===void 0?r:e}function On(e,t,r){if(!lt(e)||typeof t!="string")return e;let u=e,n=Yr(t);for(let s=0;s<n.length;s++){let i=n[s];Do(e,i),s===n.length-1?e[i]=r:lt(e[i])||(e[i]=typeof n[s+1]=="number"?[]:{}),e=e[i]}return u}function co(e,t){if(!lt(e)||typeof t!="string")return!1;let r=Yr(t);for(let u=0;u<r.length;u++){let n=r[u];if(Do(e,n),u===r.length-1)return delete e[n],!0;if(e=e[n],!lt(e))return!1}}function lo(e,t){if(!lt(e)||typeof t!="string")return!1;let r=Yr(t);if(r.length===0)return!1;for(let u of r){if(!lt(e)||!(u in e)||$n(e,u))return!1;e=e[u]}return!0}function zp(e,t){let r=t?Rt.default.join(e,"config.json"):Rt.default.join("configstore",`${e}.json`),u=Ot??nr.default.mkdtempSync(nr.default.realpathSync(ho.default.tmpdir())+Rt.default.sep);return Rt.default.join(u,r)}var Xp="You don't have access to this file.",Zp={mode:448,recursive:!0},fo={mode:384};function po(e){throw e.code==="EACCES"&&(e.message=`${e.message}
38
- ${Xp}
39
- `),e}var ir=class{constructor(t,r,u={}){this._path=u.configPath??zp(t,u.globalConfigPath),this._clearInvalidConfig=u.clearInvalidConfig??!0,r&&(this.all={...r,...this.all})}get all(){try{return JSON.parse(nr.default.readFileSync(this._path,"utf8"))}catch(t){if(t.code==="ENOENT")return{};if(t.name==="SyntaxError"){if(this._clearInvalidConfig)return Kr(this._path,"",fo),{};throw t}return po(t),{}}}set all(t){try{nr.default.mkdirSync(Rt.default.dirname(this._path),Zp),Kr(this._path,JSON.stringify(t,void 0," "),fo)}catch(r){po(r)}}get size(){return Object.keys(this.all||{}).length}get(t){return ao(this.all,t)}set(t,r){let u=this.all;if(typeof t=="object"&&arguments.length===1)for(let n of Object.keys(t))On(u,n,t[n]);else On(u,t,r);this.all=u}has(t){return lo(this.all,t)}delete(t){let r=this.all;co(r,t),this.all=r}clear(){this.all={}}get path(){return this._path}};var mo=(e=0)=>t=>`\x1B[${t+e}m`,Fo=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Eo=(e=0)=>(t,r,u)=>`\x1B[${38+e};2;${t};${r};${u}m`,H={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]}},a2=Object.keys(H.modifier),Qp=Object.keys(H.color),eh=Object.keys(H.bgColor),c2=[...Qp,...eh];function th(){let e=new Map;for(let[t,r]of Object.entries(H)){for(let[u,n]of Object.entries(r))H[u]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[u]=H[u],e.set(n[0],n[1]);Object.defineProperty(H,t,{value:r,enumerable:!1})}return Object.defineProperty(H,"codes",{value:e,enumerable:!1}),H.color.close="\x1B[39m",H.bgColor.close="\x1B[49m",H.color.ansi=mo(),H.color.ansi256=Fo(),H.color.ansi16m=Eo(),H.bgColor.ansi=mo(10),H.bgColor.ansi256=Fo(10),H.bgColor.ansi16m=Eo(10),Object.defineProperties(H,{rgbToAnsi256:{value(t,r,u){return t===r&&r===u?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(u/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[u]=r;u.length===3&&(u=[...u].map(s=>s+s).join(""));let n=Number.parseInt(u,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>H.rgbToAnsi256(...H.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,u,n;if(t>=232)r=((t-232)*10+8)/255,u=r,n=r;else{t-=16;let o=t%36;r=Math.floor(t/36)/5,u=Math.floor(o/6)/5,n=o%6/5}let s=Math.max(r,u,n)*2;if(s===0)return 30;let i=30+(Math.round(n)<<2|Math.round(u)<<1|Math.round(r));return s===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(t,r,u)=>H.ansi256ToAnsi(H.rgbToAnsi256(t,r,u)),enumerable:!1},hexToAnsi:{value:t=>H.ansi256ToAnsi(H.hexToAnsi256(t)),enumerable:!1}}),H}var rh=th(),$e=rh;var zr=I(require("node:process"),1),Co=I(require("node:os"),1),Rn=I(require("node:tty"),1);function be(e,t=globalThis.Deno?globalThis.Deno.args:zr.default.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",u=t.indexOf(r+e),n=t.indexOf("--");return u!==-1&&(n===-1||u<n)}var{env:K}=zr.default,Jr;be("no-color")||be("no-colors")||be("color=false")||be("color=never")?Jr=0:(be("color")||be("colors")||be("color=true")||be("color=always"))&&(Jr=1);function uh(){if("FORCE_COLOR"in K)return K.FORCE_COLOR==="true"?1:K.FORCE_COLOR==="false"?0:K.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(K.FORCE_COLOR,10),3)}function nh(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ih(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let u=uh();u!==void 0&&(Jr=u);let n=r?Jr:u;if(n===0)return 0;if(r){if(be("color=16m")||be("color=full")||be("color=truecolor"))return 3;if(be("color=256"))return 2}if("TF_BUILD"in K&&"AGENT_NAME"in K)return 1;if(e&&!t&&n===void 0)return 0;let s=n||0;if(K.TERM==="dumb")return s;if(zr.default.platform==="win32"){let i=Co.default.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in K)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(i=>i in K)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(i=>i in K)||K.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in K)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(K.TEAMCITY_VERSION)?1:0;if(K.COLORTERM==="truecolor"||K.TERM==="xterm-kitty"||K.TERM==="xterm-ghostty"||K.TERM==="wezterm")return 3;if("TERM_PROGRAM"in K){let i=Number.parseInt((K.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(K.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(K.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(K.TERM)||"COLORTERM"in K?1:s}function go(e,t={}){let r=ih(e,{streamIsTTY:e&&e.isTTY,...t});return nh(r)}var sh={stdout:go({isTTY:Rn.default.isatty(1)}),stderr:go({isTTY:Rn.default.isatty(2)})},yo=sh;function Ao(e,t,r){let u=e.indexOf(t);if(u===-1)return e;let n=t.length,s=0,i="";do i+=e.slice(s,u)+t+r,s=u+n,u=e.indexOf(t,s);while(u!==-1);return i+=e.slice(s),i}function bo(e,t,r,u){let n=0,s="";do{let i=e[u-1]==="\r";s+=e.slice(n,i?u-1:u)+t+(i?`\r
40
- `:`
41
- `)+r,n=u+1,u=e.indexOf(`
42
- `,n)}while(u!==-1);return s+=e.slice(n),s}var{stdout:wo,stderr:Bo}=yo,In=Symbol("GENERATOR"),It=Symbol("STYLER"),sr=Symbol("IS_EMPTY"),vo=["ansi","ansi","ansi256","ansi16m"],Tt=Object.create(null),oh=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=wo?wo.level:0;e.level=t.level===void 0?r:t.level};var Dh=e=>{let t=(...r)=>r.join(" ");return oh(t,e),Object.setPrototypeOf(t,or.prototype),t};function or(e){return Dh(e)}Object.setPrototypeOf(or.prototype,Function.prototype);for(let[e,t]of Object.entries($e))Tt[e]={get(){let r=Xr(this,Nn(t.open,t.close,this[It]),this[sr]);return Object.defineProperty(this,e,{value:r}),r}};Tt.visible={get(){let e=Xr(this,this[It],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Tn=(e,t,r,...u)=>e==="rgb"?t==="ansi16m"?$e[r].ansi16m(...u):t==="ansi256"?$e[r].ansi256($e.rgbToAnsi256(...u)):$e[r].ansi($e.rgbToAnsi(...u)):e==="hex"?Tn("rgb",t,r,...$e.hexToRgb(...u)):$e[r][e](...u),ah=["rgb","hex","ansi256"];for(let e of ah){Tt[e]={get(){let{level:r}=this;return function(...u){let n=Nn(Tn(e,vo[r],"color",...u),$e.color.close,this[It]);return Xr(this,n,this[sr])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Tt[t]={get(){let{level:r}=this;return function(...u){let n=Nn(Tn(e,vo[r],"bgColor",...u),$e.bgColor.close,this[It]);return Xr(this,n,this[sr])}}}}var ch=Object.defineProperties(()=>{},{...Tt,level:{enumerable:!0,get(){return this[In].level},set(e){this[In].level=e}}}),Nn=(e,t,r)=>{let u,n;return r===void 0?(u=e,n=t):(u=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:u,closeAll:n,parent:r}},Xr=(e,t,r)=>{let u=(...n)=>lh(u,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(u,ch),u[In]=e,u[It]=t,u[sr]=r,u},lh=(e,t)=>{if(e.level<=0||!t)return e[sr]?"":t;let r=e[It];if(r===void 0)return t;let{openAll:u,closeAll:n}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=Ao(t,r.close,r.open),r=r.parent;let s=t.indexOf(`
43
- `);return s!==-1&&(t=bo(t,n,u,s)),u+t+n};Object.defineProperties(or.prototype,Tt);var fh=or(),F2=or({level:Bo?Bo.level:0});var he=fh;var nf=I(Mn(),1),sf=I(Pt(),1);var pt=class extends Error{response;request;options;constructor(t,r,u){let n=t.status||t.status===0?t.status:"",s=t.statusText??"",i=`${n} ${s}`.trim(),o=i?`status code ${i}`:"an unknown error";super(`Request failed with ${o}: ${r.method} ${r.url}`),this.name="HTTPError",this.response=t,this.request=r,this.options=u}};var Lt=class extends Error{name="NonError";value;constructor(t){let r="Non-error value was thrown";try{typeof t=="string"?r=t:t&&typeof t=="object"&&"message"in t&&typeof t.message=="string"&&(r=t.message)}catch{}super(r),this.value=t}};var jt=class extends Error{name="ForceRetryError";customDelay;code;customRequest;constructor(t){let r=t?.cause?t.cause instanceof Error?t.cause:new Lt(t.cause):void 0;super(t?.code?`Forced retry: ${t.code}`:"Forced retry",r?{cause:r}:void 0),this.customDelay=t?.delay,this.code=t?.code,this.customRequest=t?.request}};var Un=(()=>{let e=!1,t=!1,r=typeof globalThis.ReadableStream=="function",u=typeof globalThis.Request=="function";if(r&&u)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(n){if(n instanceof Error&&n.message==="unsupported BodyInit type")return!1;throw n}return e&&!t})(),Vo=typeof globalThis.AbortController=="function",uu=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",Go=typeof globalThis.ReadableStream=="function",Wo=typeof globalThis.FormData=="function",nu=["get","post","put","patch","head","delete"],jh=()=>{};jh();var Ho={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},iu=2147483647,Ko=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,su=Symbol("stop"),cr=class{options;constructor(t){this.options=t}},Yo=e=>new cr(e),Jo={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},zo={next:!0},Xo={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0};var kh=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[r,u]of e)t+=Ko,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${r}"`).length,t+=typeof u=="string"?new TextEncoder().encode(u).length:u.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e=="string")return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if(typeof e=="object"&&e!==null)try{let t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},Zo=(e,t,r)=>{let u,n=0;return e.pipeThrough(new TransformStream({transform(s,i){if(i.enqueue(s),u){n+=u.byteLength;let o=t===0?0:n/t;o>=1&&(o=1-Number.EPSILON),r?.({percent:o,totalBytes:Math.max(t,n),transferredBytes:n},u)}u=s},flush(){u&&(n+=u.byteLength,r?.({percent:1,totalBytes:Math.max(t,n),transferredBytes:n},u))}}))},Qo=(e,t)=>{if(!e.body)return e;if(e.status===204)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});let r=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(Zo(e.body,r,t),{status:e.status,statusText:e.statusText,headers:e.headers})},eD=(e,t,r)=>{if(!e.body)return e;let u=kh(r??e.body);return new Request(e,{duplex:"half",body:Zo(e.body,u,t)})};var tt=e=>e!==null&&typeof e=="object";var lr=(...e)=>{for(let t of e)if((!tt(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return Wn({},...e)},Vn=(e={},t={})=>{let r=new globalThis.Headers(e),u=t instanceof globalThis.Headers,n=new globalThis.Headers(t);for(let[s,i]of n.entries())u&&i==="undefined"||i===void 0?r.delete(s):r.set(s,i);return r};function ou(e,t,r){return Object.hasOwn(t,r)&&t[r]===void 0?[]:Wn(e[r]??[],t[r]??[])}var Gn=(e={},t={})=>({beforeRequest:ou(e,t,"beforeRequest"),beforeRetry:ou(e,t,"beforeRetry"),afterResponse:ou(e,t,"afterResponse"),beforeError:ou(e,t,"beforeError")}),qh=(e,t)=>{let r=new URLSearchParams;for(let u of[e,t])if(u!==void 0)if(u instanceof URLSearchParams)for(let[n,s]of u.entries())r.append(n,s);else if(Array.isArray(u))for(let n of u){if(!Array.isArray(n)||n.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");r.append(String(n[0]),String(n[1]))}else if(tt(u))for(let[n,s]of Object.entries(u))s!==void 0&&r.append(n,String(s));else{let n=new URLSearchParams(u);for(let[s,i]of n.entries())r.append(s,i)}return r},Wn=(...e)=>{let t={},r={},u={},n,s=[];for(let i of e)if(Array.isArray(i))Array.isArray(t)||(t=[]),t=[...t,...i];else if(tt(i)){for(let[o,c]of Object.entries(i)){if(o==="signal"&&c instanceof globalThis.AbortSignal){s.push(c);continue}if(o==="context"){if(c!=null&&(!tt(c)||Array.isArray(c)))throw new TypeError("The `context` option must be an object");t={...t,context:c==null?{}:{...t.context,...c}};continue}if(o==="searchParams"){c==null?n=void 0:n=n===void 0?c:qh(n,c);continue}tt(c)&&o in t&&(c=Wn(t[o],c)),t={...t,[o]:c}}tt(i.hooks)&&(u=Gn(u,i.hooks),t.hooks=u),tt(i.headers)&&(r=Vn(r,i.headers),t.headers=r)}return n!==void 0&&(t.searchParams=n),s.length>0&&(s.length===1?t.signal=s[0]:uu?t.signal=AbortSignal.any(s):t.signal=s.at(-1)),t};var rD=e=>nu.includes(e)?e.toUpperCase():e,Mh=["get","put","head","delete","options","trace"],Uh=[408,413,429,500,502,503,504],Vh=[413,429,503],tD={limit:2,methods:Mh,statusCodes:Uh,afterStatusCodes:Vh,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},uD=(e={})=>{if(typeof e=="number")return{...tD,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.methods&&=e.methods.map(r=>r.toLowerCase()),e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");let t=Object.fromEntries(Object.entries(e).filter(([,r])=>r!==void 0));return{...tD,...t}};var ht=class extends Error{request;constructor(t){super(`Request timed out: ${t.method} ${t.url}`),this.name="TimeoutError",this.request=t}};async function Hn(e,t,r,u){return new Promise((n,s)=>{let i=setTimeout(()=>{r&&r.abort(),s(new ht(e))},u.timeout);u.fetch(e,t).then(n).catch(s).then(()=>{clearTimeout(i)})})}async function Kn(e,{signal:t}){return new Promise((r,u)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",n,{once:!0}));function n(){clearTimeout(s),u(t.reason)}let s=setTimeout(()=>{t?.removeEventListener("abort",n),r()},e)})}var nD=(e,t)=>{let r={};for(let u in t)Object.hasOwn(t,u)&&!(u in Xo)&&!(u in Jo)&&(!(u in e)||u in zo)&&(r[u]=t[u]);return r},iD=e=>e===void 0?!1:Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0:typeof e=="object"?Object.keys(e).length>0:typeof e=="string"?e.trim().length>0:!!e;function sD(e){return e instanceof pt||e?.name===pt.name}function oD(e){return e instanceof ht||e?.name===ht.name}var fr=class e{static create(t,r){let u=new e(t,r),n=async()=>{if(typeof u.#e.timeout=="number"&&u.#e.timeout>iu)throw new RangeError(`The \`timeout\` option cannot be greater than ${iu}`);await Promise.resolve();let i=await u.#F();for(let o of u.#e.hooks.afterResponse){let c=u.#p(i.clone()),a;try{a=await o(u.request,u.#a(),c,{retryCount:u.#u})}catch(l){throw u.#i(c),u.#i(i),l}if(a instanceof cr)throw u.#i(c),u.#i(i),new jt(a.options);let D=a instanceof globalThis.Response?a:i;c!==D&&u.#i(c),i!==D&&u.#i(i),i=D}if(u.#p(i),!i.ok&&(typeof u.#e.throwHttpErrors=="function"?u.#e.throwHttpErrors(i.status):u.#e.throwHttpErrors)){let o=new pt(i,u.request,u.#a());for(let c of u.#e.hooks.beforeError)o=await c(o,{retryCount:u.#u});throw o}if(u.#e.onDownloadProgress){if(typeof u.#e.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Go)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");let o=i.clone();return u.#i(i),Qo(o,u.#e.onDownloadProgress)}return i},s=u.#h(n).finally(()=>{let i=u.#o;u.#l(i?.body??void 0),u.#l(u.request.body??void 0)});for(let[i,o]of Object.entries(Ho))i==="bytes"&&typeof globalThis.Response?.prototype?.bytes!="function"||(s[i]=async()=>{u.request.headers.set("accept",u.request.headers.get("accept")||o);let c=await s;if(i==="json"){if(c.status===204)return"";let a=await c.text();return a===""?"":r.parseJson?r.parseJson(a):JSON.parse(a)}return c[i]()});return s}static#s(t){return t&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof URLSearchParams)?Object.fromEntries(Object.entries(t).filter(([,r])=>r!==void 0)):t}request;#r;#u=0;#t;#e;#o;#n;#D;constructor(t,r={}){if(this.#t=t,this.#e={...r,headers:Vn(this.#t.headers,r.headers),hooks:Gn({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:rD(r.method??this.#t.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:uD(r.retry),throwHttpErrors:r.throwHttpErrors??!0,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis),context:r.context??{}},typeof this.#t!="string"&&!(this.#t instanceof URL||this.#t instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this.#e.prefixUrl&&typeof this.#t=="string"){if(this.#t.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this.#e.prefixUrl.endsWith("/")||(this.#e.prefixUrl+="/"),this.#t=this.#e.prefixUrl+this.#t}Vo&&uu&&(this.#n=this.#e.signal??this.#t.signal,this.#r=new globalThis.AbortController,this.#e.signal=this.#n?AbortSignal.any([this.#n,this.#r.signal]):this.#r.signal),Un&&(this.#e.duplex="half"),this.#e.json!==void 0&&(this.#e.body=this.#e.stringifyJson?.(this.#e.json)??JSON.stringify(this.#e.json),this.#e.headers.set("content-type",this.#e.headers.get("content-type")??"application/json"));let u=r.headers&&new globalThis.Headers(r.headers).has("content-type");if(this.#t instanceof globalThis.Request&&(Wo&&this.#e.body instanceof globalThis.FormData||this.#e.body instanceof URLSearchParams)&&!u&&this.#e.headers.delete("content-type"),this.request=new globalThis.Request(this.#t,this.#e),iD(this.#e.searchParams)){let s="?"+(typeof this.#e.searchParams=="string"?this.#e.searchParams.replace(/^\?/,""):new URLSearchParams(e.#s(this.#e.searchParams)).toString()),i=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,s);this.request=new globalThis.Request(i,this.#e)}if(this.#e.onUploadProgress){if(typeof this.#e.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Un)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#d(this.request,this.#e.body??void 0)}}#c(){let t=this.#e.retry.delay(this.#u),r=t;this.#e.retry.jitter===!0?r=Math.random()*t:typeof this.#e.retry.jitter=="function"&&(r=this.#e.retry.jitter(t),(!Number.isFinite(r)||r<0)&&(r=t));let u=this.#e.retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(u,r)}async#m(t){if(this.#u++,this.#u>this.#e.retry.limit)throw t;let r=t instanceof Error?t:new Lt(t);if(r instanceof jt)return r.customDelay??this.#c();if(!this.#e.retry.methods.includes(this.request.method.toLowerCase()))throw t;if(this.#e.retry.shouldRetry!==void 0){let u=await this.#e.retry.shouldRetry({error:r,retryCount:this.#u});if(u===!1)throw t;if(u===!0)return this.#c()}if(oD(t)&&!this.#e.retry.retryOnTimeout)throw t;if(sD(t)){if(!this.#e.retry.statusCodes.includes(t.response.status))throw t;let u=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Retry-After")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(u&&this.#e.retry.afterStatusCodes.includes(t.response.status)){let n=Number(u)*1e3;Number.isNaN(n)?n=Date.parse(u)-Date.now():n>=Date.parse("2024-01-01")&&(n-=Date.now());let s=this.#e.retry.maxRetryAfter??n;return n<s?n:s}if(t.response.status===413)throw t}return this.#c()}#p(t){return this.#e.parseJson&&(t.json=async()=>this.#e.parseJson(await t.text())),t}#l(t){t&&t.cancel().catch(()=>{})}#i(t){this.#l(t.body??void 0)}async#h(t){try{return await t()}catch(r){let u=Math.min(await this.#m(r),iu);if(this.#u<1)throw r;if(await Kn(u,this.#n?{signal:this.#n}:{}),r instanceof jt&&r.customRequest){let n=this.#e.signal?new globalThis.Request(r.customRequest,{signal:this.#e.signal}):new globalThis.Request(r.customRequest);this.#f(n)}for(let n of this.#e.hooks.beforeRetry){let s=await n({request:this.request,options:this.#a(),error:r,retryCount:this.#u});if(s instanceof globalThis.Request){this.#f(s);break}if(s instanceof globalThis.Response)return s;if(s===su)return}return this.#h(t)}}async#F(){this.#r?.signal.aborted&&(this.#r=new globalThis.AbortController,this.#e.signal=this.#n?AbortSignal.any([this.#n,this.#r.signal]):this.#r.signal,this.request=new globalThis.Request(this.request,{signal:this.#e.signal}));for(let r of this.#e.hooks.beforeRequest){let u=await r(this.request,this.#a(),{retryCount:this.#u});if(u instanceof Response)return u;if(u instanceof globalThis.Request){this.#f(u);break}}let t=nD(this.request,this.#e);return this.#o=this.request,this.request=this.#o.clone(),this.#e.timeout===!1?this.#e.fetch(this.#o,t):Hn(this.#o,t,this.#r,this.#e)}#a(){if(!this.#D){let{hooks:t,...r}=this.#e;this.#D=Object.freeze(r)}return this.#D}#f(t){this.#D=void 0,this.request=this.#d(t)}#d(t,r){return!this.#e.onUploadProgress||!t.body?t:eD(t,this.#e.onUploadProgress,r??this.#e.body??void 0)}};var Yn=e=>{let t=(r,u)=>fr.create(r,lr(e,u));for(let r of nu)t[r]=(u,n)=>fr.create(u,lr(e,n,{method:r}));return t.create=r=>Yn(lr(r)),t.extend=r=>(typeof r=="function"&&(r=r(e??{})),Yn(lr(e,r))),t.stop=su,t.retry=Yo,t},Gh=Yn(),DD=Gh;var OD=I($D(),1);function Qn(e){let t=(0,OD.default)("npm",{registry:"https://registry.npmjs.org/"}),r=t[`${e}:registry`]||t.config_registry||t.registry;return r.slice(-1)==="/"?r:`${r}/`}var Zc=I(Ba(),1),Qc=I(Xc(),1),Bi=class extends Error{constructor(t){super(`Package \`${t}\` could not be found`),this.name="PackageNotFoundError"}},vi=class extends Error{constructor(t,r){super(`Version \`${r}\` for package \`${t}\` could not be found`),this.name="VersionNotFoundError"}};async function xi(e,t={}){let{version:r="latest"}=t,{omitDeprecated:u=!0}=t,n=e.split("/")[0],s=t.registryUrl??Qn(n),i=new URL(encodeURIComponent(e).replace(/^%40/,"@"),s),o=(0,Zc.default)(s.toString(),{recursive:!0}),c={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};t.fullMetadata&&delete c.accept,o&&(c.authorization=`${o.type} ${o.token}`);let a;try{a=await DD(i,{headers:c,keepalive:!0}).json()}catch(l){throw l?.response?.status===404?new Bi(e):l}if(t.allVersions)return a;let D=new vi(e,r);if(a["dist-tags"][r]){let{time:l}=a;a=a.versions[a["dist-tags"][r]],a.time=l}else if(r){let l=!!a.versions[r];if(u&&!l)for(let[f,h]of Object.entries(a.versions))h.deprecated&&delete a.versions[f];if(!l){let f=Object.keys(a.versions);if(r=Qc.default.maxSatisfying(f,r),!r)throw D}let{time:p}=a;if(a=a.versions[r],a.time=p,!a)throw D}return a}async function Si(e,t){let{version:r}=await xi(e.toLowerCase(),t);return r}var _i=I(require("node:process"),1),CF=_i.default.env.npm_package_json,vu=_i.default.env.npm_config_user_agent,yF=!!vu?.startsWith("npm")||!!CF?.endsWith("package.json"),AF=!!vu?.startsWith("yarn"),v8=!!vu?.startsWith("pnpm"),x8=!!vu?.startsWith("bun"),el=yF||AF;var ll=I(require("node:fs"),1),fl=I(require("node:path"),1),pl=require("node:url");var re=I(require("node:process"),1),ue=I(require("node:path"),1),Su=I(require("node:os"),1),Ar=I(require("node:fs"),1),ol=I(il(),1),wr=re.default.platform==="win32",sl=e=>{try{return ol.default.parse(Ar.default.readFileSync(e,"utf8")).prefix}catch{}},bF=()=>Object.keys(re.default.env).reduce((e,t)=>/^npm_config_prefix$/i.test(t)?re.default.env[t]:e,void 0),wF=()=>{if(wr&&re.default.env.APPDATA)return ue.default.join(re.default.env.APPDATA,"/npm/etc/npmrc");if(re.default.execPath.includes("/Cellar/node")){let e=re.default.execPath.slice(0,re.default.execPath.indexOf("/Cellar/node"));return ue.default.join(e,"/lib/node_modules/npm/npmrc")}if(re.default.execPath.endsWith("/bin/node")){let e=ue.default.dirname(ue.default.dirname(re.default.execPath));return ue.default.join(e,"/etc/npmrc")}},BF=()=>{if(wr){let{APPDATA:e}=re.default.env;return e?ue.default.join(e,"npm"):ue.default.dirname(re.default.execPath)}return ue.default.dirname(ue.default.dirname(re.default.execPath))},vF=()=>{let e=bF();if(e)return e;let t=sl(ue.default.join(Su.default.homedir(),".npmrc"));if(t)return t;if(re.default.env.PREFIX)return re.default.env.PREFIX;let r=sl(wF());return r||BF()},br=ue.default.resolve(vF()),Dl=()=>{if(wr&&re.default.env.LOCALAPPDATA){let e=ue.default.join(re.default.env.LOCALAPPDATA,"Yarn");if(Ar.default.existsSync(e))return e}return!1},xF=()=>{if(re.default.env.PREFIX)return re.default.env.PREFIX;let e=Dl();if(e)return e;let t=ue.default.join(Su.default.homedir(),".config/yarn");if(Ar.default.existsSync(t))return t;let r=ue.default.join(Su.default.homedir(),".yarn-config");return Ar.default.existsSync(r)?r:br},Pe={};Pe.npm={};Pe.npm.prefix=br;Pe.npm.packages=ue.default.join(br,wr?"node_modules":"lib/node_modules");Pe.npm.binaries=wr?br:ue.default.join(br,"bin");var al=ue.default.resolve(xF());Pe.yarn={};Pe.yarn.prefix=al;Pe.yarn.packages=ue.default.join(al,Dl()?"Data/global/node_modules":"global/node_modules");Pe.yarn.binaries=ue.default.join(Pe.yarn.packages,".bin");var Ri=Pe;var _u=I(require("node:path"),1);function $u(e,t){let r=_u.default.relative(t,e);return!!(r&&r!==".."&&!r.startsWith(`..${_u.default.sep}`)&&r!==_u.default.resolve(e))}var _F={},cl=fl.default.dirname((0,pl.fileURLToPath)(_F.url)),SF=(()=>{try{return $u(cl,Ri.yarn.packages)||$u(cl,ll.default.realpathSync(Ri.npm.packages))}catch{return!1}})(),hl=SF;var vr=I(require("node:process"),1);function Ii({onlyFirst:e=!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,e?void 0:"g")}var $F=Ii();function Br(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace($F,"")}function dl(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function ml(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Fl(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function OF(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function El(e,{ambiguousAsWide:t=!1}={}){return OF(e),ml(e)||Fl(e)||t&&dl(e)?2:1}var yl=I(Cl(),1),RF=new Intl.Segmenter,IF=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function Fe(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:u=!1}=t;if(u||(e=Br(e)),e.length===0)return 0;let n=0,s={ambiguousAsWide:!r};for(let{segment:i}of RF.segment(e)){let o=i.codePointAt(0);if(!(o<=31||o>=127&&o<=159)&&!(o>=8203&&o<=8207||o===65279)&&!(o>=768&&o<=879||o>=6832&&o<=6911||o>=7616&&o<=7679||o>=8400&&o<=8447||o>=65056&&o<=65071)&&!(o>=55296&&o<=57343)&&!(o>=65024&&o<=65039)&&!IF.test(i)){if((0,yl.default)().test(i)){n+=2;continue}n+=El(o,s)}}return n}function Ou(e){let t=0;for(let r of e.split(`
44
- `))t=Math.max(t,Fe(r));return t}var Xl=I(Ni(),1);var NF=/[\p{Lu}]/u,PF=/[\p{Ll}]/u,wl=/^[\p{Lu}](?![\p{Lu}])/gu,xl=/([\p{Alpha}\p{N}_]|$)/u,Pi=/[_.\- ]+/,LF=new RegExp("^"+Pi.source),Bl=new RegExp(Pi.source+xl.source,"gu"),vl=new RegExp("\\d+"+xl.source,"gu"),jF=(e,t,r,u)=>{let n=!1,s=!1,i=!1,o=!1;for(let c=0;c<e.length;c++){let a=e[c];o=c>2?e[c-3]==="-":!0,n&&NF.test(a)?(e=e.slice(0,c)+"-"+e.slice(c),n=!1,i=s,s=!0,c++):s&&i&&PF.test(a)&&(!o||u)?(e=e.slice(0,c-1)+"-"+e.slice(c-1),i=s,s=!1,n=!0):(n=t(a)===a&&r(a)!==a,i=s,s=r(a)===a&&t(a)!==a)}return e},kF=(e,t)=>(wl.lastIndex=0,e.replaceAll(wl,r=>t(r))),qF=(e,t)=>(Bl.lastIndex=0,vl.lastIndex=0,e.replaceAll(vl,(r,u,n)=>["_","-"].includes(e.charAt(n+r.length))?r:t(r)).replaceAll(Bl,(r,u)=>t(u)));function Li(e,t){if(!(typeof e=="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},Array.isArray(e)?e=e.map(s=>s.trim()).filter(s=>s.length).join("-"):e=e.trim(),e.length===0)return"";let r=t.locale===!1?s=>s.toLowerCase():s=>s.toLocaleLowerCase(t.locale),u=t.locale===!1?s=>s.toUpperCase():s=>s.toLocaleUpperCase(t.locale);return e.length===1?Pi.test(e)?"":t.pascalCase?u(e):r(e):(e!==r(e)&&(e=jF(e,r,u,t.preserveConsecutiveUppercase)),e=e.replace(LF,""),e=t.preserveConsecutiveUppercase?kF(e,r):r(e),t.pascalCase&&(e=u(e.charAt(0))+e.slice(1)),qF(e,u))}var Ui=I(kl(),1);var ql=(e=0)=>t=>`\x1B[${t+e}m`,Ml=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Ul=(e=0)=>(t,r,u)=>`\x1B[${38+e};2;${t};${r};${u}m`,Y={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},uy=Object.keys(Y.modifier),YF=Object.keys(Y.color),JF=Object.keys(Y.bgColor),ny=[...YF,...JF];function zF(){let e=new Map;for(let[t,r]of Object.entries(Y)){for(let[u,n]of Object.entries(r))Y[u]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[u]=Y[u],e.set(n[0],n[1]);Object.defineProperty(Y,t,{value:r,enumerable:!1})}return Object.defineProperty(Y,"codes",{value:e,enumerable:!1}),Y.color.close="\x1B[39m",Y.bgColor.close="\x1B[49m",Y.color.ansi=ql(),Y.color.ansi256=Ml(),Y.color.ansi16m=Ul(),Y.bgColor.ansi=ql(10),Y.bgColor.ansi256=Ml(10),Y.bgColor.ansi16m=Ul(10),Object.defineProperties(Y,{rgbToAnsi256:{value(t,r,u){return t===r&&r===u?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(u/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[u]=r;u.length===3&&(u=[...u].map(s=>s+s).join(""));let n=Number.parseInt(u,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>Y.rgbToAnsi256(...Y.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,u,n;if(t>=232)r=((t-232)*10+8)/255,u=r,n=r;else{t-=16;let o=t%36;r=Math.floor(t/36)/5,u=Math.floor(o/6)/5,n=o%6/5}let s=Math.max(r,u,n)*2;if(s===0)return 30;let i=30+(Math.round(n)<<2|Math.round(u)<<1|Math.round(r));return s===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(t,r,u)=>Y.ansi256ToAnsi(Y.rgbToAnsi256(t,r,u)),enumerable:!1},hexToAnsi:{value:t=>Y.ansi256ToAnsi(Y.hexToAnsi256(t)),enumerable:!1}}),Y}var XF=zF(),Vl=XF;var Iu=new Set(["\x1B","\x9B"]),ZF=39,Mi="\x07",Hl="[",QF="]",Kl="m",Ru=`${QF}8;;`,Gl=e=>`${Iu.values().next().value}${Hl}${e}${Kl}`,Wl=e=>`${Iu.values().next().value}${Ru}${e}${Mi}`,eE=e=>e.split(" ").map(t=>Fe(t)),qi=(e,t,r)=>{let u=[...t],n=!1,s=!1,i=Fe(Br(e.at(-1)));for(let[o,c]of u.entries()){let a=Fe(c);if(i+a<=r?e[e.length-1]+=c:(e.push(c),i=0),Iu.has(c)&&(n=!0,s=u.slice(o+1,o+1+Ru.length).join("")===Ru),n){s?c===Mi&&(n=!1,s=!1):c===Kl&&(n=!1);continue}i+=a,i===r&&o<u.length-1&&(e.push(""),i=0)}!i&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},tE=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(Fe(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},rE=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let u="",n,s,i=eE(e),o=[""];for(let[l,p]of e.split(" ").entries()){r.trim!==!1&&(o[o.length-1]=o.at(-1).trimStart());let f=Fe(o.at(-1));if(l!==0&&(f>=t&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),f=0),(f>0||r.trim===!1)&&(o[o.length-1]+=" ",f++)),r.hard&&i[l]>t){let h=t-f,m=1+Math.floor((i[l]-h-1)/t);Math.floor((i[l]-1)/t)<m&&o.push(""),qi(o,p,t);continue}if(f+i[l]>t&&f>0&&i[l]>0){if(r.wordWrap===!1&&f<t){qi(o,p,t);continue}o.push("")}if(f+i[l]>t&&r.wordWrap===!1){qi(o,p,t);continue}o[o.length-1]+=p}r.trim!==!1&&(o=o.map(l=>tE(l)));let c=o.join(`
45
- `),a=[...c],D=0;for(let[l,p]of a.entries()){if(u+=p,Iu.has(p)){let{groups:h}=new RegExp(`(?:\\${Hl}(?<code>\\d+)m|\\${Ru}(?<uri>.*)${Mi})`).exec(c.slice(D))||{groups:{}};if(h.code!==void 0){let m=Number.parseFloat(h.code);n=m===ZF?void 0:m}else h.uri!==void 0&&(s=h.uri.length===0?void 0:h.uri)}let f=Vl.codes.get(Number(n));a[l+1]===`
46
- `?(s&&(u+=Wl("")),n&&f&&(u+=Gl(f))):p===`
47
- `&&(n&&f&&(u+=Gl(n)),s&&(u+=Wl(s))),D+=p.length}return u};function Tu(e,t,r){return String(e).normalize().replaceAll(`\r
48
- `,`
20
+ `),this.outputHelp({error:!0}));let n=t||{},u=n.exitCode||1,s=n.code||"commander.error";this._exit(u,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in $.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,$.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new mr(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(u=>!t(u)).forEach(u=>{this.setOptionValueWithSource(u,n.implied[u],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let n=r=>{let o=r.attributeName(),a=this.getOptionValue(o),l=this.options.find(p=>p.negate&&o===p.attributeName()),c=this.options.find(p=>!p.negate&&o===p.attributeName());return l&&(l.presetArg===void 0&&a===!1||l.presetArg!==void 0&&a===l.presetArg)?l:c||r},u=r=>{let o=n(r),a=o.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${o.envVar}'`:`option '${o.flags}'`},s=`error: ${u(e)} cannot be used with ${u(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let u=[],s=this;do{let r=s.createHelp().visibleOptions(s).filter(o=>o.long).map(o=>o.long);u=u.concat(r),s=s.parent}while(s&&!s._enablePositionalOptions);t=Nt(e,u)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let u=[];this.createHelp().visibleCommands(this).forEach(s=>{u.push(s.name()),s.alias()&&u.push(s.alias())}),t=Nt(e,u)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let u=this.createOption(t,n);return this._versionOptionName=u.attributeName(),this._registerOption(u),this.on("option:"+u.name(),()=>{this._outputConfiguration.writeOut(`${e}
21
+ `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let u=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${u}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(n=>hr(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=H.basename(e,H.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp();return t.helpWidth===void 0&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){e=e||{};let t={error:!!e.error},n;return t.error?n=u=>this._outputConfiguration.writeErr(u):n=u=>this._outputConfiguration.writeOut(u),t.write=e.write||n,t.command=this,t}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let n=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let u=this.helpInformation(n);if(t&&(u=t(u),typeof u!="string"&&!Buffer.isBuffer(u)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(u),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",n))}helpOption(e,t){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=$.exitCode||0;t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
22
+ Expecting one of '${n.join("', '")}'`);let u=`${e}Help`;return this.on(u,s=>{let r;typeof t=="function"?r=t({error:s.error,command:s.command}):r=t,r&&s.write(`${r}
23
+ `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(u=>t.is(u))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Ut(i){return i.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",u="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?u=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],n=s[3],u=s[4]),t&&u!=="0"?`${t}=${n}:${parseInt(u)+1}`:e})}qt.Command=ot});var Kt=q(S=>{var{Argument:Ht}=ve(),{Command:at}=Lt(),{CommanderError:fr,InvalidArgumentError:Wt}=fe(),{Help:gr}=Xe(),{Option:Gt}=rt();S.program=new at;S.createCommand=i=>new at(i);S.createOption=(i,e)=>new Gt(i,e);S.createArgument=(i,e)=>new Ht(i,e);S.Command=at;S.Option=Gt;S.Argument=Ht;S.Help=gr;S.CommanderError=fr;S.InvalidArgumentError=Wt;S.InvalidOptionArgumentError=Wt});var lt=q((ou,zt)=>{"use strict";var Dt={to(i,e){return e?`\x1B[${e+1};${i+1}H`:`\x1B[${i+1}G`},move(i,e){let t="";return i<0?t+=`\x1B[${-i}D`:i>0&&(t+=`\x1B[${i}C`),e<0?t+=`\x1B[${-e}A`:e>0&&(t+=`\x1B[${e}B`),t},up:(i=1)=>`\x1B[${i}A`,down:(i=1)=>`\x1B[${i}B`,forward:(i=1)=>`\x1B[${i}C`,backward:(i=1)=>`\x1B[${i}D`,nextLine:(i=1)=>"\x1B[E".repeat(i),prevLine:(i=1)=>"\x1B[F".repeat(i),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},Cr={up:(i=1)=>"\x1B[S".repeat(i),down:(i=1)=>"\x1B[T".repeat(i)},Fr={screen:"\x1B[2J",up:(i=1)=>"\x1B[1J".repeat(i),down:(i=1)=>"\x1B[J".repeat(i),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(i){let e="";for(let t=0;t<i;t++)e+=this.line+(t<i-1?Dt.up():"");return i&&(e+=Dt.left),e}};zt.exports={cursor:Dt,scroll:Cr,erase:Fr,beep:"\x07"}});var pt=q((au,ct)=>{var Be=process||{},Yt=Be.argv||[],xe=Be.env||{},Er=!(xe.NO_COLOR||Yt.includes("--no-color"))&&(!!xe.FORCE_COLOR||Yt.includes("--color")||Be.platform==="win32"||(Be.stdout||{}).isTTY&&xe.TERM!=="dumb"||!!xe.CI),br=(i,e,t=i)=>n=>{let u=""+n,s=u.indexOf(e,i.length);return~s?i+Ar(u,e,t,s)+e:i+u+e},Ar=(i,e,t,n)=>{let u="",s=0;do u+=i.substring(s,n)+t,s=n+e.length,n=i.indexOf(e,s);while(~n);return u+i.substring(s)},Zt=(i=Er)=>{let e=i?br:()=>String;return{isColorSupported:i,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};ct.exports=Zt();ct.exports.createColors=Zt});var Jt=L(Kt(),1),{program:Yn,createCommand:Zn,createArgument:Qn,createOption:Xn,CommanderError:eu,InvalidArgumentError:tu,InvalidOptionArgumentError:iu,Command:X,Argument:ru,Option:nu,Help:uu}=Jt.default;var Ji=L(require("update-notifier"),1);var v=L(lt(),1),De=require("node:process"),ee=L(require("node:readline"),1),mt=L(require("node:readline"),1),ai=require("node:tty"),re=L(pt(),1);function $r({onlyFirst:i=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,i?void 0:"g")}var yr=$r();function Di(i){if(typeof i!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof i}\``);return i.replace(yr,"")}function li(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var ci={exports:{}};(function(i){var e={};i.exports=e,e.eastAsianWidth=function(n){var u=n.charCodeAt(0),s=n.length==2?n.charCodeAt(1):0,r=u;return 55296<=u&&u<=56319&&56320<=s&&s<=57343&&(u&=1023,s&=1023,r=u<<10|s,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?"F":r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?"H":4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?"W":32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?"Na":r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?"A":"N"},e.characterLength=function(n){var u=this.eastAsianWidth(n);return u=="F"||u=="W"||u=="A"?2:1};function t(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var u=t(n),s=0,r=0;r<u.length;r++)s=s+this.characterLength(u[r]);return s},e.slice=function(n,u,s){textLen=e.length(n),u=u||0,s=s||1,u<0&&(u=textLen+u),s<0&&(s=textLen+s);for(var r="",o=0,a=t(n),l=0;l<a.length;l++){var c=a[l],p=e.length(c);if(o>=u-(p==2?1:0))if(o+p<=s)r+=c;else break;o+=p}return r}})(ci);var wr=ci.exports,_r=li(wr),vr=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},xr=li(vr);function ge(i,e={}){if(typeof i!="string"||i.length===0||(e={ambiguousIsNarrow:!0,...e},i=Di(i),i.length===0))return 0;i=i.replace(xr()," ");let t=e.ambiguousIsNarrow?1:2,n=0;for(let u of i){let s=u.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(_r.eastAsianWidth(u)){case"F":case"W":n+=2;break;case"A":n+=t;break;default:n+=1}}return n}var ht=10,Qt=(i=0)=>e=>`\x1B[${e+i}m`,Xt=(i=0)=>e=>`\x1B[${38+i};5;${e}m`,ei=(i=0)=>(e,t,n)=>`\x1B[${38+i};2;${e};${t};${n}m`,A={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]}};Object.keys(A.modifier);var Br=Object.keys(A.color),Or=Object.keys(A.bgColor);[...Br,...Or];function Sr(){let i=new Map;for(let[e,t]of Object.entries(A)){for(let[n,u]of Object.entries(t))A[n]={open:`\x1B[${u[0]}m`,close:`\x1B[${u[1]}m`},t[n]=A[n],i.set(u[0],u[1]);Object.defineProperty(A,e,{value:t,enumerable:!1})}return Object.defineProperty(A,"codes",{value:i,enumerable:!1}),A.color.close="\x1B[39m",A.bgColor.close="\x1B[49m",A.color.ansi=Qt(),A.color.ansi256=Xt(),A.color.ansi16m=ei(),A.bgColor.ansi=Qt(ht),A.bgColor.ansi256=Xt(ht),A.bgColor.ansi16m=ei(ht),Object.defineProperties(A,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(s=>s+s).join(""));let u=Number.parseInt(n,16);return[u>>16&255,u>>8&255,u&255]},enumerable:!1},hexToAnsi256:{value:e=>A.rgbToAnsi256(...A.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,u;if(e>=232)t=((e-232)*10+8)/255,n=t,u=t;else{e-=16;let o=e%36;t=Math.floor(e/36)/5,n=Math.floor(o/6)/5,u=o%6/5}let s=Math.max(t,n,u)*2;if(s===0)return 30;let r=30+(Math.round(u)<<2|Math.round(n)<<1|Math.round(t));return s===2&&(r+=60),r},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>A.ansi256ToAnsi(A.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>A.ansi256ToAnsi(A.hexToAnsi256(e)),enumerable:!1}}),A}var Pr=Sr(),ke=new Set(["\x1B","\x9B"]),Ir=39,ft="\x07",pi="[",kr="]",hi="m",gt=`${kr}8;;`,ti=i=>`${ke.values().next().value}${pi}${i}${hi}`,ii=i=>`${ke.values().next().value}${gt}${i}${ft}`,jr=i=>i.split(" ").map(e=>ge(e)),dt=(i,e,t)=>{let n=[...e],u=!1,s=!1,r=ge(Di(i[i.length-1]));for(let[o,a]of n.entries()){let l=ge(a);if(r+l<=t?i[i.length-1]+=a:(i.push(a),r=0),ke.has(a)&&(u=!0,s=n.slice(o+1).join("").startsWith(gt)),u){s?a===ft&&(u=!1,s=!1):a===hi&&(u=!1);continue}r+=l,r===t&&o<n.length-1&&(i.push(""),r=0)}!r&&i[i.length-1].length>0&&i.length>1&&(i[i.length-2]+=i.pop())},Rr=i=>{let e=i.split(" "),t=e.length;for(;t>0&&!(ge(e[t-1])>0);)t--;return t===e.length?i:e.slice(0,t).join(" ")+e.slice(t).join("")},Tr=(i,e,t={})=>{if(t.trim!==!1&&i.trim()==="")return"";let n="",u,s,r=jr(i),o=[""];for(let[l,c]of i.split(" ").entries()){t.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let p=ge(o[o.length-1]);if(l!==0&&(p>=e&&(t.wordWrap===!1||t.trim===!1)&&(o.push(""),p=0),(p>0||t.trim===!1)&&(o[o.length-1]+=" ",p++)),t.hard&&r[l]>e){let m=e-p,C=1+Math.floor((r[l]-m-1)/e);Math.floor((r[l]-1)/e)<C&&o.push(""),dt(o,c,e);continue}if(p+r[l]>e&&p>0&&r[l]>0){if(t.wordWrap===!1&&p<e){dt(o,c,e);continue}o.push("")}if(p+r[l]>e&&t.wordWrap===!1){dt(o,c,e);continue}o[o.length-1]+=c}t.trim!==!1&&(o=o.map(l=>Rr(l)));let a=[...o.join(`
24
+ `)];for(let[l,c]of a.entries()){if(n+=c,ke.has(c)){let{groups:m}=new RegExp(`(?:\\${pi}(?<code>\\d+)m|\\${gt}(?<uri>.*)${ft})`).exec(a.slice(l).join(""))||{groups:{}};if(m.code!==void 0){let C=Number.parseFloat(m.code);u=C===Ir?void 0:C}else m.uri!==void 0&&(s=m.uri.length===0?void 0:m.uri)}let p=Pr.codes.get(Number(u));a[l+1]===`
25
+ `?(s&&(n+=ii("")),u&&p&&(n+=ti(p))):c===`
26
+ `&&(u&&p&&(n+=ti(u)),s&&(n+=ii(s)))}return n};function ri(i,e,t){return String(i).normalize().replace(/\r\n/g,`
49
27
  `).split(`
50
- `).map(u=>rE(u,t,r)).join(`
51
- `)}var lE=I(Ni(),1),ut=`
52
- `,ye=" ",xr="none",Zl=()=>{let{env:e,stdout:t,stderr:r}=vr.default;return t?.columns?t.columns:r?.columns?r.columns:e.COLUMNS?Number.parseInt(e.COLUMNS,10):80},Yl=e=>typeof e=="number"?{top:e,right:e*3,bottom:e,left:e*3}:{top:0,right:0,bottom:0,left:0,...e},Sr=e=>e===xr?0:2,uE=e=>{let t=["topLeft","topRight","bottomRight","bottomLeft","left","right","top","bottom"],r;if(e===xr){e={};for(let u of t)e[u]=""}if(typeof e=="string"){if(r=Xl.default[e],!r)throw new TypeError(`Invalid border style: ${e}`)}else{typeof e?.vertical=="string"&&(e.left=e.vertical,e.right=e.vertical),typeof e?.horizontal=="string"&&(e.top=e.horizontal,e.bottom=e.horizontal);for(let u of t)if(e[u]===null||typeof e[u]!="string")throw new TypeError(`Invalid border style: ${u}`);r=e}return r},nE=(e,t,r)=>{let u="",n=Fe(e);switch(r){case"left":{u=e+t.slice(n);break}case"right":{u=t.slice(n)+e;break}default:{t=t.slice(n),t.length%2===1?(t=t.slice(Math.floor(t.length/2)),u=t.slice(1)+e+t):(t=t.slice(t.length/2),u=t+e+t);break}}return u},iE=(e,{padding:t,width:r,textAlignment:u,height:n})=>{e=(0,Ui.default)(e,{align:u});let s=e.split(ut),i=Ou(e),o=r-t.left-t.right;if(i>o){let D=[];for(let l of s){let p=Tu(l,o,{hard:!0}),h=(0,Ui.default)(p,{align:u}).split(`
53
- `),m=Math.max(...h.map(F=>Fe(F)));for(let F of h){let g;switch(u){case"center":{g=ye.repeat((o-m)/2)+F;break}case"right":{g=ye.repeat(o-m)+F;break}default:{g=F;break}}D.push(g)}}s=D}u==="center"&&i<o?s=s.map(D=>ye.repeat((o-i)/2)+D):u==="right"&&i<o&&(s=s.map(D=>ye.repeat(o-i)+D));let c=ye.repeat(t.left),a=ye.repeat(t.right);return s=s.map(D=>{let l=c+D+a;return l+ye.repeat(r-Fe(l))}),t.top>0&&(s=[...Array.from({length:t.top}).fill(ye.repeat(r)),...s]),t.bottom>0&&(s=[...s,...Array.from({length:t.bottom}).fill(ye.repeat(r))]),n&&s.length>n?s=s.slice(0,n):n&&s.length<n&&(s=[...s,...Array.from({length:n-s.length}).fill(ye.repeat(r))]),s.join(ut)},sE=(e,t,r)=>{let u=D=>{let l=r.borderColor?aE(r.borderColor)(D):D;return r.dimBorder?he.dim(l):l},n=D=>r.backgroundColor?cE(r.backgroundColor)(D):D,s=uE(r.borderStyle),i=Zl(),o=ye.repeat(r.margin.left);if(r.float==="center"){let D=Math.max((i-t-Sr(r.borderStyle))/2,0);o=ye.repeat(D)}else if(r.float==="right"){let D=Math.max(i-t-r.margin.right-Sr(r.borderStyle),0);o=ye.repeat(D)}let c="";r.margin.top&&(c+=ut.repeat(r.margin.top)),(r.borderStyle!==xr||r.title)&&(c+=u(o+s.topLeft+(r.title?nE(r.title,s.top.repeat(t),r.titleAlignment):s.top.repeat(t))+s.topRight)+ut);let a=e.split(ut);return c+=a.map(D=>o+u(s.left)+n(D)+u(s.right)).join(ut),r.borderStyle!==xr&&(c+=ut+u(o+s.bottomLeft+s.bottom.repeat(t)+s.bottomRight)),r.margin.bottom&&(c+=ut.repeat(r.margin.bottom)),c},oE=e=>{if(e.fullscreen&&vr.default?.stdout){let t=[vr.default.stdout.columns,vr.default.stdout.rows];typeof e.fullscreen=="function"&&(t=e.fullscreen(...t)),e.width||=t[0],e.height||=t[1]}return e.width&&=Math.max(1,e.width-Sr(e.borderStyle)),e.height&&=Math.max(1,e.height-Sr(e.borderStyle)),e},Jl=(e,t)=>t===xr?e:` ${e} `,DE=(e,t)=>{t=oE(t);let r=t.width!==void 0,u=Zl(),n=Sr(t.borderStyle),s=u-t.margin.left-t.margin.right-n,i=Ou(Tu(e,u-n,{hard:!0,trim:!1}))+t.padding.left+t.padding.right;if(t.title&&r?(t.title=t.title.slice(0,Math.max(0,t.width-2)),t.title&&=Jl(t.title,t.borderStyle)):t.title&&(t.title=t.title.slice(0,Math.max(0,s-2)),t.title&&(t.title=Jl(t.title,t.borderStyle),Fe(t.title)>i&&(t.width=Fe(t.title)))),t.width||=i,!r){if(t.margin.left&&t.margin.right&&t.width>s){let c=(u-t.width-n)/(t.margin.left+t.margin.right);t.margin.left=Math.max(0,Math.floor(t.margin.left*c)),t.margin.right=Math.max(0,Math.floor(t.margin.right*c))}t.width=Math.min(t.width,u-n-t.margin.left-t.margin.right)}return t.width-(t.padding.left+t.padding.right)<=0&&(t.padding.left=0,t.padding.right=0),t.height&&t.height-(t.padding.top+t.padding.bottom)<=0&&(t.padding.top=0,t.padding.bottom=0),t},Vi=e=>e.match(/^#(?:[0-f]{3}){1,2}$/i),zl=e=>typeof e=="string"&&(he[e]??Vi(e)),aE=e=>Vi(e)?he.hex(e):he[e],cE=e=>Vi(e)?he.bgHex(e):he[Li(["bg",e])];function Nu(e,t){if(t={padding:0,borderStyle:"single",dimBorder:!1,textAlignment:"left",float:"left",titleAlignment:"left",...t},t.align&&(t.textAlignment=t.align),t.borderColor&&!zl(t.borderColor))throw new Error(`${t.borderColor} is not a valid borderColor`);if(t.backgroundColor&&!zl(t.backgroundColor))throw new Error(`${t.backgroundColor} is not a valid backgroundColor`);return t.padding=Yl(t.padding),t.margin=Yl(t.margin),t=DE(e,t),e=iE(e,t),sE(e,t.width,t)}var Wt=require("node:process"),fE=Wt.env.CI!=="0"&&Wt.env.CI!=="false"&&("CI"in Wt.env||"CONTINUOUS_INTEGRATION"in Wt.env||Object.keys(Wt.env).some(e=>e.startsWith("CI_"))),Ql=fE;var ef=e=>e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;");function tf(e,...t){if(typeof e=="string")return ef(e);let r=e[0];for(let[u,n]of t.entries())r=r+ef(String(n))+e[u+1];return r}var Gi=class extends Error{constructor(t){super(`Missing a value for ${t?`the placeholder: ${t}`:"a placeholder"}`,t),this.name="MissingValueError",this.key=t}},Wi=class extends Error{constructor(t){super(`Missing filter: ${t}`),this.name="MissingFilterError",this.filterName=t}};function Hi(e,t,{ignoreMissing:r=!1,transform:u=({value:s})=>s,filters:n={}}={}){if(typeof e!="string")throw new TypeError(`Expected a \`string\` in the first argument, got \`${typeof e}\``);if(typeof t!="object")throw new TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof t}\``);let s="\uE000\uE001\uE002",i="\uE003\uE004\uE005";e=e.replace(/\\{/g,s),e=e.replace(/\\}/g,i);let o=h=>{let m=[],F="";for(let g=0;g<h.length;g++)h[g]==="\\"&&h[g+1]==="."?(F+=".",g++):h[g]==="."?(m.push(F),F=""):F+=h[g];return m.push(F),m},c=(h,m)=>{let F=m.split("|").map(L=>L.trim()),g=F[0],$=F.slice(1),v=o(g),w=t;for(let L of v)w&&(w=w[L]);for(let L of $){let N=n[L];if(!N){if(r)return h;throw new Wi(L)}w!==void 0&&(w=N(w))}let V=u({value:w,key:g});if(V===void 0){if(r)return h;throw new Gi(g)}return String(V)},l="((\\d+|[a-z$_][\\w\\-.$\\\\]*)\\s*(?:\\|\\s*[a-z$_][\\w$]*\\s*)*)",p=new RegExp(`{{${l}}}`,"gi"),f=new RegExp(`{${l}}`,"gi");return e=e.replace(p,(...h)=>tf(c(...h))),e=e.replace(f,c),e=e.replace(new RegExp(s,"g"),"{"),e=e.replace(new RegExp(i,"g"),"}"),e}var dE={},pE=Ki.default.dirname((0,uf.fileURLToPath)(dE.url)),hE=1e3*60*60*24,_r=class{config;update;_packageName;_shouldNotifyInNpmScript;#s;#r;#u;#t;constructor(t={}){if(this.#s=t,t.pkg??={},t.distTag??="latest",t.pkg={name:t.pkg.name??t.packageName,version:t.pkg.version??t.packageVersion},!t.pkg.name||!t.pkg.version)throw new Error("pkg.name and pkg.version required");if(this._packageName=t.pkg.name,this.#r=t.pkg.version,this.#u=typeof t.updateCheckInterval=="number"?t.updateCheckInterval:hE,this.#t="NO_UPDATE_NOTIFIER"in nt.default.env||nt.default.env.NODE_ENV==="test"||nt.default.argv.includes("--no-update-notifier")||Ql,this._shouldNotifyInNpmScript=t.shouldNotifyInNpmScript,!this.#t)try{this.config=new ir(`update-notifier-${this._packageName}`,{optOut:!1,lastUpdateCheck:Date.now()})}catch{let r=he.yellow((0,Pu.format)(" %s update check failed ",t.pkg.name))+(0,Pu.format)(`
54
- Try running with %s or get access `,he.cyan("sudo"))+`
55
- to the local update config store via
56
- `+he.cyan((0,Pu.format)(" sudo chown -R $USER:$(id -gn $USER) %s ",Ot));nt.default.on("exit",()=>{console.error(Nu(r,{textAlignment:"center"}))})}}check(){!this.config||this.config.get("optOut")||this.#t||(this.update=this.config.get("update"),this.update&&(this.update.current=this.#r,this.config.delete("update")),!(Date.now()-this.config.get("lastUpdateCheck")<this.#u)&&(0,rf.spawn)(nt.default.execPath,[Ki.default.join(pE,"check.js"),JSON.stringify(this.#s)],{detached:!0,stdio:"ignore"}).unref())}async fetchInfo(){let{distTag:t}=this.#s,r=await Si(this._packageName,{version:t});return{latest:r,current:this.#r,type:(0,nf.default)(this.#r,r)??t,name:this._packageName}}notify(t){let r=!this._shouldNotifyInNpmScript&&el;if(!nt.default.stdout.isTTY||r||!this.update||!(0,sf.default)(this.update.latest,this.update.current))return this;t={isGlobal:hl,...t};let u=t.isGlobal?`npm i -g ${this._packageName}`:`npm i ${this._packageName}`,n="Update available "+he.dim("{currentVersion}")+he.reset(" \u2192 ")+he.green("{latestVersion}")+`
57
- Run `+he.cyan("{updateCommand}")+" to update",s=t.message||n;t.boxenOptions??={padding:1,margin:1,textAlignment:"center",borderColor:"yellow",borderStyle:"round"};let i=Nu(Hi(s,{packageName:this._packageName,currentVersion:this.update.current,latestVersion:this.update.latest,updateCommand:u}),t.boxenOptions);return t.defer===!1?console.error(i):nt.default.on("exit",()=>{console.error(i)}),this}};function Yi(e){let t=new _r(e);return t.check(),t}var pe=I(zi(),1),Ht=require("node:process"),it=I(require("node:readline"),1),ts=I(require("node:readline"),1),Cf=require("node:tty"),wt=I(Zi(),1);function yE({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var AE=yE();function yf(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(AE,"")}function Af(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bf={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(u){var n=u.charCodeAt(0),s=u.length==2?u.charCodeAt(1):0,i=n;return 55296<=n&&n<=56319&&56320<=s&&s<=57343&&(n&=1023,s&=1023,i=n<<10|s,i+=65536),i==12288||65281<=i&&i<=65376||65504<=i&&i<=65510?"F":i==8361||65377<=i&&i<=65470||65474<=i&&i<=65479||65482<=i&&i<=65487||65490<=i&&i<=65495||65498<=i&&i<=65500||65512<=i&&i<=65518?"H":4352<=i&&i<=4447||4515<=i&&i<=4519||4602<=i&&i<=4607||9001<=i&&i<=9002||11904<=i&&i<=11929||11931<=i&&i<=12019||12032<=i&&i<=12245||12272<=i&&i<=12283||12289<=i&&i<=12350||12353<=i&&i<=12438||12441<=i&&i<=12543||12549<=i&&i<=12589||12593<=i&&i<=12686||12688<=i&&i<=12730||12736<=i&&i<=12771||12784<=i&&i<=12830||12832<=i&&i<=12871||12880<=i&&i<=13054||13056<=i&&i<=19903||19968<=i&&i<=42124||42128<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||55216<=i&&i<=55238||55243<=i&&i<=55291||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65106||65108<=i&&i<=65126||65128<=i&&i<=65131||110592<=i&&i<=110593||127488<=i&&i<=127490||127504<=i&&i<=127546||127552<=i&&i<=127560||127568<=i&&i<=127569||131072<=i&&i<=194367||177984<=i&&i<=196605||196608<=i&&i<=262141?"W":32<=i&&i<=126||162<=i&&i<=163||165<=i&&i<=166||i==172||i==175||10214<=i&&i<=10221||10629<=i&&i<=10630?"Na":i==161||i==164||167<=i&&i<=168||i==170||173<=i&&i<=174||176<=i&&i<=180||182<=i&&i<=186||188<=i&&i<=191||i==198||i==208||215<=i&&i<=216||222<=i&&i<=225||i==230||232<=i&&i<=234||236<=i&&i<=237||i==240||242<=i&&i<=243||247<=i&&i<=250||i==252||i==254||i==257||i==273||i==275||i==283||294<=i&&i<=295||i==299||305<=i&&i<=307||i==312||319<=i&&i<=322||i==324||328<=i&&i<=331||i==333||338<=i&&i<=339||358<=i&&i<=359||i==363||i==462||i==464||i==466||i==468||i==470||i==472||i==474||i==476||i==593||i==609||i==708||i==711||713<=i&&i<=715||i==717||i==720||728<=i&&i<=731||i==733||i==735||768<=i&&i<=879||913<=i&&i<=929||931<=i&&i<=937||945<=i&&i<=961||963<=i&&i<=969||i==1025||1040<=i&&i<=1103||i==1105||i==8208||8211<=i&&i<=8214||8216<=i&&i<=8217||8220<=i&&i<=8221||8224<=i&&i<=8226||8228<=i&&i<=8231||i==8240||8242<=i&&i<=8243||i==8245||i==8251||i==8254||i==8308||i==8319||8321<=i&&i<=8324||i==8364||i==8451||i==8453||i==8457||i==8467||i==8470||8481<=i&&i<=8482||i==8486||i==8491||8531<=i&&i<=8532||8539<=i&&i<=8542||8544<=i&&i<=8555||8560<=i&&i<=8569||i==8585||8592<=i&&i<=8601||8632<=i&&i<=8633||i==8658||i==8660||i==8679||i==8704||8706<=i&&i<=8707||8711<=i&&i<=8712||i==8715||i==8719||i==8721||i==8725||i==8730||8733<=i&&i<=8736||i==8739||i==8741||8743<=i&&i<=8748||i==8750||8756<=i&&i<=8759||8764<=i&&i<=8765||i==8776||i==8780||i==8786||8800<=i&&i<=8801||8804<=i&&i<=8807||8810<=i&&i<=8811||8814<=i&&i<=8815||8834<=i&&i<=8835||8838<=i&&i<=8839||i==8853||i==8857||i==8869||i==8895||i==8978||9312<=i&&i<=9449||9451<=i&&i<=9547||9552<=i&&i<=9587||9600<=i&&i<=9615||9618<=i&&i<=9621||9632<=i&&i<=9633||9635<=i&&i<=9641||9650<=i&&i<=9651||9654<=i&&i<=9655||9660<=i&&i<=9661||9664<=i&&i<=9665||9670<=i&&i<=9672||i==9675||9678<=i&&i<=9681||9698<=i&&i<=9701||i==9711||9733<=i&&i<=9734||i==9737||9742<=i&&i<=9743||9748<=i&&i<=9749||i==9756||i==9758||i==9792||i==9794||9824<=i&&i<=9825||9827<=i&&i<=9829||9831<=i&&i<=9834||9836<=i&&i<=9837||i==9839||9886<=i&&i<=9887||9918<=i&&i<=9919||9924<=i&&i<=9933||9935<=i&&i<=9953||i==9955||9960<=i&&i<=9983||i==10045||i==10071||10102<=i&&i<=10111||11093<=i&&i<=11097||12872<=i&&i<=12879||57344<=i&&i<=63743||65024<=i&&i<=65039||i==65533||127232<=i&&i<=127242||127248<=i&&i<=127277||127280<=i&&i<=127337||127344<=i&&i<=127386||917760<=i&&i<=917999||983040<=i&&i<=1048573||1048576<=i&&i<=1114109?"A":"N"},t.characterLength=function(u){var n=this.eastAsianWidth(u);return n=="F"||n=="W"||n=="A"?2:1};function r(u){return u.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(u){for(var n=r(u),s=0,i=0;i<n.length;i++)s=s+this.characterLength(n[i]);return s},t.slice=function(u,n,s){textLen=t.length(u),n=n||0,s=s||1,n<0&&(n=textLen+n),s<0&&(s=textLen+s);for(var i="",o=0,c=r(u),a=0;a<c.length;a++){var D=c[a],l=t.length(D);if(o>=n-(l==2?1:0))if(o+l<=s)i+=D;else break;o+=l}return i}})(bf);var bE=bf.exports,wE=Af(bE),BE=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},vE=Af(BE);function $r(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=yf(e),e.length===0))return 0;e=e.replace(vE()," ");let r=t.ambiguousIsNarrow?1:2,u=0;for(let n of e){let s=n.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(wE.eastAsianWidth(n)){case"F":case"W":u+=2;break;case"A":u+=r;break;default:u+=1}}return u}var Qi=10,cf=(e=0)=>t=>`\x1B[${t+e}m`,lf=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,ff=(e=0)=>(t,r,u)=>`\x1B[${38+e};2;${t};${r};${u}m`,J={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]}};Object.keys(J.modifier);var xE=Object.keys(J.color),SE=Object.keys(J.bgColor);[...xE,...SE];function _E(){let e=new Map;for(let[t,r]of Object.entries(J)){for(let[u,n]of Object.entries(r))J[u]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[u]=J[u],e.set(n[0],n[1]);Object.defineProperty(J,t,{value:r,enumerable:!1})}return Object.defineProperty(J,"codes",{value:e,enumerable:!1}),J.color.close="\x1B[39m",J.bgColor.close="\x1B[49m",J.color.ansi=cf(),J.color.ansi256=lf(),J.color.ansi16m=ff(),J.bgColor.ansi=cf(Qi),J.bgColor.ansi256=lf(Qi),J.bgColor.ansi16m=ff(Qi),Object.defineProperties(J,{rgbToAnsi256:{value:(t,r,u)=>t===r&&r===u?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(u/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[u]=r;u.length===3&&(u=[...u].map(s=>s+s).join(""));let n=Number.parseInt(u,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>J.rgbToAnsi256(...J.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,u,n;if(t>=232)r=((t-232)*10+8)/255,u=r,n=r;else{t-=16;let o=t%36;r=Math.floor(t/36)/5,u=Math.floor(o/6)/5,n=o%6/5}let s=Math.max(r,u,n)*2;if(s===0)return 30;let i=30+(Math.round(n)<<2|Math.round(u)<<1|Math.round(r));return s===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(t,r,u)=>J.ansi256ToAnsi(J.rgbToAnsi256(t,r,u)),enumerable:!1},hexToAnsi:{value:t=>J.ansi256ToAnsi(J.hexToAnsi256(t)),enumerable:!1}}),J}var $E=_E(),Vu=new Set(["\x1B","\x9B"]),OE=39,rs="\x07",wf="[",RE="]",Bf="m",us=`${RE}8;;`,pf=e=>`${Vu.values().next().value}${wf}${e}${Bf}`,hf=e=>`${Vu.values().next().value}${us}${e}${rs}`,IE=e=>e.split(" ").map(t=>$r(t)),es=(e,t,r)=>{let u=[...t],n=!1,s=!1,i=$r(yf(e[e.length-1]));for(let[o,c]of u.entries()){let a=$r(c);if(i+a<=r?e[e.length-1]+=c:(e.push(c),i=0),Vu.has(c)&&(n=!0,s=u.slice(o+1).join("").startsWith(us)),n){s?c===rs&&(n=!1,s=!1):c===Bf&&(n=!1);continue}i+=a,i===r&&o<u.length-1&&(e.push(""),i=0)}!i&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},TE=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!($r(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},NE=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let u="",n,s,i=IE(e),o=[""];for(let[a,D]of e.split(" ").entries()){r.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let l=$r(o[o.length-1]);if(a!==0&&(l>=t&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),l=0),(l>0||r.trim===!1)&&(o[o.length-1]+=" ",l++)),r.hard&&i[a]>t){let p=t-l,f=1+Math.floor((i[a]-p-1)/t);Math.floor((i[a]-1)/t)<f&&o.push(""),es(o,D,t);continue}if(l+i[a]>t&&l>0&&i[a]>0){if(r.wordWrap===!1&&l<t){es(o,D,t);continue}o.push("")}if(l+i[a]>t&&r.wordWrap===!1){es(o,D,t);continue}o[o.length-1]+=D}r.trim!==!1&&(o=o.map(a=>TE(a)));let c=[...o.join(`
58
- `)];for(let[a,D]of c.entries()){if(u+=D,Vu.has(D)){let{groups:p}=new RegExp(`(?:\\${wf}(?<code>\\d+)m|\\${us}(?<uri>.*)${rs})`).exec(c.slice(a).join(""))||{groups:{}};if(p.code!==void 0){let f=Number.parseFloat(p.code);n=f===OE?void 0:f}else p.uri!==void 0&&(s=p.uri.length===0?void 0:p.uri)}let l=$E.codes.get(Number(n));c[a+1]===`
59
- `?(s&&(u+=hf("")),n&&l&&(u+=pf(l))):D===`
60
- `&&(n&&l&&(u+=pf(n)),s&&(u+=hf(s)))}return u};function df(e,t,r){return String(e).normalize().replace(/\r\n/g,`
61
- `).split(`
62
- `).map(u=>NE(u,t,r)).join(`
63
- `)}var PE=Object.defineProperty,LE=(e,t,r)=>t in e?PE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ve=(e,t,r)=>(LE(e,typeof t!="symbol"?t+"":t,r),r);function jE(e,t){if(e===t)return;let r=e.split(`
64
- `),u=t.split(`
65
- `),n=[];for(let s=0;s<Math.max(r.length,u.length);s++)r[s]!==u[s]&&n.push(s);return n}var vf=Symbol("clack:cancel");function G(e){return e===vf}function ku(e,t){e.isTTY&&e.setRawMode(t)}var mf=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),kE=new Set(["up","down","left","right","space","enter"]),Bt=class{constructor({render:t,input:r=Ht.stdin,output:u=Ht.stdout,...n},s=!0){ve(this,"input"),ve(this,"output"),ve(this,"rl"),ve(this,"opts"),ve(this,"_track",!1),ve(this,"_render"),ve(this,"_cursor",0),ve(this,"state","initial"),ve(this,"value"),ve(this,"error",""),ve(this,"subscribers",new Map),ve(this,"_prevFrame",""),this.opts=n,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=t.bind(this),this._track=s,this.input=r,this.output=u}prompt(){let t=new Cf.WriteStream(0);return t._write=(r,u,n)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),n()},this.input.pipe(t),this.rl=ts.default.createInterface({input:this.input,output:t,tabSize:2,prompt:"",escapeCodeTimeout:50}),ts.default.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),ku(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((r,u)=>{this.once("submit",()=>{this.output.write(pe.cursor.show),this.output.off("resize",this.render),ku(this.input,!1),r(this.value)}),this.once("cancel",()=>{this.output.write(pe.cursor.show),this.output.off("resize",this.render),ku(this.input,!1),r(vf)})})}on(t,r){let u=this.subscribers.get(t)??[];u.push({cb:r}),this.subscribers.set(t,u)}once(t,r){let u=this.subscribers.get(t)??[];u.push({cb:r,once:!0}),this.subscribers.set(t,u)}emit(t,...r){let u=this.subscribers.get(t)??[],n=[];for(let s of u)s.cb(...r),s.once&&n.push(()=>u.splice(u.indexOf(s),1));for(let s of n)s()}unsubscribe(){this.subscribers.clear()}onKeypress(t,r){if(this.state==="error"&&(this.state="active"),r?.name&&!this._track&&mf.has(r.name)&&this.emit("cursor",mf.get(r.name)),r?.name&&kE.has(r.name)&&this.emit("cursor",r.name),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),t===" "&&this.opts.placeholder&&(this.value||(this.rl.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),t&&this.emit("key",t.toLowerCase()),r?.name==="return"){if(this.opts.validate){let u=this.opts.validate(this.value);u&&(this.error=u,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}t===""&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
66
- `),ku(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let t=df(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
67
- `).length-1;this.output.write(pe.cursor.move(-999,t*-1))}render(){let t=df(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(pe.cursor.hide);else{let r=jE(this._prevFrame,t);if(this.restoreCursor(),r&&r?.length===1){let u=r[0];this.output.write(pe.cursor.move(0,u)),this.output.write(pe.erase.lines(1));let n=t.split(`
68
- `);this.output.write(n[u]),this._prevFrame=t,this.output.write(pe.cursor.move(0,n.length-u-1));return}else if(r&&r?.length>1){let u=r[0];this.output.write(pe.cursor.move(0,u)),this.output.write(pe.erase.down());let n=t.split(`
69
- `).slice(u);this.output.write(n.join(`
70
- `)),this._prevFrame=t;return}this.output.write(pe.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}},qu=class extends Bt{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",r=>{this.output.write(pe.cursor.move(0,-1)),this.value=r,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};var qE=Object.defineProperty,ME=(e,t,r)=>t in e?qE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ff=(e,t,r)=>(ME(e,typeof t!="symbol"?t+"":t,r),r),xf=class extends Bt{constructor(e){super(e,!1),Ff(this,"options"),Ff(this,"cursor",0),this.options=e.options,this.value=[...e.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:t})=>t===e.cursorAt),0),this.on("key",t=>{t==="a"&&this.toggleAll()}),this.on("cursor",t=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let e=this.value.length===this.options.length;this.value=e?[]:this.options.map(t=>t.value)}toggleValue(){let e=this.value.includes(this._value);this.value=e?this.value.filter(t=>t!==this._value):[...this.value,this._value]}},UE=Object.defineProperty,VE=(e,t,r)=>t in e?UE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ef=(e,t,r)=>(VE(e,typeof t!="symbol"?t+"":t,r),r),Mu=class extends Bt{constructor({mask:t,...r}){super(r),Ef(this,"valueWithCursor",""),Ef(this,"_mask","\u2022"),this._mask=t??"\u2022",this.on("finalize",()=>{this.valueWithCursor=this.masked}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.masked}${wt.default.inverse(wt.default.hidden("_"))}`;else{let u=this.masked.slice(0,this.cursor),n=this.masked.slice(this.cursor);this.valueWithCursor=`${u}${wt.default.inverse(n[0])}${n.slice(1)}`}})}get cursor(){return this._cursor}get masked(){return this.value.replaceAll(/./g,this._mask)}},GE=Object.defineProperty,WE=(e,t,r)=>t in e?GE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gf=(e,t,r)=>(WE(e,typeof t!="symbol"?t+"":t,r),r),Sf=class extends Bt{constructor(e){super(e,!1),gf(this,"options"),gf(this,"cursor",0),this.options=e.options,this.cursor=this.options.findIndex(({value:t})=>t===e.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",t=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};var HE=Object.defineProperty,KE=(e,t,r)=>t in e?HE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,YE=(e,t,r)=>(KE(e,typeof t!="symbol"?t+"":t,r),r),Uu=class extends Bt{constructor(t){super(t),YE(this,"valueWithCursor",""),this.on("finalize",()=>{this.value||(this.value=t.defaultValue),this.valueWithCursor=this.value}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.value}${wt.default.inverse(wt.default.hidden("_"))}`;else{let r=this.value.slice(0,this.cursor),u=this.value.slice(this.cursor);this.valueWithCursor=`${r}${wt.default.inverse(u[0])}${u.slice(1)}`}})}get cursor(){return this._cursor}},JE=globalThis.process.platform.startsWith("win");function _f({input:e=Ht.stdin,output:t=Ht.stdout,overwrite:r=!0,hideCursor:u=!0}={}){let n=it.createInterface({input:e,output:t,prompt:"",tabSize:1});it.emitKeypressEvents(e,n),e.isTTY&&e.setRawMode(!0);let s=(i,{name:o})=>{if(String(i)===""){u&&t.write(pe.cursor.show),process.exit(0);return}if(!r)return;it.moveCursor(t,o==="return"?0:-1,o==="return"?-1:0,()=>{it.clearLine(t,1,()=>{e.once("keypress",s)})})};return u&&t.write(pe.cursor.hide),e.once("keypress",s),()=>{e.off("keypress",s),u&&t.write(pe.cursor.show),e.isTTY&&!JE&&e.setRawMode(!1),n.terminal=!1,n.close()}}var xe=I(require("node:process"),1),d=I(Zi(),1),Kt=I(zi(),1);function zE(){return xe.default.platform!=="win32"?xe.default.env.TERM!=="linux":!!xe.default.env.CI||!!xe.default.env.WT_SESSION||!!xe.default.env.TERMINUS_SUBLIME||xe.default.env.ConEmuTask==="{cmd::Cmder}"||xe.default.env.TERM_PROGRAM==="Terminus-Sublime"||xe.default.env.TERM_PROGRAM==="vscode"||xe.default.env.TERM==="xterm-256color"||xe.default.env.TERM==="alacritty"||xe.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var is=zE(),ee=(e,t)=>is?e:t,XE=ee("\u25C6","*"),Rf=ee("\u25A0","x"),If=ee("\u25B2","x"),Gu=ee("\u25C7","o"),ZE=ee("\u250C","T"),P=ee("\u2502","|"),Le=ee("\u2514","\u2014"),ss=ee("\u25CF",">"),os=ee("\u25CB"," "),QE=ee("\u25FB","[\u2022]"),$f=ee("\u25FC","[+]"),eg=ee("\u25FB","[ ]"),tg=ee("\u25AA","\u2022"),Of=ee("\u2500","-"),rg=ee("\u256E","+"),ug=ee("\u251C","+"),ng=ee("\u256F","+"),ig=ee("\u25CF","\u2022"),sg=ee("\u25C6","*"),og=ee("\u25B2","!"),Dg=ee("\u25A0","x"),Or=e=>{switch(e){case"initial":case"active":return d.default.cyan(XE);case"cancel":return d.default.red(Rf);case"error":return d.default.yellow(If);case"submit":return d.default.green(Gu)}},Ee=e=>new Uu({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){let t=`${d.default.gray(P)}
71
- ${Or(this.state)} ${e.message}
72
- `,r=e.placeholder?d.default.inverse(e.placeholder[0])+d.default.dim(e.placeholder.slice(1)):d.default.inverse(d.default.hidden("_")),u=this.value?this.valueWithCursor:r;switch(this.state){case"error":return`${t.trim()}
73
- ${d.default.yellow(P)} ${u}
74
- ${d.default.yellow(Le)} ${d.default.yellow(this.error)}
75
- `;case"submit":return`${t}${d.default.gray(P)} ${d.default.dim(this.value||e.placeholder)}`;case"cancel":return`${t}${d.default.gray(P)} ${d.default.strikethrough(d.default.dim(this.value??""))}${this.value?.trim()?`
76
- `+d.default.gray(P):""}`;default:return`${t}${d.default.cyan(P)} ${u}
77
- ${d.default.cyan(Le)}
78
- `}}}).prompt(),Wu=e=>new Mu({validate:e.validate,mask:e.mask??tg,render(){let t=`${d.default.gray(P)}
79
- ${Or(this.state)} ${e.message}
80
- `,r=this.valueWithCursor,u=this.masked;switch(this.state){case"error":return`${t.trim()}
81
- ${d.default.yellow(P)} ${u}
82
- ${d.default.yellow(Le)} ${d.default.yellow(this.error)}
83
- `;case"submit":return`${t}${d.default.gray(P)} ${d.default.dim(u)}`;case"cancel":return`${t}${d.default.gray(P)} ${d.default.strikethrough(d.default.dim(u??""))}${u?`
84
- `+d.default.gray(P):""}`;default:return`${t}${d.default.cyan(P)} ${r}
85
- ${d.default.cyan(Le)}
86
- `}}}).prompt(),Rr=e=>{let t=e.active??"Yes",r=e.inactive??"No";return new qu({active:t,inactive:r,initialValue:e.initialValue??!0,render(){let u=`${d.default.gray(P)}
87
- ${Or(this.state)} ${e.message}
88
- `,n=this.value?t:r;switch(this.state){case"submit":return`${u}${d.default.gray(P)} ${d.default.dim(n)}`;case"cancel":return`${u}${d.default.gray(P)} ${d.default.strikethrough(d.default.dim(n))}
89
- ${d.default.gray(P)}`;default:return`${u}${d.default.cyan(P)} ${this.value?`${d.default.green(ss)} ${t}`:`${d.default.dim(os)} ${d.default.dim(t)}`} ${d.default.dim("/")} ${this.value?`${d.default.dim(os)} ${d.default.dim(r)}`:`${d.default.green(ss)} ${r}`}
90
- ${d.default.cyan(Le)}
91
- `}}}).prompt()},st=e=>{let t=(u,n)=>{let s=u.label??String(u.value);return n==="active"?`${d.default.green(ss)} ${s} ${u.hint?d.default.dim(`(${u.hint})`):""}`:n==="selected"?`${d.default.dim(s)}`:n==="cancelled"?`${d.default.strikethrough(d.default.dim(s))}`:`${d.default.dim(os)} ${d.default.dim(s)}`},r=0;return new Sf({options:e.options,initialValue:e.initialValue,render(){let u=`${d.default.gray(P)}
92
- ${Or(this.state)} ${e.message}
93
- `;switch(this.state){case"submit":return`${u}${d.default.gray(P)} ${t(this.options[this.cursor],"selected")}`;case"cancel":return`${u}${d.default.gray(P)} ${t(this.options[this.cursor],"cancelled")}
94
- ${d.default.gray(P)}`;default:{let n=e.maxItems===void 0?1/0:Math.max(e.maxItems,5);this.cursor>=r+n-3?r=Math.max(Math.min(this.cursor-n+3,this.options.length-n),0):this.cursor<r+2&&(r=Math.max(this.cursor-2,0));let s=n<this.options.length&&r>0,i=n<this.options.length&&r+n<this.options.length;return`${u}${d.default.cyan(P)} ${this.options.slice(r,r+n).map((o,c,a)=>c===0&&s?d.default.dim("..."):c===a.length-1&&i?d.default.dim("..."):t(o,c+r===this.cursor?"active":"inactive")).join(`
95
- ${d.default.cyan(P)} `)}
96
- ${d.default.cyan(Le)}
97
- `}}}}).prompt()};var Tf=e=>{let t=(r,u)=>{let n=r.label??String(r.value);return u==="active"?`${d.default.cyan(QE)} ${n} ${r.hint?d.default.dim(`(${r.hint})`):""}`:u==="selected"?`${d.default.green($f)} ${d.default.dim(n)}`:u==="cancelled"?`${d.default.strikethrough(d.default.dim(n))}`:u==="active-selected"?`${d.default.green($f)} ${n} ${r.hint?d.default.dim(`(${r.hint})`):""}`:u==="submitted"?`${d.default.dim(n)}`:`${d.default.dim(eg)} ${d.default.dim(n)}`};return new xf({options:e.options,initialValues:e.initialValues,required:e.required??!0,cursorAt:e.cursorAt,validate(r){if(this.required&&r.length===0)return`Please select at least one option.
98
- ${d.default.reset(d.default.dim(`Press ${d.default.gray(d.default.bgWhite(d.default.inverse(" space ")))} to select, ${d.default.gray(d.default.bgWhite(d.default.inverse(" enter ")))} to submit`))}`},render(){let r=`${d.default.gray(P)}
99
- ${Or(this.state)} ${e.message}
100
- `;switch(this.state){case"submit":return`${r}${d.default.gray(P)} ${this.options.filter(({value:u})=>this.value.includes(u)).map(u=>t(u,"submitted")).join(d.default.dim(", "))||d.default.dim("none")}`;case"cancel":{let u=this.options.filter(({value:n})=>this.value.includes(n)).map(n=>t(n,"cancelled")).join(d.default.dim(", "));return`${r}${d.default.gray(P)} ${u.trim()?`${u}
101
- ${d.default.gray(P)}`:""}`}case"error":{let u=this.error.split(`
102
- `).map((n,s)=>s===0?`${d.default.yellow(Le)} ${d.default.yellow(n)}`:` ${n}`).join(`
103
- `);return r+d.default.yellow(P)+" "+this.options.map((n,s)=>{let i=this.value.includes(n.value),o=s===this.cursor;return o&&i?t(n,"active-selected"):i?t(n,"selected"):t(n,o?"active":"inactive")}).join(`
104
- ${d.default.yellow(P)} `)+`
105
- `+u+`
106
- `}default:return`${r}${d.default.cyan(P)} ${this.options.map((u,n)=>{let s=this.value.includes(u.value),i=n===this.cursor;return i&&s?t(u,"active-selected"):s?t(u,"selected"):t(u,i?"active":"inactive")}).join(`
107
- ${d.default.cyan(P)} `)}
108
- ${d.default.cyan(Le)}
109
- `}}}).prompt()};var ns=e=>e.replace(ag(),""),He=(e="",t="")=>{let r=`
110
- ${e}
28
+ `).map(n=>Tr(n,e,t)).join(`
29
+ `)}var Vr=Object.defineProperty,Mr=(i,e,t)=>e in i?Vr(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,P=(i,e,t)=>(Mr(i,typeof e!="symbol"?e+"":e,t),t);function Nr(i,e){if(i===e)return;let t=i.split(`
30
+ `),n=e.split(`
31
+ `),u=[];for(let s=0;s<Math.max(t.length,n.length);s++)t[s]!==n[s]&&u.push(s);return u}var di=Symbol("clack:cancel");function b(i){return i===di}function Oe(i,e){i.isTTY&&i.setRawMode(e)}var ni=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),Ur=new Set(["up","down","left","right","space","enter"]),ne=class{constructor({render:e,input:t=De.stdin,output:n=De.stdout,...u},s=!0){P(this,"input"),P(this,"output"),P(this,"rl"),P(this,"opts"),P(this,"_track",!1),P(this,"_render"),P(this,"_cursor",0),P(this,"state","initial"),P(this,"value"),P(this,"error",""),P(this,"subscribers",new Map),P(this,"_prevFrame",""),this.opts=u,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=e.bind(this),this._track=s,this.input=t,this.output=n}prompt(){let e=new ai.WriteStream(0);return e._write=(t,n,u)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),u()},this.input.pipe(e),this.rl=mt.default.createInterface({input:this.input,output:e,tabSize:2,prompt:"",escapeCodeTimeout:50}),mt.default.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),Oe(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((t,n)=>{this.once("submit",()=>{this.output.write(v.cursor.show),this.output.off("resize",this.render),Oe(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(v.cursor.show),this.output.off("resize",this.render),Oe(this.input,!1),t(di)})})}on(e,t){let n=this.subscribers.get(e)??[];n.push({cb:t}),this.subscribers.set(e,n)}once(e,t){let n=this.subscribers.get(e)??[];n.push({cb:t,once:!0}),this.subscribers.set(e,n)}emit(e,...t){let n=this.subscribers.get(e)??[],u=[];for(let s of n)s.cb(...t),s.once&&u.push(()=>n.splice(n.indexOf(s),1));for(let s of u)s()}unsubscribe(){this.subscribers.clear()}onKeypress(e,t){if(this.state==="error"&&(this.state="active"),t?.name&&!this._track&&ni.has(t.name)&&this.emit("cursor",ni.get(t.name)),t?.name&&Ur.has(t.name)&&this.emit("cursor",t.name),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),e===" "&&this.opts.placeholder&&(this.value||(this.rl.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),e&&this.emit("key",e.toLowerCase()),t?.name==="return"){if(this.opts.validate){let n=this.opts.validate(this.value);n&&(this.error=n,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}e===""&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
32
+ `),Oe(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=ri(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
33
+ `).length-1;this.output.write(v.cursor.move(-999,e*-1))}render(){let e=ri(this._render(this)??"",process.stdout.columns,{hard:!0});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(v.cursor.hide);else{let t=Nr(this._prevFrame,e);if(this.restoreCursor(),t&&t?.length===1){let n=t[0];this.output.write(v.cursor.move(0,n)),this.output.write(v.erase.lines(1));let u=e.split(`
34
+ `);this.output.write(u[n]),this._prevFrame=e,this.output.write(v.cursor.move(0,u.length-n-1));return}else if(t&&t?.length>1){let n=t[0];this.output.write(v.cursor.move(0,n)),this.output.write(v.erase.down());let u=e.split(`
35
+ `).slice(n);this.output.write(u.join(`
36
+ `)),this._prevFrame=e;return}this.output.write(v.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}},Se=class extends ne{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",t=>{this.output.write(v.cursor.move(0,-1)),this.value=t,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};var qr=Object.defineProperty,Lr=(i,e,t)=>e in i?qr(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ui=(i,e,t)=>(Lr(i,typeof e!="symbol"?e+"":e,t),t),mi=class extends ne{constructor(i){super(i,!1),ui(this,"options"),ui(this,"cursor",0),this.options=i.options,this.value=[...i.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:e})=>e===i.cursorAt),0),this.on("key",e=>{e==="a"&&this.toggleAll()}),this.on("cursor",e=>{switch(e){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let i=this.value.length===this.options.length;this.value=i?[]:this.options.map(e=>e.value)}toggleValue(){let i=this.value.includes(this._value);this.value=i?this.value.filter(e=>e!==this._value):[...this.value,this._value]}},Hr=Object.defineProperty,Wr=(i,e,t)=>e in i?Hr(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,si=(i,e,t)=>(Wr(i,typeof e!="symbol"?e+"":e,t),t),Pe=class extends ne{constructor({mask:e,...t}){super(t),si(this,"valueWithCursor",""),si(this,"_mask","\u2022"),this._mask=e??"\u2022",this.on("finalize",()=>{this.valueWithCursor=this.masked}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.masked}${re.default.inverse(re.default.hidden("_"))}`;else{let n=this.masked.slice(0,this.cursor),u=this.masked.slice(this.cursor);this.valueWithCursor=`${n}${re.default.inverse(u[0])}${u.slice(1)}`}})}get cursor(){return this._cursor}get masked(){return this.value.replaceAll(/./g,this._mask)}},Gr=Object.defineProperty,Kr=(i,e,t)=>e in i?Gr(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,oi=(i,e,t)=>(Kr(i,typeof e!="symbol"?e+"":e,t),t),fi=class extends ne{constructor(i){super(i,!1),oi(this,"options"),oi(this,"cursor",0),this.options=i.options,this.cursor=this.options.findIndex(({value:e})=>e===i.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",e=>{switch(e){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};var Jr=Object.defineProperty,zr=(i,e,t)=>e in i?Jr(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Yr=(i,e,t)=>(zr(i,typeof e!="symbol"?e+"":e,t),t),Ie=class extends ne{constructor(e){super(e),Yr(this,"valueWithCursor",""),this.on("finalize",()=>{this.value||(this.value=e.defaultValue),this.valueWithCursor=this.value}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.value}${re.default.inverse(re.default.hidden("_"))}`;else{let t=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor);this.valueWithCursor=`${t}${re.default.inverse(n[0])}${n.slice(1)}`}})}get cursor(){return this._cursor}},Zr=globalThis.process.platform.startsWith("win");function gi({input:i=De.stdin,output:e=De.stdout,overwrite:t=!0,hideCursor:n=!0}={}){let u=ee.createInterface({input:i,output:e,prompt:"",tabSize:1});ee.emitKeypressEvents(i,u),i.isTTY&&i.setRawMode(!0);let s=(r,{name:o})=>{if(String(r)===""){n&&e.write(v.cursor.show),process.exit(0);return}if(!t)return;ee.moveCursor(e,o==="return"?0:-1,o==="return"?-1:0,()=>{ee.clearLine(e,1,()=>{i.once("keypress",s)})})};return n&&e.write(v.cursor.hide),i.once("keypress",s),()=>{i.off("keypress",s),n&&e.write(v.cursor.show),i.isTTY&&!Zr&&i.setRawMode(!1),u.terminal=!1,u.close()}}var I=L(require("node:process"),1),D=L(pt(),1),le=L(lt(),1);function Qr(){return I.default.platform!=="win32"?I.default.env.TERM!=="linux":!!I.default.env.CI||!!I.default.env.WT_SESSION||!!I.default.env.TERMINUS_SUBLIME||I.default.env.ConEmuTask==="{cmd::Cmder}"||I.default.env.TERM_PROGRAM==="Terminus-Sublime"||I.default.env.TERM_PROGRAM==="vscode"||I.default.env.TERM==="xterm-256color"||I.default.env.TERM==="alacritty"||I.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Ft=Qr(),y=(i,e)=>Ft?i:e,Xr=y("\u25C6","*"),Ei=y("\u25A0","x"),bi=y("\u25B2","x"),je=y("\u25C7","o"),en=y("\u250C","T"),g=y("\u2502","|"),R=y("\u2514","\u2014"),Et=y("\u25CF",">"),bt=y("\u25CB"," "),tn=y("\u25FB","[\u2022]"),Ci=y("\u25FC","[+]"),rn=y("\u25FB","[ ]"),nn=y("\u25AA","\u2022"),Fi=y("\u2500","-"),un=y("\u256E","+"),sn=y("\u251C","+"),on=y("\u256F","+"),an=y("\u25CF","\u2022"),Dn=y("\u25C6","*"),ln=y("\u25B2","!"),cn=y("\u25A0","x"),Ce=i=>{switch(i){case"initial":case"active":return D.default.cyan(Xr);case"cancel":return D.default.red(Ei);case"error":return D.default.yellow(bi);case"submit":return D.default.green(je)}},x=i=>new Ie({validate:i.validate,placeholder:i.placeholder,defaultValue:i.defaultValue,initialValue:i.initialValue,render(){let e=`${D.default.gray(g)}
37
+ ${Ce(this.state)} ${i.message}
38
+ `,t=i.placeholder?D.default.inverse(i.placeholder[0])+D.default.dim(i.placeholder.slice(1)):D.default.inverse(D.default.hidden("_")),n=this.value?this.valueWithCursor:t;switch(this.state){case"error":return`${e.trim()}
39
+ ${D.default.yellow(g)} ${n}
40
+ ${D.default.yellow(R)} ${D.default.yellow(this.error)}
41
+ `;case"submit":return`${e}${D.default.gray(g)} ${D.default.dim(this.value||i.placeholder)}`;case"cancel":return`${e}${D.default.gray(g)} ${D.default.strikethrough(D.default.dim(this.value??""))}${this.value?.trim()?`
42
+ `+D.default.gray(g):""}`;default:return`${e}${D.default.cyan(g)} ${n}
43
+ ${D.default.cyan(R)}
44
+ `}}}).prompt(),Re=i=>new Pe({validate:i.validate,mask:i.mask??nn,render(){let e=`${D.default.gray(g)}
45
+ ${Ce(this.state)} ${i.message}
46
+ `,t=this.valueWithCursor,n=this.masked;switch(this.state){case"error":return`${e.trim()}
47
+ ${D.default.yellow(g)} ${n}
48
+ ${D.default.yellow(R)} ${D.default.yellow(this.error)}
49
+ `;case"submit":return`${e}${D.default.gray(g)} ${D.default.dim(n)}`;case"cancel":return`${e}${D.default.gray(g)} ${D.default.strikethrough(D.default.dim(n??""))}${n?`
50
+ `+D.default.gray(g):""}`;default:return`${e}${D.default.cyan(g)} ${t}
51
+ ${D.default.cyan(R)}
52
+ `}}}).prompt(),Fe=i=>{let e=i.active??"Yes",t=i.inactive??"No";return new Se({active:e,inactive:t,initialValue:i.initialValue??!0,render(){let n=`${D.default.gray(g)}
53
+ ${Ce(this.state)} ${i.message}
54
+ `,u=this.value?e:t;switch(this.state){case"submit":return`${n}${D.default.gray(g)} ${D.default.dim(u)}`;case"cancel":return`${n}${D.default.gray(g)} ${D.default.strikethrough(D.default.dim(u))}
55
+ ${D.default.gray(g)}`;default:return`${n}${D.default.cyan(g)} ${this.value?`${D.default.green(Et)} ${e}`:`${D.default.dim(bt)} ${D.default.dim(e)}`} ${D.default.dim("/")} ${this.value?`${D.default.dim(bt)} ${D.default.dim(t)}`:`${D.default.green(Et)} ${t}`}
56
+ ${D.default.cyan(R)}
57
+ `}}}).prompt()},te=i=>{let e=(n,u)=>{let s=n.label??String(n.value);return u==="active"?`${D.default.green(Et)} ${s} ${n.hint?D.default.dim(`(${n.hint})`):""}`:u==="selected"?`${D.default.dim(s)}`:u==="cancelled"?`${D.default.strikethrough(D.default.dim(s))}`:`${D.default.dim(bt)} ${D.default.dim(s)}`},t=0;return new fi({options:i.options,initialValue:i.initialValue,render(){let n=`${D.default.gray(g)}
58
+ ${Ce(this.state)} ${i.message}
59
+ `;switch(this.state){case"submit":return`${n}${D.default.gray(g)} ${e(this.options[this.cursor],"selected")}`;case"cancel":return`${n}${D.default.gray(g)} ${e(this.options[this.cursor],"cancelled")}
60
+ ${D.default.gray(g)}`;default:{let u=i.maxItems===void 0?1/0:Math.max(i.maxItems,5);this.cursor>=t+u-3?t=Math.max(Math.min(this.cursor-u+3,this.options.length-u),0):this.cursor<t+2&&(t=Math.max(this.cursor-2,0));let s=u<this.options.length&&t>0,r=u<this.options.length&&t+u<this.options.length;return`${n}${D.default.cyan(g)} ${this.options.slice(t,t+u).map((o,a,l)=>a===0&&s?D.default.dim("..."):a===l.length-1&&r?D.default.dim("..."):e(o,a+t===this.cursor?"active":"inactive")).join(`
61
+ ${D.default.cyan(g)} `)}
62
+ ${D.default.cyan(R)}
63
+ `}}}}).prompt()};var Ai=i=>{let e=(t,n)=>{let u=t.label??String(t.value);return n==="active"?`${D.default.cyan(tn)} ${u} ${t.hint?D.default.dim(`(${t.hint})`):""}`:n==="selected"?`${D.default.green(Ci)} ${D.default.dim(u)}`:n==="cancelled"?`${D.default.strikethrough(D.default.dim(u))}`:n==="active-selected"?`${D.default.green(Ci)} ${u} ${t.hint?D.default.dim(`(${t.hint})`):""}`:n==="submitted"?`${D.default.dim(u)}`:`${D.default.dim(rn)} ${D.default.dim(u)}`};return new mi({options:i.options,initialValues:i.initialValues,required:i.required??!0,cursorAt:i.cursorAt,validate(t){if(this.required&&t.length===0)return`Please select at least one option.
64
+ ${D.default.reset(D.default.dim(`Press ${D.default.gray(D.default.bgWhite(D.default.inverse(" space ")))} to select, ${D.default.gray(D.default.bgWhite(D.default.inverse(" enter ")))} to submit`))}`},render(){let t=`${D.default.gray(g)}
65
+ ${Ce(this.state)} ${i.message}
66
+ `;switch(this.state){case"submit":return`${t}${D.default.gray(g)} ${this.options.filter(({value:n})=>this.value.includes(n)).map(n=>e(n,"submitted")).join(D.default.dim(", "))||D.default.dim("none")}`;case"cancel":{let n=this.options.filter(({value:u})=>this.value.includes(u)).map(u=>e(u,"cancelled")).join(D.default.dim(", "));return`${t}${D.default.gray(g)} ${n.trim()?`${n}
67
+ ${D.default.gray(g)}`:""}`}case"error":{let n=this.error.split(`
68
+ `).map((u,s)=>s===0?`${D.default.yellow(R)} ${D.default.yellow(u)}`:` ${u}`).join(`
69
+ `);return t+D.default.yellow(g)+" "+this.options.map((u,s)=>{let r=this.value.includes(u.value),o=s===this.cursor;return o&&r?e(u,"active-selected"):r?e(u,"selected"):e(u,o?"active":"inactive")}).join(`
70
+ ${D.default.yellow(g)} `)+`
71
+ `+n+`
72
+ `}default:return`${t}${D.default.cyan(g)} ${this.options.map((n,u)=>{let s=this.value.includes(n.value),r=u===this.cursor;return r&&s?e(n,"active-selected"):s?e(n,"selected"):e(n,r?"active":"inactive")}).join(`
73
+ ${D.default.cyan(g)} `)}
74
+ ${D.default.cyan(R)}
75
+ `}}}).prompt()};var Ct=i=>i.replace(pn(),""),W=(i="",e="")=>{let t=`
76
+ ${i}
111
77
  `.split(`
112
- `),u=ns(t).length,n=Math.max(r.reduce((i,o)=>(o=ns(o),o.length>i?o.length:i),0),u)+2,s=r.map(i=>`${d.default.gray(P)} ${d.default.dim(i)}${" ".repeat(n-ns(i).length)}${d.default.gray(P)}`).join(`
113
- `);process.stdout.write(`${d.default.gray(P)}
114
- ${d.default.green(Gu)} ${d.default.reset(t)} ${d.default.gray(Of.repeat(Math.max(n-u-1,1))+rg)}
78
+ `),n=Ct(e).length,u=Math.max(t.reduce((r,o)=>(o=Ct(o),o.length>r?o.length:r),0),n)+2,s=t.map(r=>`${D.default.gray(g)} ${D.default.dim(r)}${" ".repeat(u-Ct(r).length)}${D.default.gray(g)}`).join(`
79
+ `);process.stdout.write(`${D.default.gray(g)}
80
+ ${D.default.green(je)} ${D.default.reset(e)} ${D.default.gray(Fi.repeat(Math.max(u-n-1,1))+un)}
115
81
  ${s}
116
- ${d.default.gray(ug+Of.repeat(n+2)+ng)}
117
- `)},te=(e="")=>{process.stdout.write(`${d.default.gray(Le)} ${d.default.red(e)}
82
+ ${D.default.gray(sn+Fi.repeat(u+2)+on)}
83
+ `)},w=(i="")=>{process.stdout.write(`${D.default.gray(R)} ${D.default.red(i)}
118
84
 
119
- `)},vt=(e="")=>{process.stdout.write(`${d.default.gray(ZE)} ${e}
120
- `)},Yt=(e="")=>{process.stdout.write(`${d.default.gray(P)}
121
- ${d.default.gray(Le)} ${e}
85
+ `)},ue=(i="")=>{process.stdout.write(`${D.default.gray(en)} ${i}
86
+ `)},ce=(i="")=>{process.stdout.write(`${D.default.gray(g)}
87
+ ${D.default.gray(R)} ${i}
122
88
 
123
- `)},x={message:(e="",{symbol:t=d.default.gray(P)}={})=>{let r=[`${d.default.gray(P)}`];if(e){let[u,...n]=e.split(`
124
- `);r.push(`${t} ${u}`,...n.map(s=>`${d.default.gray(P)} ${s}`))}process.stdout.write(`${r.join(`
89
+ `)},d={message:(i="",{symbol:e=D.default.gray(g)}={})=>{let t=[`${D.default.gray(g)}`];if(i){let[n,...u]=i.split(`
90
+ `);t.push(`${e} ${n}`,...u.map(s=>`${D.default.gray(g)} ${s}`))}process.stdout.write(`${t.join(`
125
91
  `)}
126
- `)},info:e=>{x.message(e,{symbol:d.default.blue(ig)})},success:e=>{x.message(e,{symbol:d.default.green(sg)})},step:e=>{x.message(e,{symbol:d.default.green(Gu)})},warn:e=>{x.message(e,{symbol:d.default.yellow(og)})},warning:e=>{x.warn(e)},error:e=>{x.message(e,{symbol:d.default.red(Dg)})}},ot=()=>{let e=is?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],t=is?80:120,r,u,n=!1,s="",i=(D="")=>{n=!0,r=_f(),s=D.replace(/\.+$/,""),process.stdout.write(`${d.default.gray(P)}
127
- `);let l=0,p=0;u=setInterval(()=>{let f=d.default.magenta(e[l]),h=".".repeat(Math.floor(p)).slice(0,3);process.stdout.write(Kt.cursor.move(-999,0)),process.stdout.write(Kt.erase.down(1)),process.stdout.write(`${f} ${s}${h}`),l=l+1<e.length?l+1:0,p=p<e.length?p+.125:0},t)},o=(D="",l=0)=>{s=D??s,n=!1,clearInterval(u);let p=l===0?d.default.green(Gu):l===1?d.default.red(Rf):d.default.red(If);process.stdout.write(Kt.cursor.move(-999,0)),process.stdout.write(Kt.erase.down(1)),process.stdout.write(`${p} ${s}
128
- `),r()},c=(D="")=>{s=D??s},a=D=>{let l=D>1?"Something went wrong":"Canceled";n&&o(l,D)};return process.on("uncaughtExceptionMonitor",()=>a(2)),process.on("unhandledRejection",()=>a(2)),process.on("SIGINT",()=>a(1)),process.on("SIGTERM",()=>a(1)),process.on("exit",a),{start:i,stop:o,message:c}};function ag(){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,"g")}var cg={"Content-Type":"application/json"},lg=/\{[^{}]+\}/g,Ds=class extends Request{constructor(t,r){super(t,r);for(let u in r)u in this||(this[u]=r[u])}};function as(e){let{baseUrl:t="",fetch:r=globalThis.fetch,querySerializer:u,bodySerializer:n,headers:s,...i}={...e};t.endsWith("/")&&(t=t.substring(0,t.length-1)),s=Pf(cg,s);let o=[];async function c(a,D){let{fetch:l=r,headers:p,params:f={},parseAs:h="json",querySerializer:m,bodySerializer:F=n??pg,...g}=D||{},$=typeof u=="function"?u:Nf(u);m&&($=typeof m=="function"?m:Nf({...typeof u=="object"?u:{},...m}));let v={redirect:"follow",...i,...g,headers:Pf(s,p,f.header)};v.body&&(v.body=F(v.body)),v.body instanceof FormData&&v.headers.delete("Content-Type");let w=new Ds(hg(a,{baseUrl:t,params:f,querySerializer:$}),v),V={baseUrl:t,fetch:l,parseAs:h,querySerializer:$,bodySerializer:F};for(let Z of o)if(Z&&typeof Z=="object"&&typeof Z.onRequest=="function"){w.schemaPath=a,w.params=f;let E=await Z.onRequest(w,V);if(E){if(!(E instanceof Request))throw new Error("Middleware must return new Request() when modifying the request");w=E}}let L=await l(w);for(let Z=o.length-1;Z>=0;Z--){let E=o[Z];if(E&&typeof E=="object"&&typeof E.onResponse=="function"){w.schemaPath=a,w.params=f;let y=await E.onResponse(L,V,w);if(y){if(!(y instanceof Response))throw new Error("Middleware must return new Response() when modifying the response");L=y}}}if(L.status===204||L.headers.get("Content-Length")==="0")return L.ok?{data:{},response:L}:{error:{},response:L};if(L.ok)return h==="stream"?{data:L.body,response:L}:{data:await L[h](),response:L};let N=await L.text();try{N=JSON.parse(N)}catch{}return{error:N,response:L}}return{async GET(a,D){return c(a,{...D,method:"GET"})},async PUT(a,D){return c(a,{...D,method:"PUT"})},async POST(a,D){return c(a,{...D,method:"POST"})},async DELETE(a,D){return c(a,{...D,method:"DELETE"})},async OPTIONS(a,D){return c(a,{...D,method:"OPTIONS"})},async HEAD(a,D){return c(a,{...D,method:"HEAD"})},async PATCH(a,D){return c(a,{...D,method:"PATCH"})},async TRACE(a,D){return c(a,{...D,method:"TRACE"})},use(...a){for(let D of a)if(D){if(typeof D!="object"||!("onRequest"in D||"onResponse"in D))throw new Error("Middleware must be an object with one of `onRequest()` or `onResponse()`");o.push(D)}},eject(...a){for(let D of a){let l=o.indexOf(D);l!==-1&&o.splice(l,1)}}}}function Hu(e,t,r){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function Lf(e,t,r){if(!t||typeof t!="object")return"";let u=[],n={simple:",",label:".",matrix:";"}[r.style]||"&";if(r.style!=="deepObject"&&r.explode===!1){for(let o in t)u.push(o,r.allowReserved===!0?t[o]:encodeURIComponent(t[o]));let i=u.join(",");switch(r.style){case"form":return`${e}=${i}`;case"label":return`.${i}`;case"matrix":return`;${e}=${i}`;default:return i}}for(let i in t){let o=r.style==="deepObject"?`${e}[${i}]`:i;u.push(Hu(o,t[i],r))}let s=u.join(n);return r.style==="label"||r.style==="matrix"?`${n}${s}`:s}function jf(e,t,r){if(!Array.isArray(t))return"";if(r.explode===!1){let s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",i=(r.allowReserved===!0?t:t.map(o=>encodeURIComponent(o))).join(s);switch(r.style){case"simple":return i;case"label":return`.${i}`;case"matrix":return`;${e}=${i}`;default:return`${e}=${i}`}}let u={simple:",",label:".",matrix:";"}[r.style]||"&",n=[];for(let s of t)r.style==="simple"||r.style==="label"?n.push(r.allowReserved===!0?s:encodeURIComponent(s)):n.push(Hu(e,s,r));return r.style==="label"||r.style==="matrix"?`${u}${n.join(u)}`:n.join(u)}function Nf(e){return function(r){let u=[];if(r&&typeof r=="object")for(let n in r){let s=r[n];if(s!=null){if(Array.isArray(s)){u.push(jf(n,s,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof s=="object"){u.push(Lf(n,s,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}u.push(Hu(n,s,e))}}return u.join("&")}}function fg(e,t){let r=e;for(let u of e.match(lg)??[]){let n=u.substring(1,u.length-1),s=!1,i="simple";if(n.endsWith("*")&&(s=!0,n=n.substring(0,n.length-1)),n.startsWith(".")?(i="label",n=n.substring(1)):n.startsWith(";")&&(i="matrix",n=n.substring(1)),!t||t[n]===void 0||t[n]===null)continue;let o=t[n];if(Array.isArray(o)){r=r.replace(u,jf(n,o,{style:i,explode:s}));continue}if(typeof o=="object"){r=r.replace(u,Lf(n,o,{style:i,explode:s}));continue}if(i==="matrix"){r=r.replace(u,`;${Hu(n,o)}`);continue}r=r.replace(u,i==="label"?`.${o}`:o)}return r}function pg(e){return JSON.stringify(e)}function hg(e,t){let r=`${t.baseUrl}${e}`;t.params?.path&&(r=fg(r,t.params.path));let u=t.querySerializer(t.params.query??{});return u.startsWith("?")&&(u=u.substring(1)),u&&(r+=`?${u}`),r}function Pf(...e){let t=new Headers;for(let r of e){if(!r||typeof r!="object")continue;let u=r instanceof Headers?r.entries():Object.entries(r);for(let[n,s]of u)if(s===null)t.delete(n);else if(Array.isArray(s))for(let i of s)t.append(n,i);else s!==void 0&&t.set(n,s)}return t}var Ye=require("node:fs"),kf=require("node:os"),ls=require("node:path");var xt=class extends Error{constructor(t){super(t),this.name="CliError"}},je=class extends xt{constructor(t){super(t),this.name="ConfigError"}},Se=class extends xt{constructor(r,u,n,s){super(`API Error (${r}): ${u}`);this.statusCode=r;this.errorType=n;this.details=s;this.name="ApiError"}},Ke=class extends xt{constructor(r,u,n){super(`Job ${r}: ${u??"Unknown error"}`);this.status=r;this.errorMessage=u;this.details=n;this.name="JobError"}formatDetails(){let r=[this.message];if(this.details){let u=this.details.results;if(u)for(let[n,s]of Object.entries(u))s.status==="failed"&&s.error_message&&r.push(` ${n}: ${s.error_message}`)}return r}},Ku=class extends xt{constructor(t){super(t),this.name="TimeoutError"}};function Jt(e,t){let r=e!=null&&typeof e=="object",u=r&&"message"in e?String(e.message):`HTTP ${t?.status??"unknown"} error`,n=r&&"statusCode"in e?e.statusCode:t?.status,s=[];if(r&&"details"in e&&Array.isArray(e.details))for(let i of e.details)i&&typeof i=="object"&&"message"in i&&s.push(String(i.message));return new Se(n??400,u,void 0,s.length>0?s:void 0)}var St=class extends xt{constructor(t){super(t),this.name="ValidationError"}};var cs=(0,ls.join)((0,kf.homedir)(),".descript-cli"),Tr=(0,ls.join)(cs,"config.json"),Je="https://descriptapi.com/v1/",Yu="default";function dg(){(0,Ye.existsSync)(cs)||(0,Ye.mkdirSync)(cs,{recursive:!0})}function Oe(){try{if((0,Ye.existsSync)(Tr)){let e=(0,Ye.readFileSync)(Tr,"utf-8"),t=JSON.parse(e);return t.profiles?t:{activeProfile:Yu,profiles:{[Yu]:{apiKey:t.apiKey,apiUrl:t.apiUrl,debug:t.debug}}}}}catch(e){console.error(`Warning: Could not parse config file at ${Tr}`),e instanceof Error&&console.error(` ${e.message}`)}return{activeProfile:Yu,profiles:{}}}function _t(e){dg(),(0,Ye.writeFileSync)(Tr,JSON.stringify(e,null,2))}function Ju(){let e=Oe(),t=process.env.DESCRIPT_PROFILE||e.activeProfile;return e.profiles[t]||{}}function zt(){return process.env.DESCRIPT_API_KEY?process.env.DESCRIPT_API_KEY:Ju().apiKey}function Nr(e){let t=Oe(),r=t.activeProfile;t.profiles[r]||(t.profiles[r]={}),t.profiles[r].apiKey=e,_t(t)}function Pr(){return Tr}function ke(){return process.env.DESCRIPT_API_URL?process.env.DESCRIPT_API_URL:Ju().apiUrl??Je}function Lr(){return Ju().apiUrl}function zu(e){let t=Oe(),r=t.activeProfile;t.profiles[r]||(t.profiles[r]={}),t.profiles[r].apiUrl=e,_t(t)}function fs(){let e=Oe(),t=e.activeProfile;e.profiles[t]&&(delete e.profiles[t].apiUrl,_t(e))}function ae(){return process.env.DESCRIPT_DEBUG?process.env.DESCRIPT_DEBUG==="true"||process.env.DESCRIPT_DEBUG==="1":Ju().debug??!1}function ps(e){let t=Oe(),r=t.activeProfile;t.profiles[r]||(t.profiles[r]={}),t.profiles[r].debug=e,_t(t)}function Xu(){return process.env.DESCRIPT_PROFILE?process.env.DESCRIPT_PROFILE:Oe().activeProfile}function hs(){let e=Oe();return Object.keys(e.profiles)}function ds(e){let t=Oe();if(!t.profiles[e])throw new je(`Profile "${e}" does not exist`);t.activeProfile=e,_t(t)}function ms(e){let t=Oe();if(t.profiles[e])throw new je(`Profile "${e}" already exists`);t.profiles[e]={},_t(t)}function qf(e){let t=Oe();if(e===Yu)throw new je("Cannot delete the default profile");if(!t.profiles[e])throw new je(`Profile "${e}" does not exist`);if(t.activeProfile===e)throw new je("Cannot delete the active profile. Switch to another profile first.");delete t.profiles[e],_t(t)}function Mf(e){let t=Oe();return e in t.profiles}var mg="@descript/platform-cli",Fg="0.2.3";function Eg(e){return e.length<=12?"Bearer ***":`Bearer ${e.slice(0,8)}...${e.slice(-4)}`}function Uf(e,t){let r=as({baseUrl:t,headers:{Authorization:`Bearer ${e}`,"User-Agent":`${mg}/${Fg} node/${process.version}`}});return ae()&&r.use({async onRequest(n){try{if(console.error(`
129
- --- API Request ---`),console.error(`${n.method} ${n.url}`),n.headers){let s=Object.fromEntries(n.headers.entries());s.authorization&&(s.authorization=Eg(e)),console.error("Headers:",s)}if(n.body)try{let i=await n.clone().text();i&&console.error("Body:",JSON.stringify(JSON.parse(i),null,2))}catch{}console.error(`-------------------
130
- `)}catch(s){console.error("Error logging request:",s instanceof Error?s.message:s)}return n}}),r}function Zu(){let e=zt();if(!e)throw new je("API key not configured. Run `descript-api config` to set up.");return Uf(e,ke())}function Vf(e){return Uf(e,ke())}var Zt=["api-key","api-url","debug"];function Gf(e){return e.length<=12?"***":e.slice(0,8)+"..."+e.slice(-4)}function Xt(e){switch(e){case"api-key":return zt();case"api-url":return Lr();case"debug":return ae()}}function Fs(e,t){switch(e){case"api-key":Nr(t);break;case"api-url":zu(t);break;case"debug":ps(t);break}}function Wf(e,t){if(e==="api-url"){let r=ke();return t||`${r} (default)`}return e==="debug"?t?"enabled":"disabled":t?e==="api-key"?Gf(t):t:"Not configured"}async function Es(e){let t=ot();t.start("Validating API key...");try{let r=Vf(e),{error:u}=await r.GET("/status");return u!=null&&typeof u=="object"&&"error"in u&&u.error==="unauthorized"?(t.stop("Invalid API key"),!1):(t.stop("API key validated successfully!"),!0)}catch{return t.stop("Could not validate (saved anyway)"),!0}}var qe=new Xe("config").description("Manage CLI configuration").addHelpText("after",`
92
+ `)},info:i=>{d.message(i,{symbol:D.default.blue(an)})},success:i=>{d.message(i,{symbol:D.default.green(Dn)})},step:i=>{d.message(i,{symbol:D.default.green(je)})},warn:i=>{d.message(i,{symbol:D.default.yellow(ln)})},warning:i=>{d.warn(i)},error:i=>{d.message(i,{symbol:D.default.red(cn)})}},ie=()=>{let i=Ft?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],e=Ft?80:120,t,n,u=!1,s="",r=(c="")=>{u=!0,t=gi(),s=c.replace(/\.+$/,""),process.stdout.write(`${D.default.gray(g)}
93
+ `);let p=0,m=0;n=setInterval(()=>{let C=D.default.magenta(i[p]),h=".".repeat(Math.floor(m)).slice(0,3);process.stdout.write(le.cursor.move(-999,0)),process.stdout.write(le.erase.down(1)),process.stdout.write(`${C} ${s}${h}`),p=p+1<i.length?p+1:0,m=m<i.length?m+.125:0},e)},o=(c="",p=0)=>{s=c??s,u=!1,clearInterval(n);let m=p===0?D.default.green(je):p===1?D.default.red(Ei):D.default.red(bi);process.stdout.write(le.cursor.move(-999,0)),process.stdout.write(le.erase.down(1)),process.stdout.write(`${m} ${s}
94
+ `),t()},a=(c="")=>{s=c??s},l=c=>{let p=c>1?"Something went wrong":"Canceled";u&&o(p,c)};return process.on("uncaughtExceptionMonitor",()=>l(2)),process.on("unhandledRejection",()=>l(2)),process.on("SIGINT",()=>l(1)),process.on("SIGTERM",()=>l(1)),process.on("exit",l),{start:r,stop:o,message:a}};function pn(){let i=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(i,"g")}var hn={"Content-Type":"application/json"},dn=/\{[^{}]+\}/g,At=class extends Request{constructor(e,t){super(e,t);for(let n in t)n in this||(this[n]=t[n])}};function $t(i){let{baseUrl:e="",fetch:t=globalThis.fetch,querySerializer:n,bodySerializer:u,headers:s,...r}={...i};e.endsWith("/")&&(e=e.substring(0,e.length-1)),s=yi(hn,s);let o=[];async function a(l,c){let{fetch:p=t,headers:m,params:C={},parseAs:h="json",querySerializer:f,bodySerializer:F=u??fn,...E}=c||{},O=typeof n=="function"?n:$i(n);f&&(O=typeof f=="function"?f:$i({...typeof n=="object"?n:{},...f}));let U={redirect:"follow",...r,...E,headers:yi(s,m,C.header)};U.body&&(U.body=F(U.body)),U.body instanceof FormData&&U.headers.delete("Content-Type");let Y=new At(gn(l,{baseUrl:e,params:C,querySerializer:O}),U),kt={baseUrl:e,fetch:p,parseAs:h,querySerializer:O,bodySerializer:F};for(let Z of o)if(Z&&typeof Z=="object"&&typeof Z.onRequest=="function"){Y.schemaPath=l,Y.params=C;let Q=await Z.onRequest(Y,kt);if(Q){if(!(Q instanceof Request))throw new Error("Middleware must return new Request() when modifying the request");Y=Q}}let B=await p(Y);for(let Z=o.length-1;Z>=0;Z--){let Q=o[Z];if(Q&&typeof Q=="object"&&typeof Q.onResponse=="function"){Y.schemaPath=l,Y.params=C;let Ke=await Q.onResponse(B,kt,Y);if(Ke){if(!(Ke instanceof Response))throw new Error("Middleware must return new Response() when modifying the response");B=Ke}}}if(B.status===204||B.headers.get("Content-Length")==="0")return B.ok?{data:{},response:B}:{error:{},response:B};if(B.ok)return h==="stream"?{data:B.body,response:B}:{data:await B[h](),response:B};let Ge=await B.text();try{Ge=JSON.parse(Ge)}catch{}return{error:Ge,response:B}}return{async GET(l,c){return a(l,{...c,method:"GET"})},async PUT(l,c){return a(l,{...c,method:"PUT"})},async POST(l,c){return a(l,{...c,method:"POST"})},async DELETE(l,c){return a(l,{...c,method:"DELETE"})},async OPTIONS(l,c){return a(l,{...c,method:"OPTIONS"})},async HEAD(l,c){return a(l,{...c,method:"HEAD"})},async PATCH(l,c){return a(l,{...c,method:"PATCH"})},async TRACE(l,c){return a(l,{...c,method:"TRACE"})},use(...l){for(let c of l)if(c){if(typeof c!="object"||!("onRequest"in c||"onResponse"in c))throw new Error("Middleware must be an object with one of `onRequest()` or `onResponse()`");o.push(c)}},eject(...l){for(let c of l){let p=o.indexOf(c);p!==-1&&o.splice(p,1)}}}}function Te(i,e,t){if(e==null)return"";if(typeof e=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${i}=${t?.allowReserved===!0?e:encodeURIComponent(e)}`}function wi(i,e,t){if(!e||typeof e!="object")return"";let n=[],u={simple:",",label:".",matrix:";"}[t.style]||"&";if(t.style!=="deepObject"&&t.explode===!1){for(let o in e)n.push(o,t.allowReserved===!0?e[o]:encodeURIComponent(e[o]));let r=n.join(",");switch(t.style){case"form":return`${i}=${r}`;case"label":return`.${r}`;case"matrix":return`;${i}=${r}`;default:return r}}for(let r in e){let o=t.style==="deepObject"?`${i}[${r}]`:r;n.push(Te(o,e[r],t))}let s=n.join(u);return t.style==="label"||t.style==="matrix"?`${u}${s}`:s}function _i(i,e,t){if(!Array.isArray(e))return"";if(t.explode===!1){let s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[t.style]||",",r=(t.allowReserved===!0?e:e.map(o=>encodeURIComponent(o))).join(s);switch(t.style){case"simple":return r;case"label":return`.${r}`;case"matrix":return`;${i}=${r}`;default:return`${i}=${r}`}}let n={simple:",",label:".",matrix:";"}[t.style]||"&",u=[];for(let s of e)t.style==="simple"||t.style==="label"?u.push(t.allowReserved===!0?s:encodeURIComponent(s)):u.push(Te(i,s,t));return t.style==="label"||t.style==="matrix"?`${n}${u.join(n)}`:u.join(n)}function $i(i){return function(t){let n=[];if(t&&typeof t=="object")for(let u in t){let s=t[u];if(s!=null){if(Array.isArray(s)){n.push(_i(u,s,{style:"form",explode:!0,...i?.array,allowReserved:i?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(wi(u,s,{style:"deepObject",explode:!0,...i?.object,allowReserved:i?.allowReserved||!1}));continue}n.push(Te(u,s,i))}}return n.join("&")}}function mn(i,e){let t=i;for(let n of i.match(dn)??[]){let u=n.substring(1,n.length-1),s=!1,r="simple";if(u.endsWith("*")&&(s=!0,u=u.substring(0,u.length-1)),u.startsWith(".")?(r="label",u=u.substring(1)):u.startsWith(";")&&(r="matrix",u=u.substring(1)),!e||e[u]===void 0||e[u]===null)continue;let o=e[u];if(Array.isArray(o)){t=t.replace(n,_i(u,o,{style:r,explode:s}));continue}if(typeof o=="object"){t=t.replace(n,wi(u,o,{style:r,explode:s}));continue}if(r==="matrix"){t=t.replace(n,`;${Te(u,o)}`);continue}t=t.replace(n,r==="label"?`.${o}`:o)}return t}function fn(i){return JSON.stringify(i)}function gn(i,e){let t=`${e.baseUrl}${i}`;e.params?.path&&(t=mn(t,e.params.path));let n=e.querySerializer(e.params.query??{});return n.startsWith("?")&&(n=n.substring(1)),n&&(t+=`?${n}`),t}function yi(...i){let e=new Headers;for(let t of i){if(!t||typeof t!="object")continue;let n=t instanceof Headers?t.entries():Object.entries(t);for(let[u,s]of n)if(s===null)e.delete(u);else if(Array.isArray(s))for(let r of s)e.append(u,r);else s!==void 0&&e.set(u,s)}return e}var K=require("node:fs"),vi=require("node:os"),wt=require("node:path");var se=class extends Error{constructor(e){super(e),this.name="CliError"}},T=class extends se{constructor(e){super(e),this.name="ConfigError"}},k=class extends se{constructor(t,n,u,s){super(`API Error (${t}): ${n}`);this.statusCode=t;this.errorType=u;this.details=s;this.name="ApiError"}},G=class extends se{constructor(t,n,u){super(`Job ${t}: ${n??"Unknown error"}`);this.status=t;this.errorMessage=n;this.details=u;this.name="JobError"}formatDetails(){let t=[this.message];if(this.details){let n=this.details.results;if(n)for(let[u,s]of Object.entries(n))s.status==="failed"&&s.error_message&&t.push(` ${u}: ${s.error_message}`)}return t}},Ve=class extends se{constructor(e){super(e),this.name="TimeoutError"}};function pe(i,e){let t=i!=null&&typeof i=="object",n=t&&"message"in i?String(i.message):`HTTP ${e?.status??"unknown"} error`,u=t&&"statusCode"in i?i.statusCode:e?.status,s=[];if(t&&"details"in i&&Array.isArray(i.details))for(let r of i.details)r&&typeof r=="object"&&"message"in r&&s.push(String(r.message));return new k(u??400,n,void 0,s.length>0?s:void 0)}var oe=class extends se{constructor(e){super(e),this.name="ValidationError"}};var yt=(0,wt.join)((0,vi.homedir)(),".descript-cli"),be=(0,wt.join)(yt,"config.json"),J="https://descriptapi.com/v1/",Me="default";function Cn(){(0,K.existsSync)(yt)||(0,K.mkdirSync)(yt,{recursive:!0})}function j(){try{if((0,K.existsSync)(be)){let i=(0,K.readFileSync)(be,"utf-8"),e=JSON.parse(i);return e.profiles?e:{activeProfile:Me,profiles:{[Me]:{apiKey:e.apiKey,apiUrl:e.apiUrl,debug:e.debug}}}}}catch(i){console.error(`Warning: Could not parse config file at ${be}`),i instanceof Error&&console.error(` ${i.message}`)}return{activeProfile:Me,profiles:{}}}function ae(i){Cn(),(0,K.writeFileSync)(be,JSON.stringify(i,null,2))}function Ne(){let i=j(),e=process.env.DESCRIPT_PROFILE||i.activeProfile;return i.profiles[e]||{}}function he(){return process.env.DESCRIPT_API_KEY?process.env.DESCRIPT_API_KEY:Ne().apiKey}function Ae(i){let e=j(),t=e.activeProfile;e.profiles[t]||(e.profiles[t]={}),e.profiles[t].apiKey=i,ae(e)}function $e(){return be}function V(){return process.env.DESCRIPT_API_URL?process.env.DESCRIPT_API_URL:Ne().apiUrl??J}function ye(){return Ne().apiUrl}function Ue(i){let e=j(),t=e.activeProfile;e.profiles[t]||(e.profiles[t]={}),e.profiles[t].apiUrl=i,ae(e)}function _t(){let i=j(),e=i.activeProfile;i.profiles[e]&&(delete i.profiles[e].apiUrl,ae(i))}function _(){return process.env.DESCRIPT_DEBUG?process.env.DESCRIPT_DEBUG==="true"||process.env.DESCRIPT_DEBUG==="1":Ne().debug??!1}function vt(i){let e=j(),t=e.activeProfile;e.profiles[t]||(e.profiles[t]={}),e.profiles[t].debug=i,ae(e)}function qe(){return process.env.DESCRIPT_PROFILE?process.env.DESCRIPT_PROFILE:j().activeProfile}function xt(){let i=j();return Object.keys(i.profiles)}function Bt(i){let e=j();if(!e.profiles[i])throw new T(`Profile "${i}" does not exist`);e.activeProfile=i,ae(e)}function Ot(i){let e=j();if(e.profiles[i])throw new T(`Profile "${i}" already exists`);e.profiles[i]={},ae(e)}function xi(i){let e=j();if(i===Me)throw new T("Cannot delete the default profile");if(!e.profiles[i])throw new T(`Profile "${i}" does not exist`);if(e.activeProfile===i)throw new T("Cannot delete the active profile. Switch to another profile first.");delete e.profiles[i],ae(e)}function Bi(i){let e=j();return i in e.profiles}var Fn="@descript/platform-cli",En="0.2.5";function bn(i){return i.length<=12?"Bearer ***":`Bearer ${i.slice(0,8)}...${i.slice(-4)}`}function Oi(i,e){let t=$t({baseUrl:e,headers:{Authorization:`Bearer ${i}`,"User-Agent":`${Fn}/${En} node/${process.version}`}});return _()&&t.use({async onRequest(u){try{if(console.error(`
95
+ --- API Request ---`),console.error(`${u.method} ${u.url}`),u.headers){let s=Object.fromEntries(u.headers.entries());s.authorization&&(s.authorization=bn(i)),console.error("Headers:",s)}if(u.body)try{let r=await u.clone().text();r&&console.error("Body:",JSON.stringify(JSON.parse(r),null,2))}catch{}console.error(`-------------------
96
+ `)}catch(s){console.error("Error logging request:",s instanceof Error?s.message:s)}return u}}),t}function Le(){let i=he();if(!i)throw new T("API key not configured. Run `descript-api config` to set up.");return Oi(i,V())}function Si(i){return Oi(i,V())}var me=["api-key","api-url","debug"];function Pi(i){return i.length<=12?"***":i.slice(0,8)+"..."+i.slice(-4)}function de(i){switch(i){case"api-key":return he();case"api-url":return ye();case"debug":return _()}}function St(i,e){switch(i){case"api-key":Ae(e);break;case"api-url":Ue(e);break;case"debug":vt(e);break}}function Ii(i,e){if(i==="api-url"){let t=V();return e||`${t} (default)`}return i==="debug"?e?"enabled":"disabled":e?i==="api-key"?Pi(e):e:"Not configured"}async function Pt(i){let e=ie();e.start("Validating API key...");try{let t=Si(i),{error:n}=await t.GET("/status");return n!=null&&typeof n=="object"&&"error"in n&&n.error==="unauthorized"?(e.stop("Invalid API key"),!1):(e.stop("API key validated successfully!"),!0)}catch{return e.stop("Could not validate (saved anyway)"),!0}}var M=new X("config").description("Manage CLI configuration").addHelpText("after",`
131
97
  Profile Commands:
132
98
  config profiles List all profiles (* marks active)
133
99
  config profile <name> Switch to a different profile
@@ -146,58 +112,25 @@ Examples:
146
112
  $ descript-api config profile staging # Switch to staging
147
113
  $ descript-api config set api-key # Set API key for active profile
148
114
  $ descript-api config list # View current configuration
149
- `).action(async()=>{await gg()});async function gg(){vt("Descript CLI - Configuration");let e=hs(),t=Xu(),r;if(e.length===0)x.info("No profiles found. Creating default profile."),r="default";else if(e.length===1)r=e[0];else{let n=await st({message:"Which profile would you like to configure?",options:[...e.map(s=>({value:s,label:s,hint:s===t?"(active)":""})),{value:"new",label:"Create new profile",hint:""}]});if(G(n)){te("Configuration cancelled");return}if(n==="new"){let s=await Ee({message:"Enter new profile name:",validate:i=>{if(!i)return"Profile name is required";if(Mf(i))return"Profile already exists"}});if(G(s)){te("Configuration cancelled");return}ms(s),r=s,x.success(`Created profile: ${r}`)}else r=n}for(r!==t&&(ds(r),x.info(`Switched to profile: ${r}`)),x.info(`Configuring profile: ${r}`),zt()||(x.info("First-time setup - please configure your settings:"),await Cg());;){let n=Zt.map(i=>{let o=Xt(i),c=Wf(i,o);return{value:i,label:i,hint:c}});n.push({value:"done",label:"Done",hint:"Exit configuration"});let s=await st({message:"Select a setting to update:",options:n});if(G(s)||s==="done"){Yt(`Configuration saved to ${Pr()}`);return}await yg(s)}}async function Cg(){let e=await Wu({message:"Enter your Descript API key:",validate:u=>{if(!u)return"API key is required";if(u.length<10)return"API key seems too short"}});G(e)&&(te("Setup cancelled"),process.exit(0)),await Es(e)?(Nr(e),x.success("API key saved")):(x.error("API key validation failed - saved anyway"),Nr(e));let r=await Rr({message:"Use custom API URL? (default: "+Je+")",initialValue:!1});if(G(r)&&(te("Setup cancelled"),process.exit(0)),r){let u=await Ee({message:"Enter API base URL:",placeholder:Je,validate:n=>{if(!n)return"API URL is required";try{new URL(n)}catch{return"Please enter a valid URL"}}});G(u)||(zu(u),x.success("API URL saved"))}x.success("Setup complete!")}async function yg(e){if(e==="api-key"){let t=zt(),r=await Wu({message:"Enter your Descript API key:",validate:n=>{if(!n)return"API key is required";if(n.length<10)return"API key seems too short"}});if(G(r))return;if(r===t){x.info("API key unchanged");return}await Es(r)?(Nr(r),x.success("API key saved")):x.error("Invalid API key - not saved")}else if(e==="api-url"){let t=Lr(),r=await st({message:"API URL action:",options:[{value:"set",label:"Set custom URL",hint:t??"Currently using default"},{value:"clear",label:"Reset to default",hint:Je}]});if(G(r))return;if(r==="clear"){if(!t){x.info("Already using default URL");return}fs(),x.success(`API URL reset to default: ${Je}`)}else{let u=await Ee({message:"Enter API base URL:",placeholder:Je,initialValue:t??"",validate:n=>{if(!n)return"API URL is required";try{new URL(n)}catch{return"Please enter a valid URL"}}});if(G(u))return;if(u===t){x.info("API URL unchanged");return}zu(u),x.success("API URL saved")}}else if(e==="debug"){let t=ae(),r=await Rr({message:"Enable debug mode? (prints API requests)",initialValue:t});if(G(r))return;if(r===t){x.info("Debug mode unchanged");return}ps(r),x.success(`Debug mode ${r?"enabled":"disabled"}`)}}qe.command("list").description("Show all configuration values").action(()=>{Ag()});function Ag(){let e=Xu();console.log(`
150
- Configuration (${Pr()}):`),console.log(`Active Profile: ${e}
151
- `);for(let t of Zt){let r=Xt(t),u=Wf(t,r);console.log(` ${t}: ${u}`)}console.log("")}qe.command("get <key>").description("Get a configuration value").action(e=>{if(Zt.includes(e)||(console.error(`Unknown config key: ${e}`),console.error(`Valid keys: ${Zt.join(", ")}`),process.exit(1)),e==="api-url"){console.log(ke());return}if(e==="debug"){console.log(ae());return}let t=Xt(e);t?console.log(e==="api-key"?Gf(t):t):(console.error(`${e} is not configured`),process.exit(1))});qe.command("set <key> [value]").description("Set a configuration value (prompts if value not provided)").action(async(e,t)=>{Zt.includes(e)||(console.error(`Unknown config key: ${e}`),console.error(`Valid keys: ${Zt.join(", ")}`),process.exit(1));let r=e;if(!t){if(vt(`Set ${e}`),r==="api-key"){let u=await Wu({message:"Enter your Descript API key:",validate:n=>{if(!n)return"API key is required";if(n.length<10)return"API key seems too short"}});G(u)&&(te("Cancelled"),process.exit(0)),t=u}else if(r==="api-url"){let u=Lr(),n=await Ee({message:"Enter API base URL:",placeholder:Je,initialValue:u??"",validate:s=>{if(!s)return"API URL is required (use `config clear api-url` to reset to default)";try{new URL(s)}catch{return"Please enter a valid URL"}}});G(n)&&(te("Cancelled"),process.exit(0)),t=n}else if(r==="debug"){let u=ae(),n=await Rr({message:"Enable debug mode? (prints API requests)",initialValue:u});G(n)&&(te("Cancelled"),process.exit(0));let s=n,i=Xt(r);if(s===i){x.info("Debug mode unchanged");return}Fs(r,s),x.success(`Debug mode ${s?"enabled":"disabled"}`);return}}if(r==="api-key"&&t&&(await Es(t)||(te("The API key is invalid. Please check and try again."),process.exit(1))),r==="api-url"&&t)try{new URL(t)}catch{console.error("Invalid URL format for api-url"),process.exit(1)}if(r==="debug"&&typeof t=="string"){t!=="true"&&t!=="false"&&(console.error('Invalid debug value. Use "true" or "false"'),process.exit(1));let u=t==="true",n=Xt(r);if(u===n){console.log(`${e} unchanged`);return}Fs(r,u),console.log(`${e} saved to ${Pr()}`);return}if(t!=null){let u=Xt(r);if(t===u){console.log(`${e} unchanged`);return}Fs(r,t),console.log(`${e} saved to ${Pr()}`)}});qe.command("clear <key>").description("Clear a configuration value (revert to default)").action(e=>{if(e!=="api-url"&&(console.error(`Cannot clear ${e}. Only api-url can be cleared (to revert to default).`),console.error('Use "config set" to update other values.'),process.exit(1)),!Lr()){console.log("api-url already using default");return}fs(),console.log(`api-url cleared. Now using default: ${Je}`)});qe.command("profiles").description("List all profiles").action(()=>{let e=hs(),t=Xu();if(e.length===0){console.log("No profiles configured");return}console.log(`
115
+ `).action(async()=>{await An()});async function An(){ue("Descript CLI - Configuration");let i=xt(),e=qe(),t;if(i.length===0)d.info("No profiles found. Creating default profile."),t="default";else if(i.length===1)t=i[0];else{let u=await te({message:"Which profile would you like to configure?",options:[...i.map(s=>({value:s,label:s,hint:s===e?"(active)":""})),{value:"new",label:"Create new profile",hint:""}]});if(b(u)){w("Configuration cancelled");return}if(u==="new"){let s=await x({message:"Enter new profile name:",validate:r=>{if(!r)return"Profile name is required";if(Bi(r))return"Profile already exists"}});if(b(s)){w("Configuration cancelled");return}Ot(s),t=s,d.success(`Created profile: ${t}`)}else t=u}for(t!==e&&(Bt(t),d.info(`Switched to profile: ${t}`)),d.info(`Configuring profile: ${t}`),he()||(d.info("First-time setup - please configure your settings:"),await $n());;){let u=me.map(r=>{let o=de(r),a=Ii(r,o);return{value:r,label:r,hint:a}});u.push({value:"done",label:"Done",hint:"Exit configuration"});let s=await te({message:"Select a setting to update:",options:u});if(b(s)||s==="done"){ce(`Configuration saved to ${$e()}`);return}await yn(s)}}async function $n(){let i=await Re({message:"Enter your Descript API key:",validate:n=>{if(!n)return"API key is required";if(n.length<10)return"API key seems too short"}});b(i)&&(w("Setup cancelled"),process.exit(0)),await Pt(i)?(Ae(i),d.success("API key saved")):(d.error("API key validation failed - saved anyway"),Ae(i));let t=await Fe({message:"Use custom API URL? (default: "+J+")",initialValue:!1});if(b(t)&&(w("Setup cancelled"),process.exit(0)),t){let n=await x({message:"Enter API base URL:",placeholder:J,validate:u=>{if(!u)return"API URL is required";try{new URL(u)}catch{return"Please enter a valid URL"}}});b(n)||(Ue(n),d.success("API URL saved"))}d.success("Setup complete!")}async function yn(i){if(i==="api-key"){let e=he(),t=await Re({message:"Enter your Descript API key:",validate:u=>{if(!u)return"API key is required";if(u.length<10)return"API key seems too short"}});if(b(t))return;if(t===e){d.info("API key unchanged");return}await Pt(t)?(Ae(t),d.success("API key saved")):d.error("Invalid API key - not saved")}else if(i==="api-url"){let e=ye(),t=await te({message:"API URL action:",options:[{value:"set",label:"Set custom URL",hint:e??"Currently using default"},{value:"clear",label:"Reset to default",hint:J}]});if(b(t))return;if(t==="clear"){if(!e){d.info("Already using default URL");return}_t(),d.success(`API URL reset to default: ${J}`)}else{let n=await x({message:"Enter API base URL:",placeholder:J,initialValue:e??"",validate:u=>{if(!u)return"API URL is required";try{new URL(u)}catch{return"Please enter a valid URL"}}});if(b(n))return;if(n===e){d.info("API URL unchanged");return}Ue(n),d.success("API URL saved")}}else if(i==="debug"){let e=_(),t=await Fe({message:"Enable debug mode? (prints API requests)",initialValue:e});if(b(t))return;if(t===e){d.info("Debug mode unchanged");return}vt(t),d.success(`Debug mode ${t?"enabled":"disabled"}`)}}M.command("list").description("Show all configuration values").action(()=>{wn()});function wn(){let i=qe();console.log(`
116
+ Configuration (${$e()}):`),console.log(`Active Profile: ${i}
117
+ `);for(let e of me){let t=de(e),n=Ii(e,t);console.log(` ${e}: ${n}`)}console.log("")}M.command("get <key>").description("Get a configuration value").action(i=>{if(me.includes(i)||(console.error(`Unknown config key: ${i}`),console.error(`Valid keys: ${me.join(", ")}`),process.exit(1)),i==="api-url"){console.log(V());return}if(i==="debug"){console.log(_());return}let e=de(i);e?console.log(i==="api-key"?Pi(e):e):(console.error(`${i} is not configured`),process.exit(1))});M.command("set <key> [value]").description("Set a configuration value (prompts if value not provided)").action(async(i,e)=>{me.includes(i)||(console.error(`Unknown config key: ${i}`),console.error(`Valid keys: ${me.join(", ")}`),process.exit(1));let t=i;if(!e){if(ue(`Set ${i}`),t==="api-key"){let n=await Re({message:"Enter your Descript API key:",validate:u=>{if(!u)return"API key is required";if(u.length<10)return"API key seems too short"}});b(n)&&(w("Cancelled"),process.exit(0)),e=n}else if(t==="api-url"){let n=ye(),u=await x({message:"Enter API base URL:",placeholder:J,initialValue:n??"",validate:s=>{if(!s)return"API URL is required (use `config clear api-url` to reset to default)";try{new URL(s)}catch{return"Please enter a valid URL"}}});b(u)&&(w("Cancelled"),process.exit(0)),e=u}else if(t==="debug"){let n=_(),u=await Fe({message:"Enable debug mode? (prints API requests)",initialValue:n});b(u)&&(w("Cancelled"),process.exit(0));let s=u,r=de(t);if(s===r){d.info("Debug mode unchanged");return}St(t,s),d.success(`Debug mode ${s?"enabled":"disabled"}`);return}}if(t==="api-key"&&e&&(await Pt(e)||(w("The API key is invalid. Please check and try again."),process.exit(1))),t==="api-url"&&e)try{new URL(e)}catch{console.error("Invalid URL format for api-url"),process.exit(1)}if(t==="debug"&&typeof e=="string"){e!=="true"&&e!=="false"&&(console.error('Invalid debug value. Use "true" or "false"'),process.exit(1));let n=e==="true",u=de(t);if(n===u){console.log(`${i} unchanged`);return}St(t,n),console.log(`${i} saved to ${$e()}`);return}if(e!=null){let n=de(t);if(e===n){console.log(`${i} unchanged`);return}St(t,e),console.log(`${i} saved to ${$e()}`)}});M.command("clear <key>").description("Clear a configuration value (revert to default)").action(i=>{if(i!=="api-url"&&(console.error(`Cannot clear ${i}. Only api-url can be cleared (to revert to default).`),console.error('Use "config set" to update other values.'),process.exit(1)),!ye()){console.log("api-url already using default");return}_t(),console.log(`api-url cleared. Now using default: ${J}`)});M.command("profiles").description("List all profiles").action(()=>{let i=xt(),e=qe();if(i.length===0){console.log("No profiles configured");return}console.log(`
152
118
  Profiles:
153
- `);for(let r of e)console.log(`${r===t?"* ":" "}${r}`);console.log("")});qe.command("profile <name>").description("Switch to a different profile").action(e=>{try{ds(e),console.log(`Switched to profile: ${e}`)}catch(t){t instanceof Error?console.error(t.message):console.error("An unexpected error occurred"),process.exit(1)}});qe.command("profile:create <name>").description("Create a new profile").action(e=>{try{ms(e),console.log(`Created profile: ${e}`),console.log(`Use "config profile ${e}" to switch to it`)}catch(t){t instanceof Error?console.error(t.message):console.error("An unexpected error occurred"),process.exit(1)}});qe.command("profile:delete <name>").description("Delete a profile").action(e=>{try{qf(e),console.log(`Deleted profile: ${e}`)}catch(t){t instanceof Error?console.error(t.message):console.error("An unexpected error occurred"),process.exit(1)}});function Hf(e){if(!e)return null;let t=parseInt(e,10);if(!isNaN(t)&&t>=0)return t*1e3;let r=Date.parse(e);return isNaN(r)?null:Math.max(0,r-Date.now())}function Kf(e){return e===429||e>=500&&e<600}var bg=["stopped","cancelled"];function wg(e){return bg.includes(e)}function Yf(e){return new Promise(t=>setTimeout(t,e))}function Bg(e){if(e.result&&e.result.status==="error")return e.result.error_message}async function Qu(e,t,r,u={}){let{intervalMs:n=2e3,timeoutMs:s=18e5,maxRetries:i=5,quiet:o=!1}=u,c=o?null:ot(),a=Date.now(),D=()=>`${Math.floor((Date.now()-a)/1e3)}s`;c?.start(`${r} (${D()})`);let l=0;for(;;){let{data:p,error:f,response:h}=await e.GET("/jobs/{job_id}",{params:{path:{job_id:t}}});if(f){if(h&&Kf(h.status)){if(l<i){let g=Hf(h.headers.get("Retry-After"))??Math.min(n*Math.pow(2,l),6e4),v=`${h.status===429?"rate limited":"server error"} (${h.status}), retry ${l+1}/${i} in ${Math.ceil(g/1e3)}s`;o?x.warn(`Job ${t}: ${v}`):c?.message(`${r} (${D()}) - ${v}`),await Yf(g),l++;continue}throw c?.stop("Max retries exceeded"),new Se(h.status,`Request failed after ${i} retries (last status: ${h.status})`)}if(h&&h.status>=400&&h.status<500)return c?.stop("Job polling not available"),o||(x.warn(`Jobs endpoint returned ${h.status} - polling unavailable`),ae()&&(console.error(`
154
- Polling error response:`),console.error(JSON.stringify(f,null,2)))),null;throw c?.stop("Job status check failed"),Jt(f,h)}if(l=0,!p)throw c?.stop("Job status check failed"),new Se(500,"No response data");let m=p.job_state;if(wg(m)){if(m==="cancelled")throw c?.stop(`Job cancelled (${D()})`),new Ke("cancelled","Job was cancelled",p);let F=Bg(p);if(F)throw c?.stop(`Job failed (${D()})`),ae()&&(console.error(`
155
- Job failed - full response:`),console.error(JSON.stringify(p,null,2))),new Ke("failed",F,p);return c?.stop(`Job completed successfully! (${D()})`),ae()&&(console.log(`
156
- Job completed - full response:`),console.log(JSON.stringify(p,null,2))),p}if(Date.now()-a>s)throw c?.stop("Job timed out"),new Ku(`Job ${t} did not complete within ${s}ms`);c?.message(`${r} (${D()}) - ${m}`),await Yf(n)}}var vg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function xg(e){return vg.test(e)}function Sg(e){try{return new URL(e),!0}catch{return!1}}function jr(e){G(e)&&(te("Operation cancelled"),process.exit(0))}async function _g(e){if(e)return x.step(`Project ID: ${e}`),e;let t=await Ee({message:"Enter project ID:",placeholder:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",validate:r=>{if(!r)return"Project ID is required";if(!xg(r))return"Please enter a valid UUID"}});return jr(t),t}async function en(e,t,r="CLI Import",u=!1){if(e)return x.step(`Project ID: ${e}`),{projectId:e};if(t)return x.step(`Project name: ${t}`),{projectName:t};if(u){let s=new Date().toISOString().split("T")[0],i=`${r} ${s}`;return x.step(`Project name: ${i}`),{projectName:i}}let n=await st({message:"Import to new or existing project?",options:[{value:"new",label:"Create new project"},{value:"existing",label:"Use existing project"}]});if(jr(n),n==="new"){let s=new Date().toISOString().split("T")[0],i=`${r} ${s}`,o=await Ee({message:"Enter project name:",placeholder:i,defaultValue:i});return jr(o),{projectName:o||i}}else return{projectId:await _g()}}async function Jf(e){if(e)return x.step(`Prompt: "${e}"`),e;let t=await Ee({message:"What would you like the AI to do?",placeholder:"e.g., add studio sound to all clips",validate:r=>{if(!r)return"Prompt is required"}});return jr(t),t}function zf(){return{media:new Map,sequences:new Map,compositions:[]}}function $g(e){let t=[];for(let r of e.media.keys())t.push({name:r,type:"media"});for(let r of e.sequences.keys())t.push({name:r,type:"sequence"});return t}function Xf(e){let t=new Set;for(let r of e.media.keys())t.add(r);for(let[r,u]of e.sequences){t.add(r);for(let n of u)t.add(n.media)}return t}function Og(e,t){try{let u=new URL(e).pathname.split("/");return u[u.length-1]||t}catch{return t}}function Rg(e,t){if(!t.has(e))return e;let r=e.lastIndexOf("."),u=r>0?e.slice(0,r):e,n=r>0?e.slice(r):"",s=2,i;do i=`${u} ${s}${n}`,s++;while(t.has(i));return i}async function Zf(e){let t=e.media.size+e.sequences.size,r=e.compositions.length,u=await st({message:"What would you like to add?",options:[{value:"media",label:"Media file",hint:"Import from URL"},{value:"sequence",label:"Sequence",hint:"Multitrack (e.g., multicam)"},{value:"composition",label:"Composition",hint:t===0?"Add media first":"Timeline with clips"},{value:"done",label:"Done",hint:t===0?"Nothing to import":`${t} items, ${r} compositions`}]});return jr(u),u}async function gs(e){let t=await Ee({message:"Enter media URL:",placeholder:"https://example.com/video.mp4",validate:o=>{if(o&&!Sg(o))return"Please enter a valid URL"}});if(G(t)||!t)return null;let r=Xf(e),u=Og(t,`media_${e.media.size+1}`),n=Rg(u,r),s=await Ee({message:"Name for this file:",placeholder:n});if(G(s))return null;let i=s||n;if(s&&r.has(i)){x.warn(`Name "${i}" already exists. Please use a different name.`);let o=await Ee({message:"Enter a different name:",validate:c=>{if(!c)return"Name is required";if(r.has(c))return"Name already exists"}});return G(o)?null:{name:o,url:t}}return{name:i,url:t}}async function Qf(e){let t=Xf(e),r="Sequence",u=1;for(;t.has(r);)r=`Sequence_${u}`,u++;let n=await Ee({message:"Sequence name (press Enter for default):",placeholder:r,validate:D=>{if(D&&t.has(D))return"Name already exists"}});if(G(n))return null;let s=n||r;if(t.add(s),Array.from(e.media.entries()).length===0)return x.warn("No media files available. Add some media first before creating a sequence."),null;let o=new Set,c=[],a=!0;for(;a;){let p=[...Array.from(e.media.entries()).filter(([g])=>!o.has(g)).map(([g])=>({value:g,label:g,hint:"media"})),{value:"add_new",label:"Add new media file",hint:""},{value:"done",label:"Done adding tracks",hint:""}],f=await st({message:c.length===0?"Select media for first track:":"Select media for next track:",options:p});if(G(f)){if(c.length===0)return null;break}if(f==="add_new"){let g=await gs(e);g&&(e.media.set(g.name,g.url),x.success(`Added media: ${g.name}`));continue}if(f==="done"){if(c.length===0){x.warn("Sequence must have at least one track.");continue}break}let h=f,m=e.media.get(h),F=await Ee({message:"Time offset in seconds:",placeholder:"0",defaultValue:"0",validate:g=>{let $=parseFloat(g||"0");if(isNaN($))return"Please enter a valid number"}});if(G(F)){if(c.length===0)return null;break}o.add(h),c.push({media:h,url:m,offset:parseFloat(F||"0")})}return c.length===0?(x.warn("Sequence must have at least one track. Skipping."),null):{name:s,tracks:c}}async function ep(e){let t=$g(e);if(t.length===0)return x.warn("No media or sequences available. Add some first."),null;let r=await Ee({message:"Composition name (optional):",placeholder:"Leave empty for default"});if(G(r))return null;let u=r||void 0,n=await Tf({message:"Select items for this composition (space to select, enter to confirm):",options:t.map(i=>({value:i.name,label:i.name,hint:i.type})),required:!1});if(G(n))return null;let s=n;return s.length===0?(x.warn("No items selected. Composition not added."),null):{name:u,items:s}}function tp(){return process.stdout.columns||80}function Ig(e,t){if(t<1&&(t=1),e.length<=t)return[e];let r=e.split(" "),u=[],n="";for(let s of r)if(n.length===0)if(s.length>t){for(let i=0;i<s.length;i+=t)u.push(s.slice(i,i+t));n=u.pop()}else n=s;else if(n.length+1+s.length<=t)n+=" "+s;else if(u.push(n),s.length>t){for(let i=0;i<s.length;i+=t)u.push(s.slice(i,i+t));n=u.pop()}else n=s;return n.length>0&&u.push(n),u}function rp(e,t){return e.split(`
157
- `).flatMap(r=>{let u=r.match(/^(\s*)/)?.[0]??"",n=r.slice(u.length),s=t-u.length;return s<1?[r]:n.length===0?[""]:Ig(n,s).map(i=>u+i)}).join(`
158
- `)}function ze(e){let t=tp()-4;return rp(e,t)}function up(e){let t=tp()-3;return rp(e,t)}function Tg(e,t=60){if(e.length<=t)return e;try{let r=new URL(e),u=`${r.origin}${r.pathname}`;return u.length<=t?u+(r.search?"...":""):u.slice(0,t-3)+"..."}catch{return e.slice(0,t-3)+"..."}}function Ng(e,t,r){let u=[],n="projectId"in t?`Existing project: ${t.projectId}`:`New project: ${t.projectName}`;if(u.push(n),r&&u.push(`Team access: ${r}`),e.media.size>0){u.push(""),u.push(`Media files (${e.media.size}):`);for(let[s,i]of e.media)u.push(` ${s}: ${Tg(i)}`)}if(e.sequences.size>0){u.push(""),u.push(`Sequences (${e.sequences.size}):`);for(let[s,i]of e.sequences){let o=i.map(c=>c.media).join(", ");u.push(` ${s}: ${o} (${i.length} tracks)`)}}if(e.compositions.length>0){u.push(""),u.push(`Compositions (${e.compositions.length}):`);for(let s of e.compositions){let i=s.name||"(default)",o=s.items.length>0?s.items.join(", "):"(empty)";u.push(` ${i}: ${o}`)}}return u.join(`
159
- `)}function Pg(e){let t={};for(let[r,u]of e.media)t[r]={url:u};for(let[r,u]of e.sequences){for(let n of u)t[n.media]||(t[n.media]={url:n.url});t[r]={tracks:u.map(n=>({media:n.media,offset:n.offset!==0?n.offset:void 0}))}}return t}function Lg(e,t=!1){if(e.compositions.length>0)return e.compositions.map(u=>({name:u.name,clips:u.items.map(n=>({media:n}))}));if(!t)return[];let r=[...e.media.keys(),...e.sequences.keys()];return r.length===0?[]:[{clips:r.map(u=>({media:u}))}]}var np=new Xe("import").description("Import media, sequences, and compositions to a project").option("-n, --name, --project-name <name>","Project name (for new projects)").option("-p, --project-id <id>","Existing project ID").option("-m, --media <urls...>","Media URL(s) to import (simple mode)").option("--team-access <level>","Team access level for new projects: edit, comment, none").option("--callback-url <url>","Callback URL for import job notifications").option("--timeout <minutes>","Job polling timeout in minutes","30").option("--new","Create new project with default name").option("--no-composition","Skip creating a composition with imported media").action(async e=>{vt("Descript CLI - Import");try{x.info(`API: ${ke()}`);let t=Zu(),r=parseInt(e.timeout??"30",10);if(isNaN(r)||r<=0)throw new St("Timeout must be a positive number of minutes");let u=r*60*1e3;if(e.teamAccess&&!["edit","comment","none"].includes(e.teamAccess))throw new St("Team access must be one of: edit, comment, none");let n=await en(e.projectId,e.name,"CLI Import",e.new),s=zf();if(e.media&&e.media.length>0){x.step(`Media URLs: ${e.media.length} file(s) from CLI`);for(let[h,m]of e.media.entries())try{let g=new URL(m).pathname.split("/"),$=g[g.length-1]||`media_${h+1}`;s.media.set($,m)}catch{s.media.set(`media_${h+1}`,m)}}else{let h=!1;for(;!h;)switch(await Zf(s)){case"media":{let F=await gs(s);F&&(s.media.set(F.name,F.url),x.success(`Added media: ${F.name}`));break}case"sequence":{let F=await Qf(s);F&&(s.sequences.set(F.name,F.tracks),x.success(`Added sequence: ${F.name} (${F.tracks.length} tracks)`));break}case"composition":{let F=await ep(s);F&&(s.compositions.push(F),x.success(`Added composition: ${F.name||"(default)"}`));break}case"done":h=!0;break}}let i=Pg(s),o=Lg(s,e.composition);He(ze(Ng(s,n,e.teamAccess)),"Import Details");let c=ot();c.start("Creating import job...");let{data:a,error:D,response:l}=await t.POST("/jobs/import/project_media",{body:{..."projectId"in n?{project_id:n.projectId}:{project_name:n.projectName},add_media:i,add_compositions:o,...e.teamAccess&&{team_access:e.teamAccess},...e.callbackUrl&&{callback_url:e.callbackUrl}}});if(D)throw c.stop("Failed to create import job"),ae()&&(console.error(`
160
- API error response:`),console.error(JSON.stringify(D,null,2))),Jt(D,l);if(!a)throw c.stop("Failed to create import job"),new Se(500,"No response data");c.stop("Import job created successfully!"),ae()&&(console.log(`
161
- Import job response:`),console.log(JSON.stringify(a,null,2)));let p=[`Job ID: ${a.job_id}`,`Project ID: ${a.project_id}`,`Project URL: ${a.project_url}`];He(ze(p.join(`
162
- `)),"Import Started");let f=await Qu(t,a.job_id,"Waiting for import to complete...",{timeoutMs:u});if(f&&f.job_type==="import/project_media"&&f.result){let h=f.result,m=[`Status: ${h.status}`];if(h.status!=="error"){m.push(""),m.push("Media:");for(let[F,g]of Object.entries(h.media_status))if(g.status==="success"){let $=g.duration_seconds!=null?` (${g.duration_seconds.toFixed(1)}s)`:"";m.push(` ${F}: ${g.status}${$}`)}else{let $=g.error_message?` - ${g.error_message}`:"";m.push(` ${F}: ${g.status}${$}`)}if(h.created_compositions&&h.created_compositions.length>0){m.push(""),m.push("Compositions created:");for(let F of h.created_compositions)m.push(` ${F.name??F.id??"(unnamed)"}`)}m.push(""),m.push(`Media seconds used: ${h.media_seconds_used}`)}He(ze(m.join(`
163
- `)),"Import Complete")}Yt(`Project: ${a.project_url}`)}catch(t){if(t instanceof Ke){let r=t.formatDetails();te(r[0]),r.length>1&&x.error(r.slice(1).join(`
164
- `))}else if(t instanceof Se){if(te(t.message),t.details&&t.details.length>0)for(let r of t.details)x.error(` ${r}`)}else t instanceof Error?te(t.message):te("An unexpected error occurred");process.exit(1)}});var ip=new Xe("agent").description("Run AI agent editing on a project").option("-p, --project-id <id>","Existing project ID").option("-n, --name, --project-name <name>","Project name (for new projects)").option("-c, --composition-id <id>","Composition ID (optional)").option("--prompt <prompt>","Natural language editing instruction").option("--model <model>","AI model to use for editing").option("--callback-url <url>","Callback URL for job notifications").option("--timeout <minutes>","Job polling timeout in minutes","30").option("--new","Create new project with default name").action(async e=>{vt("Descript CLI - AI Agent");try{x.info(`API: ${ke()}`);let t=Zu(),r=parseInt(e.timeout??"30",10);if(isNaN(r)||r<=0)throw new St("Timeout must be a positive number of minutes");let u=r*60*1e3,n=await en(e.projectId,e.name,"CLI Edit",e.new),s=await Jf(e.prompt),o=["projectId"in n?`Existing project: ${n.projectId}`:`New project: ${n.projectName}`,`Prompt: "${s}"`];e.compositionId&&o.push(`Composition ID: ${e.compositionId}`),e.model&&o.push(`Model: ${e.model}`),He(ze(o.join(`
165
- `)),"Agent Details");let c=ot();c.start("Submitting agent request...");let{data:a,error:D,response:l}=await t.POST("/jobs/agent",{body:{..."projectId"in n?{project_id:n.projectId}:{project_name:n.projectName},composition_id:e.compositionId,prompt:s,model:e.model,...e.callbackUrl&&{callback_url:e.callbackUrl}}});if(D)throw c.stop("Failed to create agent job"),ae()&&(console.error(`
166
- API error response:`),console.error(JSON.stringify(D,null,2))),Jt(D,l);if(!a)throw c.stop("Failed to create agent job"),new Se(500,"No response data");c.stop("Agent job created successfully!"),ae()&&(console.log(`
167
- Agent job response:`),console.log(JSON.stringify(a,null,2)));let p=[`Job ID: ${a.job_id}`,`Project ID: ${a.project_id}`,`Project URL: ${a.project_url}`];He(ze(p.join(`
168
- `)),"Agent Job Submitted");let f=await Qu(t,a.job_id,"Waiting for agent to complete...",{timeoutMs:u});if(f&&f.job_type==="agent"&&f.result){let h=f.result;if(h.status!=="error"){h.agent_response&&(x.step("Agent Response"),x.message(up(h.agent_response)));let m=[`Status: ${h.status}`];m.push(`Project changed: ${h.project_changed?"yes":"no"}`),h.media_seconds_used!=null&&m.push(`Media seconds used: ${h.media_seconds_used}`),h.ai_credits_used!=null&&m.push(`AI credits used: ${h.ai_credits_used}`),He(ze(m.join(`
169
- `)),"Agent Complete")}else He(ze(`Status: ${h.status}`),"Agent Complete")}Yt(`Project: ${a.project_url}`)}catch(t){if(t instanceof Ke){let r=t.formatDetails();te(r[0]),r.length>1&&x.error(r.slice(1).join(`
170
- `))}else if(t instanceof Se){if(te(t.message),t.details&&t.details.length>0)for(let r of t.details)x.error(` ${r}`)}else t instanceof Error?te(t.message):te("An unexpected error occurred");process.exit(1)}});var jg="@descript/platform-cli",sp="0.2.3",Me=new Xe;Me.name("descript-api").description("CLI for Descript API - import media and run AI edits").version(sp);Me.addCommand(qe);Me.addCommand(np);Me.addCommand(ip);Me.command("help [command]").description("Show help for a command").action(e=>{if(!e){Me.help();return}let t=Me.commands.find(r=>r.name()===e);t?t.help():(console.error(`Unknown command: ${e}`),console.error("Run 'descript-api --help' to see available commands."),process.exit(1))});Me.action(()=>{Me.help()});function op(e){Me.parse(e,{from:"user"}),Yi({pkg:{name:jg,version:sp}}).notify()}op(process.argv.slice(2));
171
- /*! Bundled license information:
172
-
173
- deep-extend/lib/deep-extend.js:
174
- (*!
175
- * @description Recursive object extending
176
- * @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
177
- * @license MIT
178
- *
179
- * The MIT License (MIT)
180
- *
181
- * Copyright (c) 2013-2018 Viacheslav Lotsmanov
182
- *
183
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
184
- * this software and associated documentation files (the "Software"), to deal in
185
- * the Software without restriction, including without limitation the rights to
186
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
187
- * the Software, and to permit persons to whom the Software is furnished to do so,
188
- * subject to the following conditions:
189
- *
190
- * The above copyright notice and this permission notice shall be included in all
191
- * copies or substantial portions of the Software.
192
- *
193
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
194
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
195
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
196
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
197
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
198
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
199
- *)
200
-
201
- ky/distribution/index.js:
202
- (*! MIT License © Sindre Sorhus *)
203
- */
119
+ `);for(let t of i)console.log(`${t===e?"* ":" "}${t}`);console.log("")});M.command("profile <name>").description("Switch to a different profile").action(i=>{try{Bt(i),console.log(`Switched to profile: ${i}`)}catch(e){e instanceof Error?console.error(e.message):console.error("An unexpected error occurred"),process.exit(1)}});M.command("profile:create <name>").description("Create a new profile").action(i=>{try{Ot(i),console.log(`Created profile: ${i}`),console.log(`Use "config profile ${i}" to switch to it`)}catch(e){e instanceof Error?console.error(e.message):console.error("An unexpected error occurred"),process.exit(1)}});M.command("profile:delete <name>").description("Delete a profile").action(i=>{try{xi(i),console.log(`Deleted profile: ${i}`)}catch(e){e instanceof Error?console.error(e.message):console.error("An unexpected error occurred"),process.exit(1)}});function ki(i){if(!i)return null;let e=parseInt(i,10);if(!isNaN(e)&&e>=0)return e*1e3;let t=Date.parse(i);return isNaN(t)?null:Math.max(0,t-Date.now())}function ji(i){return i===429||i>=500&&i<600}var _n=["stopped","cancelled"];function vn(i){return _n.includes(i)}function Ri(i){return new Promise(e=>setTimeout(e,i))}function xn(i){if(i.result&&i.result.status==="error")return i.result.error_message}async function He(i,e,t,n={}){let{intervalMs:u=2e3,timeoutMs:s=18e5,maxRetries:r=5,quiet:o=!1}=n,a=o?null:ie(),l=Date.now(),c=()=>`${Math.floor((Date.now()-l)/1e3)}s`;a?.start(`${t} (${c()})`);let p=0;for(;;){let{data:m,error:C,response:h}=await i.GET("/jobs/{job_id}",{params:{path:{job_id:e}}});if(C){if(h&&ji(h.status)){if(p<r){let E=ki(h.headers.get("Retry-After"))??Math.min(u*Math.pow(2,p),6e4),U=`${h.status===429?"rate limited":"server error"} (${h.status}), retry ${p+1}/${r} in ${Math.ceil(E/1e3)}s`;o?d.warn(`Job ${e}: ${U}`):a?.message(`${t} (${c()}) - ${U}`),await Ri(E),p++;continue}throw a?.stop("Max retries exceeded"),new k(h.status,`Request failed after ${r} retries (last status: ${h.status})`)}if(h&&h.status>=400&&h.status<500)return a?.stop("Job polling not available"),o||(d.warn(`Jobs endpoint returned ${h.status} - polling unavailable`),_()&&(console.error(`
120
+ Polling error response:`),console.error(JSON.stringify(C,null,2)))),null;throw a?.stop("Job status check failed"),pe(C,h)}if(p=0,!m)throw a?.stop("Job status check failed"),new k(500,"No response data");let f=m.job_state;if(vn(f)){if(f==="cancelled")throw a?.stop(`Job cancelled (${c()})`),new G("cancelled","Job was cancelled",m);let F=xn(m);if(F)throw a?.stop(`Job failed (${c()})`),_()&&(console.error(`
121
+ Job failed - full response:`),console.error(JSON.stringify(m,null,2))),new G("failed",F,m);return a?.stop(`Job completed successfully! (${c()})`),_()&&(console.log(`
122
+ Job completed - full response:`),console.log(JSON.stringify(m,null,2))),m}if(Date.now()-l>s)throw a?.stop("Job timed out"),new Ve(`Job ${e} did not complete within ${s}ms`);a?.message(`${t} (${c()}) - ${f}`),await Ri(u)}}var Bn=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function On(i){return Bn.test(i)}function Sn(i){try{return new URL(i),!0}catch{return!1}}function we(i){b(i)&&(w("Operation cancelled"),process.exit(0))}async function Pn(i){if(i)return d.step(`Project ID: ${i}`),i;let e=await x({message:"Enter project ID:",placeholder:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",validate:t=>{if(!t)return"Project ID is required";if(!On(t))return"Please enter a valid UUID"}});return we(e),e}async function We(i,e,t="CLI Import",n=!1){if(i)return d.step(`Project ID: ${i}`),{projectId:i};if(e)return d.step(`Project name: ${e}`),{projectName:e};if(n){let s=new Date().toISOString().split("T")[0],r=`${t} ${s}`;return d.step(`Project name: ${r}`),{projectName:r}}let u=await te({message:"Import to new or existing project?",options:[{value:"new",label:"Create new project"},{value:"existing",label:"Use existing project"}]});if(we(u),u==="new"){let s=new Date().toISOString().split("T")[0],r=`${t} ${s}`,o=await x({message:"Enter project name:",placeholder:r,defaultValue:r});return we(o),{projectName:o||r}}else return{projectId:await Pn()}}async function Ti(i){if(i)return d.step(`Prompt: "${i}"`),i;let e=await x({message:"What would you like the AI to do?",placeholder:"e.g., add studio sound to all clips",validate:t=>{if(!t)return"Prompt is required"}});return we(e),e}function Vi(){return{media:new Map,sequences:new Map,compositions:[]}}function In(i){let e=[];for(let t of i.media.keys())e.push({name:t,type:"media"});for(let t of i.sequences.keys())e.push({name:t,type:"sequence"});return e}function Mi(i){let e=new Set;for(let t of i.media.keys())e.add(t);for(let[t,n]of i.sequences){e.add(t);for(let u of n)e.add(u.media)}return e}function kn(i,e){try{let n=new URL(i).pathname.split("/");return n[n.length-1]||e}catch{return e}}function jn(i,e){if(!e.has(i))return i;let t=i.lastIndexOf("."),n=t>0?i.slice(0,t):i,u=t>0?i.slice(t):"",s=2,r;do r=`${n} ${s}${u}`,s++;while(e.has(r));return r}async function Ni(i){let e=i.media.size+i.sequences.size,t=i.compositions.length,n=await te({message:"What would you like to add?",options:[{value:"media",label:"Media file",hint:"Import from URL"},{value:"sequence",label:"Sequence",hint:"Multitrack (e.g., multicam)"},{value:"composition",label:"Composition",hint:e===0?"Add media first":"Timeline with clips"},{value:"done",label:"Done",hint:e===0?"Nothing to import":`${e} items, ${t} compositions`}]});return we(n),n}async function It(i){let e=await x({message:"Enter media URL:",placeholder:"https://example.com/video.mp4",validate:o=>{if(o&&!Sn(o))return"Please enter a valid URL"}});if(b(e)||!e)return null;let t=Mi(i),n=kn(e,`media_${i.media.size+1}`),u=jn(n,t),s=await x({message:"Name for this file:",placeholder:u});if(b(s))return null;let r=s||u;if(s&&t.has(r)){d.warn(`Name "${r}" already exists. Please use a different name.`);let o=await x({message:"Enter a different name:",validate:a=>{if(!a)return"Name is required";if(t.has(a))return"Name already exists"}});return b(o)?null:{name:o,url:e}}return{name:r,url:e}}async function Ui(i){let e=Mi(i),t="Sequence",n=1;for(;e.has(t);)t=`Sequence_${n}`,n++;let u=await x({message:"Sequence name (press Enter for default):",placeholder:t,validate:c=>{if(c&&e.has(c))return"Name already exists"}});if(b(u))return null;let s=u||t;if(e.add(s),Array.from(i.media.entries()).length===0)return d.warn("No media files available. Add some media first before creating a sequence."),null;let o=new Set,a=[],l=!0;for(;l;){let m=[...Array.from(i.media.entries()).filter(([E])=>!o.has(E)).map(([E])=>({value:E,label:E,hint:"media"})),{value:"add_new",label:"Add new media file",hint:""},{value:"done",label:"Done adding tracks",hint:""}],C=await te({message:a.length===0?"Select media for first track:":"Select media for next track:",options:m});if(b(C)){if(a.length===0)return null;break}if(C==="add_new"){let E=await It(i);E&&(i.media.set(E.name,E.url),d.success(`Added media: ${E.name}`));continue}if(C==="done"){if(a.length===0){d.warn("Sequence must have at least one track.");continue}break}let h=C,f=i.media.get(h),F=await x({message:"Time offset in seconds:",placeholder:"0",defaultValue:"0",validate:E=>{let O=parseFloat(E||"0");if(isNaN(O))return"Please enter a valid number"}});if(b(F)){if(a.length===0)return null;break}o.add(h),a.push({media:h,url:f,offset:parseFloat(F||"0")})}return a.length===0?(d.warn("Sequence must have at least one track. Skipping."),null):{name:s,tracks:a}}async function qi(i){let e=In(i);if(e.length===0)return d.warn("No media or sequences available. Add some first."),null;let t=await x({message:"Composition name (optional):",placeholder:"Leave empty for default"});if(b(t))return null;let n=t||void 0,u=await Ai({message:"Select items for this composition (space to select, enter to confirm):",options:e.map(r=>({value:r.name,label:r.name,hint:r.type})),required:!1});if(b(u))return null;let s=u;return s.length===0?(d.warn("No items selected. Composition not added."),null):{name:n,items:s}}function Li(){return process.stdout.columns||80}function Rn(i,e){if(e<1&&(e=1),i.length<=e)return[i];let t=i.split(" "),n=[],u="";for(let s of t)if(u.length===0)if(s.length>e){for(let r=0;r<s.length;r+=e)n.push(s.slice(r,r+e));u=n.pop()}else u=s;else if(u.length+1+s.length<=e)u+=" "+s;else if(n.push(u),s.length>e){for(let r=0;r<s.length;r+=e)n.push(s.slice(r,r+e));u=n.pop()}else u=s;return u.length>0&&n.push(u),n}function Hi(i,e){return i.split(`
123
+ `).flatMap(t=>{let n=t.match(/^(\s*)/)?.[0]??"",u=t.slice(n.length),s=e-n.length;return s<1?[t]:u.length===0?[""]:Rn(u,s).map(r=>n+r)}).join(`
124
+ `)}function z(i){let e=Li()-4;return Hi(i,e)}function Wi(i){let e=Li()-3;return Hi(i,e)}function Tn(i,e=60){if(i.length<=e)return i;try{let t=new URL(i),n=`${t.origin}${t.pathname}`;return n.length<=e?n+(t.search?"...":""):n.slice(0,e-3)+"..."}catch{return i.slice(0,e-3)+"..."}}function Vn(i,e,t){let n=[],u="projectId"in e?`Existing project: ${e.projectId}`:`New project: ${e.projectName}`;if(n.push(u),t&&n.push(`Team access: ${t}`),i.media.size>0){n.push(""),n.push(`Media files (${i.media.size}):`);for(let[s,r]of i.media)n.push(` ${s}: ${Tn(r)}`)}if(i.sequences.size>0){n.push(""),n.push(`Sequences (${i.sequences.size}):`);for(let[s,r]of i.sequences){let o=r.map(a=>a.media).join(", ");n.push(` ${s}: ${o} (${r.length} tracks)`)}}if(i.compositions.length>0){n.push(""),n.push(`Compositions (${i.compositions.length}):`);for(let s of i.compositions){let r=s.name||"(default)",o=s.items.length>0?s.items.join(", "):"(empty)";n.push(` ${r}: ${o}`)}}return n.join(`
125
+ `)}function Mn(i){let e={};for(let[t,n]of i.media)e[t]={url:n};for(let[t,n]of i.sequences){for(let u of n)e[u.media]||(e[u.media]={url:u.url});e[t]={tracks:n.map(u=>({media:u.media,offset:u.offset!==0?u.offset:void 0}))}}return e}function Nn(i,e=!1){if(i.compositions.length>0)return i.compositions.map(n=>({name:n.name,clips:n.items.map(u=>({media:u}))}));if(!e)return[];let t=[...i.media.keys(),...i.sequences.keys()];return t.length===0?[]:[{clips:t.map(n=>({media:n}))}]}var Gi=new X("import").description("Import media, sequences, and compositions to a project").option("-n, --name, --project-name <name>","Project name (for new projects)").option("-p, --project-id <id>","Existing project ID").option("-m, --media <urls...>","Media URL(s) to import (simple mode)").option("--team-access <level>","Team access level for new projects: edit, comment, none").option("--callback-url <url>","Callback URL for import job notifications").option("--timeout <minutes>","Job polling timeout in minutes","30").option("--new","Create new project with default name").option("--no-composition","Skip creating a composition with imported media").action(async i=>{ue("Descript CLI - Import");try{d.info(`API: ${V()}`);let e=Le(),t=parseInt(i.timeout??"30",10);if(isNaN(t)||t<=0)throw new oe("Timeout must be a positive number of minutes");let n=t*60*1e3;if(i.teamAccess&&!["edit","comment","none"].includes(i.teamAccess))throw new oe("Team access must be one of: edit, comment, none");let u=await We(i.projectId,i.name,"CLI Import",i.new),s=Vi();if(i.media&&i.media.length>0){d.step(`Media URLs: ${i.media.length} file(s) from CLI`);for(let[h,f]of i.media.entries())try{let E=new URL(f).pathname.split("/"),O=E[E.length-1]||`media_${h+1}`;s.media.set(O,f)}catch{s.media.set(`media_${h+1}`,f)}}else{let h=!1;for(;!h;)switch(await Ni(s)){case"media":{let F=await It(s);F&&(s.media.set(F.name,F.url),d.success(`Added media: ${F.name}`));break}case"sequence":{let F=await Ui(s);F&&(s.sequences.set(F.name,F.tracks),d.success(`Added sequence: ${F.name} (${F.tracks.length} tracks)`));break}case"composition":{let F=await qi(s);F&&(s.compositions.push(F),d.success(`Added composition: ${F.name||"(default)"}`));break}case"done":h=!0;break}}let r=Mn(s),o=Nn(s,i.composition);W(z(Vn(s,u,i.teamAccess)),"Import Details");let a=ie();a.start("Creating import job...");let{data:l,error:c,response:p}=await e.POST("/jobs/import/project_media",{body:{..."projectId"in u?{project_id:u.projectId}:{project_name:u.projectName},add_media:r,add_compositions:o,...i.teamAccess&&{team_access:i.teamAccess},...i.callbackUrl&&{callback_url:i.callbackUrl}}});if(c)throw a.stop("Failed to create import job"),_()&&(console.error(`
126
+ API error response:`),console.error(JSON.stringify(c,null,2))),pe(c,p);if(!l)throw a.stop("Failed to create import job"),new k(500,"No response data");a.stop("Import job created successfully!"),_()&&(console.log(`
127
+ Import job response:`),console.log(JSON.stringify(l,null,2)));let m=[`Job ID: ${l.job_id}`,`Project ID: ${l.project_id}`,`Project URL: ${l.project_url}`];W(z(m.join(`
128
+ `)),"Import Started");let C=await He(e,l.job_id,"Waiting for import to complete...",{timeoutMs:n});if(C&&C.job_type==="import/project_media"&&C.result){let h=C.result,f=[`Status: ${h.status}`];if(h.status!=="error"){f.push(""),f.push("Media:");for(let[F,E]of Object.entries(h.media_status))if(E.status==="success"){let O=E.duration_seconds!=null?` (${E.duration_seconds.toFixed(1)}s)`:"";f.push(` ${F}: ${E.status}${O}`)}else{let O=E.error_message?` - ${E.error_message}`:"";f.push(` ${F}: ${E.status}${O}`)}if(h.created_compositions&&h.created_compositions.length>0){f.push(""),f.push("Compositions created:");for(let F of h.created_compositions)f.push(` ${F.name??F.id??"(unnamed)"}`)}f.push(""),f.push(`Media seconds used: ${h.media_seconds_used}`)}W(z(f.join(`
129
+ `)),"Import Complete")}ce(`Project: ${l.project_url}`)}catch(e){if(e instanceof G){let t=e.formatDetails();w(t[0]),t.length>1&&d.error(t.slice(1).join(`
130
+ `))}else if(e instanceof k){if(w(e.message),e.details&&e.details.length>0)for(let t of e.details)d.error(` ${t}`)}else e instanceof Error?w(e.message):w("An unexpected error occurred");process.exit(1)}});var Ki=new X("agent").description("Run AI agent editing on a project").option("-p, --project-id <id>","Existing project ID").option("-n, --name, --project-name <name>","Project name (for new projects)").option("-c, --composition-id <id>","Composition ID (optional)").option("--prompt <prompt>","Natural language editing instruction").option("--model <model>","AI model to use for editing").option("--callback-url <url>","Callback URL for job notifications").option("--timeout <minutes>","Job polling timeout in minutes","30").option("--new","Create new project with default name").action(async i=>{ue("Descript CLI - AI Agent");try{d.info(`API: ${V()}`);let e=Le(),t=parseInt(i.timeout??"30",10);if(isNaN(t)||t<=0)throw new oe("Timeout must be a positive number of minutes");let n=t*60*1e3,u=await We(i.projectId,i.name,"CLI Edit",i.new),s=await Ti(i.prompt),o=["projectId"in u?`Existing project: ${u.projectId}`:`New project: ${u.projectName}`,`Prompt: "${s}"`];i.compositionId&&o.push(`Composition ID: ${i.compositionId}`),i.model&&o.push(`Model: ${i.model}`),W(z(o.join(`
131
+ `)),"Agent Details");let a=ie();a.start("Submitting agent request...");let{data:l,error:c,response:p}=await e.POST("/jobs/agent",{body:{..."projectId"in u?{project_id:u.projectId}:{project_name:u.projectName},composition_id:i.compositionId,prompt:s,model:i.model,...i.callbackUrl&&{callback_url:i.callbackUrl}}});if(c)throw a.stop("Failed to create agent job"),_()&&(console.error(`
132
+ API error response:`),console.error(JSON.stringify(c,null,2))),pe(c,p);if(!l)throw a.stop("Failed to create agent job"),new k(500,"No response data");a.stop("Agent job created successfully!"),_()&&(console.log(`
133
+ Agent job response:`),console.log(JSON.stringify(l,null,2)));let m=[`Job ID: ${l.job_id}`,`Project ID: ${l.project_id}`,`Project URL: ${l.project_url}`];W(z(m.join(`
134
+ `)),"Agent Job Submitted");let C=await He(e,l.job_id,"Waiting for agent to complete...",{timeoutMs:n});if(C&&C.job_type==="agent"&&C.result){let h=C.result;if(h.status!=="error"){h.agent_response&&(d.step("Agent Response"),d.message(Wi(h.agent_response)));let f=[`Status: ${h.status}`];f.push(`Project changed: ${h.project_changed?"yes":"no"}`),h.media_seconds_used!=null&&f.push(`Media seconds used: ${h.media_seconds_used}`),h.ai_credits_used!=null&&f.push(`AI credits used: ${h.ai_credits_used}`),W(z(f.join(`
135
+ `)),"Agent Complete")}else W(z(`Status: ${h.status}`),"Agent Complete")}ce(`Project: ${l.project_url}`)}catch(e){if(e instanceof G){let t=e.formatDetails();w(t[0]),t.length>1&&d.error(t.slice(1).join(`
136
+ `))}else if(e instanceof k){if(w(e.message),e.details&&e.details.length>0)for(let t of e.details)d.error(` ${t}`)}else e instanceof Error?w(e.message):w("An unexpected error occurred");process.exit(1)}});var Un="@descript/platform-cli",zi="0.2.5",N=new X;N.name("descript-api").description("CLI for Descript API - import media and run AI edits").version(zi);N.addCommand(M);N.addCommand(Gi);N.addCommand(Ki);N.command("help [command]").description("Show help for a command").action(i=>{if(!i){N.help();return}let e=N.commands.find(t=>t.name()===i);e?e.help():(console.error(`Unknown command: ${i}`),console.error("Run 'descript-api --help' to see available commands."),process.exit(1))});N.action(()=>{N.help()});function Yi(i){N.parse(i,{from:"user"}),(0,Ji.default)({pkg:{name:Un,version:zi}}).notify()}Yi(process.argv.slice(2));