@nice-move/init 0.8.17 → 0.8.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +58 -2
- package/package.json +4 -4
package/dist/cli.mjs
CHANGED
|
@@ -1,2 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
import{createRequire as e}from"module";var t={111:(e,t,r)=>{var i=r(2203).Stream;e.exports=function(e){return{ReadStream:function t(r,n){if(!(this instanceof t))return new t(r,n);i.call(this);var s=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,n=n||{};for(var o=Object.keys(n),a=0,u=o.length;a<u;a++){var c=o[a];this[c]=n[c]}if(this.encoding&&this.setEncoding(this.encoding),void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}null===this.fd?e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return s.emit("error",e),void(s.readable=!1);s.fd=t,s.emit("open",t),s._read()})):process.nextTick((function(){s._read()}))},WriteStream:function t(r,n){if(!(this instanceof t))return new t(r,n);i.call(this),this.path=r,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),o=0,a=s.length;o<a;o++){var u=s[o];this[u]=n[u]}if(void 0!==this.start){if("number"!=typeof this.start)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=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}},130:(e,t,r)=>{const i=r(4635).fromPromise,n=r(6928),s=r(6289),o=r(8006),{pathExists:a}=r(3640),{areIdentical:u}=r(5838);e.exports={createLink:i((async function(e,t){let r,i;try{r=await s.lstat(t)}catch{}try{i=await s.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}if(r&&u(i,r))return;const c=n.dirname(t);await a(c)||await o.mkdirs(c),await s.link(e,t)})),createLinkSync:function(e,t){let r;try{r=s.lstatSync(t)}catch{}try{const t=s.lstatSync(e);if(r&&u(t,r))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const i=n.dirname(t);return s.existsSync(i)||o.mkdirsSync(i),s.linkSync(e,t)}}},136:(e,t,r)=>{const i=r(4264);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}}},249:(e,t,r)=>{const i=r(8459);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}}},271:(e,t,r)=>{e.exports={TextPrompt:r(3392),SelectPrompt:r(4003),TogglePrompt:r(5807),DatePrompt:r(7191),NumberPrompt:r(1270),MultiselectPrompt:r(538),AutocompletePrompt:r(9111),AutocompleteMultiselectPrompt:r(5518),ConfirmPrompt:r(539)}},323:(e,t,r)=>{const i=r(4140),n=r(8360),s=i(n);t.from=e=>{if("number"!=typeof e)throw new TypeError("Expected a number");return n[e]},t.to=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");if(s[e])return Number(s[e])},t.all=new Proxy(s,{get(e,t){const r=e[t];if(r)return Number(r)}})},334:(e,t,r)=>{const i=r(7135);e.exports=function(e,t){let r=String(i(e)||"").split(/\r?\n/);return t?r.map((e=>Math.ceil(e.length/t))).reduce(((e,t)=>e+t)):r.length}},360:(e,t,r)=>{const i=r(6289),n=r(4635).fromPromise;e.exports={symlinkType:n((async function(e,t){if(t)return t;let r;try{r=await i.lstat(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"})),symlinkTypeSync:function(e,t){if(t)return t;let r;try{r=i.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}}},374:e=>{e.exports={stringify:function(e,{EOL:t="\n",finalEOL:r=!0,replacer:i=null,spaces:n}={}){const s=r?t:"";return JSON.stringify(e,i,n).replace(/\n/g,t)+s},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}}},406:(e,t,r)=>{const i=r(8888),n=r(8544),{style:s,clear:o,figures:a,wrap:u,entriesToDisplay:c}=r(7933),{cursor:l}=r(4347);e.exports=class extends n{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map(((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),value:e&&(void 0===e.value?t:e.value),description:e&&e.description,selected:e&&e.selected,disabled:e&&e.disabled}))),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=o("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){0===this.cursor?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,t){if(" "===e)return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(l.hide):this.out.write(o(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:t}=c(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[s.symbol(this.done,this.aborted),i.bold(this.msg),s.delimiter(!1),this.done?this.selection.title:this.selection.disabled?i.yellow(this.warn):i.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let r=e;r<t;r++){let n,s,o="",c=this.choices[r];s=r===e&&e>0?a.arrowUp:r===t-1&&t<this.choices.length?a.arrowDown:" ",c.disabled?(n=this.cursor===r?i.gray().underline(c.title):i.strikethrough().gray(c.title),s=(this.cursor===r?i.bold().gray(a.pointer)+" ":" ")+s):(n=this.cursor===r?i.cyan().underline(c.title):c.title,s=(this.cursor===r?i.cyan(a.pointer)+" ":" ")+s,c.description&&this.cursor===r&&(o=` - ${c.description}`,(s.length+n.length+o.length>=this.out.columns||c.description.split(/\r?\n/).length>1)&&(o="\n"+u(c.description,{margin:3,width:this.out.columns})))),this.outputText+=`${s} ${n}${i.gray(o)}\n`}}this.out.write(this.outputText)}}},442:e=>{const t="win32"===process.platform;function r(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,i){return t&&1===e&&!i.file?r(i.original,"spawn"):null}e.exports={hookChildProcess:function(e,r){if(!t)return;const n=e.emit;e.emit=function(t,s){if("exit"===t){const t=i(s,r);if(t)return n.call(e,"error",t)}return n.apply(e,arguments)}},verifyENOENT:i,verifyENOENTSync:function(e,i){return t&&1===e&&!i.file?r(i.original,"spawnSync"):null},notFoundError:r}},538:(e,t,r)=>{const i=r(8888),n=r(4347).cursor,s=r(7261),o=r(8482),a=o.clear,u=o.figures,c=o.style,l=o.wrap,h=o.entriesToDisplay;e.exports=class extends s{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map(((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),description:e&&e.description,value:e&&(void 0===e.value?t:e.value),selected:e&&e.selected,disabled:e&&e.disabled}))),this.clear=a("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map((e=>!e.selected)),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((e=>e.selected))}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const e=this.value.filter((e=>e.selected));this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){0===this.cursor?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(void 0!==this.maxChoices||this.value[this.cursor].disabled)return this.bell();const e=!this.value[this.cursor].selected;this.value.filter((e=>!e.disabled)).forEach((t=>t.selected=e)),this.render()}_(e,t){if(" "===e)this.handleSpaceToggle();else{if("a"!==e)return this.bell();this.toggleAll()}}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${u.arrowUp}/${u.arrowDown}: Highlight option\n ${u.arrowLeft}/${u.arrowRight}/[space]: Toggle selection\n`+(void 0===this.maxChoices?" a: Toggle all\n":"")+" enter/return: Complete answer":""}renderOption(e,t,r,n){const s=(t.selected?i.green(u.radioOn):u.radioOff)+" "+n+" ";let o,a;return t.disabled?o=e===r?i.gray().underline(t.title):i.strikethrough().gray(t.title):(o=e===r?i.cyan().underline(t.title):t.title,e===r&&t.description&&(a=` - ${t.description}`,(s.length+o.length+a.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(a="\n"+l(t.description,{margin:s.length,width:this.out.columns})))),s+o+i.gray(a||"")}paginateOptions(e){if(0===e.length)return i.red("No matches for this query.");let t,r=h(this.cursor,e.length,this.optionsPerPage),n=r.startIndex,s=r.endIndex,o=[];for(let r=n;r<s;r++)t=r===n&&n>0?u.arrowUp:r===s-1&&s<e.length?u.arrowDown:" ",o.push(this.renderOption(this.cursor,e[r],r,t));return"\n"+o.join("\n")}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");const e=[i.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(i.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(n.hide),super.render();let e=[c.symbol(this.done,this.aborted),i.bold(this.msg),c.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=a(e,this.out.columns)}}},539:(e,t,r)=>{const i=r(8888),n=r(7261),s=r(8482),o=s.style,a=s.clear,u=r(4347),c=u.erase,l=u.cursor;e.exports=class extends n{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){return"y"===e.toLowerCase()?(this.value=!0,this.submit()):"n"===e.toLowerCase()?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(l.hide):this.out.write(a(this.outputText,this.out.columns)),super.render(),this.outputText=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:i.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(c.line+l.to(0)+this.outputText))}}},600:(e,t,r)=>{const i=r(7257);e.exports=(e="")=>{const t=e.match(i);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return"env"===s?n:n?`${s} ${n}`:s}},627:(e,t,r)=>{var i,n,s=r(9896),o=r(8254),a=r(111),u=r(8359),c=r(9023);function l(e,t){Object.defineProperty(e,i,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(i=Symbol.for("graceful-fs.queue"),n=Symbol.for("graceful-fs.previous")):(i="___graceful-fs.queue",n="___graceful-fs.previous");var h,d=function(){};if(c.debuglog?d=c.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(d=function(){var e=c.format.apply(c,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!s[i]){var p=global[i]||[];l(s,p),s.close=function(e){function t(t,r){return e.call(s,t,(function(e){e||g(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(t,n,{value:e}),t}(s.close),s.closeSync=function(e){function t(t){e.apply(s,arguments),g()}return Object.defineProperty(t,n,{value:e}),t}(s.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){d(s[i]),r(2613).equal(s[i].length,0)}))}function f(e){o(e),e.gracefulify=f,e.createReadStream=function(t,r){return new e.ReadStream(t,r)},e.createWriteStream=function(t,r){return new e.WriteStream(t,r)};var t=e.readFile;e.readFile=function(e,r,i){return"function"==typeof r&&(i=r,r=null),function e(r,i,n,s){return t(r,i,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof n&&n.apply(this,arguments):m([e,[r,i,n],t,s||Date.now(),Date.now()])}))}(e,r,i)};var r=e.writeFile;e.writeFile=function(e,t,i,n){return"function"==typeof i&&(n=i,i=null),function e(t,i,n,s,o){return r(t,i,n,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof s&&s.apply(this,arguments):m([e,[t,i,n,s],r,o||Date.now(),Date.now()])}))}(e,t,i,n)};var i=e.appendFile;i&&(e.appendFile=function(e,t,r,n){return"function"==typeof r&&(n=r,r=null),function e(t,r,n,s,o){return i(t,r,n,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof s&&s.apply(this,arguments):m([e,[t,r,n,s],i,o||Date.now(),Date.now()])}))}(e,t,r,n)});var n=e.copyFile;n&&(e.copyFile=function(e,t,r,i){return"function"==typeof r&&(i=r,r=0),function e(t,r,i,s,o){return n(t,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof s&&s.apply(this,arguments):m([e,[t,r,i,s],n,o||Date.now(),Date.now()])}))}(e,t,r,i)});var s=e.readdir;e.readdir=function(e,t,r){"function"==typeof t&&(r=t,t=null);var i=u.test(process.version)?function(e,t,r,i){return s(e,n(e,t,r,i))}:function(e,t,r,i){return s(e,t,n(e,t,r,i))};return i(e,t,r);function n(e,t,r,n){return function(s,o){!s||"EMFILE"!==s.code&&"ENFILE"!==s.code?(o&&o.sort&&o.sort(),"function"==typeof r&&r.call(this,s,o)):m([i,[e,t,r],s,n||Date.now(),Date.now()])}}};var u=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var c=a(e);g=c.ReadStream,D=c.WriteStream}var l=e.ReadStream;l&&(g.prototype=Object.create(l.prototype),g.prototype.open=function(){var e=this;b(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var h=e.WriteStream;h&&(D.prototype=Object.create(h.prototype),D.prototype.open=function(){var e=this;b(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return g},set:function(e){g=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return D},set:function(e){D=e},enumerable:!0,configurable:!0});var d=g;Object.defineProperty(e,"FileReadStream",{get:function(){return d},set:function(e){d=e},enumerable:!0,configurable:!0});var p=D;function g(e,t){return this instanceof g?(l.apply(this,arguments),this):g.apply(Object.create(g.prototype),arguments)}function D(e,t){return this instanceof D?(h.apply(this,arguments),this):D.apply(Object.create(D.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return p},set:function(e){p=e},enumerable:!0,configurable:!0});var y=e.open;function b(e,t,r,i){return"function"==typeof r&&(i=r,r=null),function e(t,r,i,n,s){return y(t,r,i,(function(o,a){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?"function"==typeof n&&n.apply(this,arguments):m([e,[t,r,i,n],o,s||Date.now(),Date.now()])}))}(e,t,r,i)}return e.open=b,e}function m(e){d("ENQUEUE",e[0].name,e[1]),s[i].push(e),D()}function g(){for(var e=Date.now(),t=0;t<s[i].length;++t)s[i][t].length>2&&(s[i][t][3]=e,s[i][t][4]=e);D()}function D(){if(clearTimeout(h),h=void 0,0!==s[i].length){var e=s[i].shift(),t=e[0],r=e[1],n=e[2],o=e[3],a=e[4];if(void 0===o)d("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-o>=6e4){d("TIMEOUT",t.name,r);var u=r.pop();"function"==typeof u&&u.call(null,n)}else{var c=Date.now()-a,l=Math.max(a-o,1);c>=Math.min(1.2*l,100)?(d("RETRY",t.name,r),t.apply(null,r.concat([o]))):s[i].push(e)}void 0===h&&(h=setTimeout(D,0))}}global[i]||l(global,s[i]),e.exports=f(u(s)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!s.__patched&&(e.exports=f(s),s.__patched=!0)},709:(e,t,r)=>{e.exports=n,n.sync=function(e,t){return s(i.statSync(e),t)};var i=r(9896);function n(e,t,r){i.stat(e,(function(e,i){r(e,!e&&s(i,t))}))}function s(e,t){return e.isFile()&&function(e,t){var r=e.mode,i=e.uid,n=e.gid,s=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),o=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),u=parseInt("010",8);return r&parseInt("001",8)||r&u&&n===o||r&a&&i===s||r&(a|u)&&0===s}(e,t)}},857:t=>{t.exports=e(import.meta.url)("os")},1199:(e,t,r)=>{const i=r(4635).fromPromise,n=r(6289),s=r(6928),o=r(8006),a=r(9630),u=i((async function(e){let t;try{t=await n.readdir(e)}catch{return o.mkdirs(e)}return Promise.all(t.map((t=>a.remove(s.join(e,t)))))}));function c(e){let t;try{t=n.readdirSync(e)}catch{return o.mkdirsSync(e)}t.forEach((t=>{t=s.join(e,t),a.removeSync(t)}))}e.exports={emptyDirSync:c,emptydirSync:c,emptyDir:u,emptydir:u}},1270:(e,t,r)=>{function i(e,t,r,i,n,s,o){try{var a=e[s](o),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(i,n)}function n(e){return function(){var t=this,r=arguments;return new Promise((function(n,s){var o=e.apply(t,r);function a(e){i(o,n,s,a,u,"next",e)}function u(e){i(o,n,s,a,u,"throw",e)}a(void 0)}))}}const s=r(8888),o=r(7261),a=r(4347),u=a.cursor,c=a.erase,l=r(8482),h=l.style,d=l.figures,p=l.clear,f=l.lines,m=/[0-9]/,g=e=>void 0!==e,D=(e,t)=>{let r=Math.pow(10,t);return Math.round(e*r)/r};e.exports=class extends o{constructor(e={}){super(e),this.transform=h.render(e.style),this.msg=e.message,this.initial=g(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=g(e.min)?e.min:-1/0,this.max=g(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){e||0===e?(this.placeholder=!1,this.rendered=this.transform.render(`${D(e,this.round)}`),this._value=D(e,this.round)):(this.placeholder=!0,this.rendered=s.gray(this.transform.render(`${this.initial}`)),this._value=""),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return"-"===e||"."===e&&this.float||m.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=""!==e?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var e=this;return n((function*(){let t=yield e.validator(e.value);"string"==typeof t&&(e.errorMsg=t,t=!1),e.error=!t}))()}submit(){var e=this;return n((function*(){if(yield e.validate(),e.error)return e.color="red",e.fire(),void e.render();let t=e.value;e.value=""!==t?t:e.initial,e.done=!0,e.aborted=!1,e.error=!1,e.fire(),e.render(),e.out.write("\n"),e.close()}))()}up(){if(this.typed="",""===this.value&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",""===this.value&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(0===e.length)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",""!==this.value&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,t){if(!this.valid(e))return this.bell();const r=Date.now();if(r-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=r,this.color="cyan","."===e)return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(u.down(f(this.outputError,this.out.columns)-1)+p(this.outputError,this.out.columns)),this.out.write(p(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[h.symbol(this.done,this.aborted),s.bold(this.msg),h.delimiter(this.done),this.done&&(this.done||this.placeholder)?this.rendered:s[this.color]().underline(this.rendered)].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((e,t,r)=>e+`\n${r?" ":d.pointerSmall} ${s.red().italic(t)}`),"")),this.out.write(c.line+u.to(0)+this.outputText+u.save+this.outputError+u.restore))}}},1271:(e,t,r)=>{const i=r(4264);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}},1319:(e,t,r)=>{const i=r(6928);e.exports.checkPath=function(e){if("win32"===process.platform&&/[<>:"|?*]/.test(e.replace(i.parse(e).root,""))){const t=new Error(`Path contains invalid characters: ${e}`);throw t.code="EINVAL",t}}},1364:(e,t,r)=>{const i=r(3027);e.exports=(e,t)=>new i(e,t)},1376:(e,t,r)=>{const i=r(4635).fromPromise,n=r(6289),s=r(6928),o=r(8006),a=r(3640).pathExists;e.exports={outputFile:i((async function(e,t,r="utf-8"){const i=s.dirname(e);return await a(i)||await o.mkdirs(i),n.writeFile(e,t,r)})),outputFileSync:function(e,...t){const r=s.dirname(e);n.existsSync(r)||o.mkdirsSync(r),n.writeFileSync(e,...t)}}},1416:(e,t,r)=>{var i=r(1813);e.exports=function(e){if("string"!=typeof e)throw new TypeError("expected author to be a string");if(!e||!/\w/.test(e))return{};var t=[].concat.apply([],i().exec(e)),r={};t[1]&&(r.name=t[1]);for(var n=2;n<t.length;n++){var s=t[n];n%2==0&&s&&t[n+1]&&("<"===s.charAt(0)?(r.email=t[n+1],n++):"("===s.charAt(0)&&(r.url=t[n+1],n++))}return r}},1433:(e,t,r)=>{const i=r(8888),n=r(8544),{erase:s,cursor:o}=r(4347),{style:a,clear:u,lines:c,figures:l}=r(7933);e.exports=class extends n{constructor(e={}){super(e),this.transform=a.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=u("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=i.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let e=await this.validator(this.value);"string"==typeof e&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error)return this.red=!0,this.fire(),void this.render();this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,t){let r=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${r}${e}${i}`,this.red=!1,this.cursor=this.placeholder?0:r.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),t=this.value.slice(this.cursor);this.value=`${e}${t}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),t=this.value.slice(this.cursor+1);this.value=`${e}${t}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return 0===this.cursor||this.placeholder&&1===this.cursor}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(o.down(c(this.outputError,this.out.columns)-1)+u(this.outputError,this.out.columns)),this.out.write(u(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[a.symbol(this.done,this.aborted),i.bold(this.msg),a.delimiter(this.done),this.red?i.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((e,t,r)=>e+`\n${r?" ":l.pointerSmall} ${i.red().italic(t)}`),"")),this.out.write(s.line+o.to(0)+this.outputText+o.save+this.outputError+o.restore+o.move(this.cursorOffset,0)))}}},1473:(e,t,r)=>{const i=Object.assign({},r(7256)),n=Object.keys(i);Object.defineProperty(i,"random",{get(){const e=Math.floor(Math.random()*n.length),t=n[e];return i[t]}}),e.exports=i},1485:e=>{e.exports=(e,t={})=>{const r=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",i=t.width;return(e||"").split(/\r?\n/g).map((e=>e.split(/\s+/g).reduce(((e,t)=>(t.length+r.length>=i||e[e.length-1].length+t.length+1<i?e[e.length-1]+=` ${t}`:e.push(`${r}${t}`),e)),[r]).join("\n"))).join("\n")}},1516:(e,t,r)=>{const i=r(8459);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}},1582:(e,t,r)=>{const i=r(8888),n=r(8544),{style:s,clear:o}=r(7933),{cursor:a,erase:u}=r(4347);e.exports=class extends n{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(!1===this.value)return this.bell();this.value=!1,this.render()}activate(){if(!0===this.value)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,t){if(" "===e)this.value=!this.value;else if("1"===e)this.value=!0;else{if("0"!==e)return this.bell();this.value=!1}this.render()}render(){this.closed||(this.firstRender?this.out.write(a.hide):this.out.write(o(this.outputText,this.out.columns)),super.render(),this.outputText=[s.symbol(this.done,this.aborted),i.bold(this.msg),s.delimiter(this.done),this.value?this.inactive:i.cyan().underline(this.inactive),i.gray("/"),this.value?i.cyan().underline(this.active):this.active].join(" "),this.out.write(u.line+a.to(0)+this.outputText))}}},1693:(e,t,r)=>{e.exports={DatePart:r(4264),Meridiem:r(6551),Day:r(8171),Hours:r(9518),Milliseconds:r(1271),Minutes:r(136),Month:r(2103),Seconds:r(6272),Year:r(2968)}},1754:(e,t,r)=>{const i=r(857),n=r(4891),s=process.env;let o;function a(e){const t=function(e){if(!1===o)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(e&&!e.isTTY&&!0!==o)return 0;const t=o?1:0;if("win32"===process.platform){const e=i.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in s))||"codeship"===s.CI_NAME?1:t;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if("truecolor"===s.COLORTERM)return 3;if("TERM_PROGRAM"in s){const e=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:(s.TERM,t)}(e);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(t)}n("no-color")||n("no-colors")||n("color=false")?o=!1:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(o=!0),"FORCE_COLOR"in s&&(o=0===s.FORCE_COLOR.length||0!==parseInt(s.FORCE_COLOR,10)),e.exports={supportsColor:a,stdout:a(process.stdout),stderr:a(process.stderr)}},1787:e=>{e.exports=(e,t)=>{if(!e.meta||"escape"===e.name){if(e.ctrl){if("a"===e.name)return"first";if("c"===e.name)return"abort";if("d"===e.name)return"abort";if("e"===e.name)return"last";if("g"===e.name)return"reset"}if(t){if("j"===e.name)return"down";if("k"===e.name)return"up"}return"return"===e.name||"enter"===e.name?"submit":"backspace"===e.name?"delete":"delete"===e.name?"deleteForward":"abort"===e.name?"abort":"escape"===e.name?"exit":"tab"===e.name?"next":"pagedown"===e.name?"nextPage":"pageup"===e.name?"prevPage":"home"===e.name?"home":"end"===e.name?"end":"up"===e.name?"up":"down"===e.name?"down":"right"===e.name?"right":"left"===e.name&&"left"}}},1796:(e,t,r)=>{const i=r(627),n=r(6928),s=r(8006).mkdirsSync,o=r(9467).utimesMillisSync,a=r(5838);function u(e,t,r,s){const o=(s.dereference?i.statSync:i.lstatSync)(t);if(o.isDirectory())return function(e,t,r,n,s){return t?h(r,n,s):function(e,t,r,n){return i.mkdirSync(r),h(t,r,n),l(r,e)}(e.mode,r,n,s)}(o,e,t,r,s);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return function(e,t,r,n,s){return t?function(e,t,r,n){if(n.overwrite)return i.unlinkSync(r),c(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}(e,r,n,s):c(e,r,n,s)}(o,e,t,r,s);if(o.isSymbolicLink())return function(e,t,r,s){let o=i.readlinkSync(t);if(s.dereference&&(o=n.resolve(process.cwd(),o)),e){let e;try{e=i.readlinkSync(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return i.symlinkSync(o,r);throw e}if(s.dereference&&(e=n.resolve(process.cwd(),e)),a.isSrcSubdir(o,e))throw new Error(`Cannot copy '${o}' to a subdirectory of itself, '${e}'.`);if(a.isSrcSubdir(e,o))throw new Error(`Cannot overwrite '${e}' with '${o}'.`);return function(e,t){return i.unlinkSync(t),i.symlinkSync(e,t)}(o,r)}return i.symlinkSync(o,r)}(e,t,r,s);if(o.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(o.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function c(e,t,r,n){return i.copyFileSync(t,r),n.preserveTimestamps&&function(e,t,r){(function(e){return!(128&e)})(e)&&function(e,t){l(e,128|t)}(r,e),function(e,t){const r=i.statSync(e);o(t,r.atime,r.mtime)}(t,r)}(e.mode,t,r),l(r,e.mode)}function l(e,t){return i.chmodSync(e,t)}function h(e,t,r){const n=i.opendirSync(e);try{let i;for(;null!==(i=n.readSync());)d(i.name,e,t,r)}finally{n.closeSync()}}function d(e,t,r,i){const s=n.join(t,e),o=n.join(r,e);if(i.filter&&!i.filter(s,o))return;const{destStat:c}=a.checkPathsSync(s,o,"copy",i);return u(c,s,o,i)}e.exports=function(e,t,r){"function"==typeof r&&(r={filter:r}),(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:o,destStat:c}=a.checkPathsSync(e,t,"copy",r);if(a.checkParentPathsSync(e,o,t,"copy"),r.filter&&!r.filter(e,t))return;const l=n.dirname(t);return i.existsSync(l)||s(l),u(c,e,t,r)}},1813:e=>{e.exports=function(){return/^\s*([^<(]*?)\s*([<(]([^>)]*?)[>)])?\s*([<(]([^>)]*?)[>)])*\s*$/}},1872:(e,t,r)=>{const i=r(4635).fromPromise,n=r(6928),s=r(6289),o=r(8006);e.exports={createFile:i((async function(e){let t;try{t=await s.stat(e)}catch{}if(t&&t.isFile())return;const r=n.dirname(e);let i=null;try{i=await s.stat(r)}catch(t){if("ENOENT"===t.code)return await o.mkdirs(r),void await s.writeFile(e,"");throw t}i.isDirectory()?await s.writeFile(e,""):await s.readdir(r)})),createFileSync:function(e){let t;try{t=s.statSync(e)}catch{}if(t&&t.isFile())return;const r=n.dirname(e);try{s.statSync(r).isDirectory()||s.readdirSync(r)}catch(e){if(!e||"ENOENT"!==e.code)throw e;o.mkdirsSync(r)}s.writeFileSync(e,"")}}},1880:(e,t,r)=>{const i=r(9896),n=r(600);e.exports=function(e){const t=Buffer.alloc(150);let r;try{r=i.openSync(e,"r"),i.readSync(r,t,0,150,0),i.closeSync(r)}catch(e){}return n(t.toString())}},1905:(e,t,r)=>{const i="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,n=r(6928),s=i?";":":",o=r(9344),a=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),u=(e,t)=>{const r=t.colon||s,n=e.match(/\//)||i&&e.match(/\\/)?[""]:[...i?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=i?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=i?o.split(r):[""];return i&&-1!==e.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:n,pathExt:a,pathExtExe:o}},c=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:i,pathExt:s,pathExtExe:c}=u(e,t),l=[],h=r=>new Promise(((s,o)=>{if(r===i.length)return t.all&&l.length?s(l):o(a(e));const u=i[r],c=/^".*"$/.test(u)?u.slice(1,-1):u,h=n.join(c,e),p=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;s(d(p,r,0))})),d=(e,r,i)=>new Promise(((n,a)=>{if(i===s.length)return n(h(r+1));const u=s[i];o(e+u,{pathExt:c},((s,o)=>{if(!s&&o){if(!t.all)return n(e+u);l.push(e+u)}return n(d(e,r,i+1))}))}));return r?h(0).then((e=>r(null,e)),r):h(0)};e.exports=c,c.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:i,pathExtExe:s}=u(e,t),c=[];for(let a=0;a<r.length;a++){const u=r[a],l=/^".*"$/.test(u)?u.slice(1,-1):u,h=n.join(l,e),d=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;for(let e=0;e<i.length;e++){const r=d+i[e];try{if(o.sync(r,{pathExt:s})){if(!t.all)return r;c.push(r)}}catch(e){}}}if(t.all&&c.length)return c;if(t.nothrow)return null;throw a(e)}},2018:t=>{t.exports=e(import.meta.url)("tty")},2077:e=>{const t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e.replace(t,"^$1")},e.exports.argument=function(e,r){return e=(e=`"${e=(e=(e=`${e}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(t,"^$1"),r&&(e=e.replace(t,"^$1")),e}},2103:(e,t,r)=>{const i=r(4264);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),t=this.token.length;return 2===t?String(e+1).padStart(2,"0"):3===t?this.locales.monthsShort[e]:4===t?this.locales.months[e]:String(e+1)}}},2203:t=>{t.exports=e(import.meta.url)("stream")},2481:(e,t,r)=>{function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function a(e,t,r,i,n,s,o){try{var a=e[s](o),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(i,n)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(i,n){var s=e.apply(t,r);function o(e){a(s,i,n,o,u,"next",e)}function u(e){a(s,i,n,o,u,"throw",e)}o(void 0)}))}}const c=r(3682),l=["suggest","format","onState","validate","onRender","type"],h=()=>{};function d(){return p.apply(this,arguments)}function p(){return p=u((function*(e=[],{onSubmit:t=h,onCancel:r=h}={}){const i={},s=d._override||{};let a,p,m,g,D,y;e=[].concat(e);const b=function(){var e=u((function*(e,t,r=!1){if(r||!e.validate||!0===e.validate(t))return e.format?yield e.format(t,i):t}));return function(t,r){return e.apply(this,arguments)}}();var w,v=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var i=0,n=function(){};return{s:n,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw s}}}}(e);try{for(v.s();!(w=v.n()).done;){p=w.value;var E=p;if(g=E.name,D=E.type,"function"==typeof D&&(D=yield D(a,n({},i),p),p.type=D),D){for(let e in p){if(l.includes(e))continue;let t=p[e];p[e]="function"==typeof t?yield t(a,n({},i),y):t}if(y=p,"string"!=typeof p.message)throw new Error("prompt message is required");var F=p;if(g=F.name,D=F.type,void 0===c[D])throw new Error(`prompt type (${D}) is not defined`);if(void 0===s[p.name]||(a=yield b(p,s[p.name]),void 0===a)){try{a=d._injected?f(d._injected,p.initial):yield c[D](p),i[g]=a=yield b(p,a,!0),m=yield t(p,a,i)}catch(e){m=!(yield r(p,i))}if(m)return i}else i[g]=a}}}catch(e){v.e(e)}finally{v.f()}return i})),p.apply(this,arguments)}function f(e,t){const r=e.shift();if(r instanceof Error)throw r;return void 0===r?t:r}e.exports=Object.assign(d,{prompt:d,prompts:c,inject:function(e){d._injected=(d._injected||[]).concat(e)},override:function(e){d._override=Object.assign({},e)}})},2583:(e,t,r)=>{const i=r(8459);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}}},2613:t=>{t.exports=e(import.meta.url)("assert")},2690:(e,t,r)=>{const i=r(6289),n=r(6928),{copy:s}=r(7751),{remove:o}=r(9630),{mkdirp:a}=r(8006),{pathExists:u}=r(3640),c=r(5838);e.exports=async function(e,t,r={}){const l=r.overwrite||r.clobber||!1,{srcStat:h,isChangingCase:d=!1}=await c.checkPaths(e,t,"move",r);await c.checkParentPaths(e,h,t,"move");const p=n.dirname(t);return n.parse(p).root!==p&&await a(p),async function(e,t,r,n){if(!n)if(r)await o(t);else if(await u(t))throw new Error("dest already exists.");try{await i.rename(e,t)}catch(i){if("EXDEV"!==i.code)throw i;await async function(e,t,r){const i={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return await s(e,t,i),o(e)}(e,t,r)}}(e,t,l,d)}},2728:(e,t,r)=>{const i=r(2018),n=r(9023);t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let i=0;i<r.length;i++)e.inspectOpts[r[i]]=t.inspectOpts[r[i]]},t.log=function(...e){return process.stderr.write(n.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(r){const{namespace:i,useColors:n}=this;if(n){const t=this.color,n="\x1b[3"+(t<8?t:"8;5;"+t),s=` ${n};1m${i} \x1b[0m`;r[0]=s+r[0].split("\n").join("\n"+s),r.push(n+"m+"+e.exports.humanize(this.diff)+"\x1b[0m")}else r[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+i+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):i.isatty(process.stderr.fd)},t.destroy=n.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=r(1754);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let i=process.env[t];return i=!!/^(yes|on|true|enabled)$/i.test(i)||!/^(no|off|false|disabled)$/i.test(i)&&("null"===i?null:Number(i)),e[r]=i,e}),{}),e.exports=r(9565)(t);const{formatters:s}=e.exports;s.o=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},s.O=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts)}},2968:(e,t,r)=>{const i=r(4264);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return 2===this.token.length?e.substr(-2):e}}},2974:(e,t,r)=>{const i=r(6928),n=r(6289),{pathExists:s}=r(3640),o=r(4635).fromPromise;e.exports={symlinkPaths:o((async function(e,t){if(i.isAbsolute(e)){try{await n.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:e}}const r=i.dirname(t),o=i.join(r,e);if(await s(o))return{toCwd:o,toDst:e};try{await n.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:i.relative(r,e)}})),symlinkPathsSync:function(e,t){if(i.isAbsolute(e)){if(!n.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}const r=i.dirname(t),s=i.join(r,e);if(n.existsSync(s))return{toCwd:s,toDst:e};if(!n.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:i.relative(r,e)}}}},3027:(e,t,r)=>{const i=r(6928),n=r(8611),s=r(5692),o=r(7124),a=r(3480),u=r(3106),{URL:c}=r(7016),l=r(5495),h=["gzip","deflate","br"];e.exports=class{constructor(e,t="GET"){return this.url="string"==typeof e?new c(e):e,this.method=t,this.data=null,this.sendDataAs=null,this.reqHeaders={},this.streamEnabled=!1,this.compressionEnabled=!1,this.timeoutTime=null,this.coreOptions={},this.maxRedirects=0,this.resOptions={maxBuffer:5e7},this}followRedirects(e){return this.maxRedirects=e,this}query(e,t){return"object"==typeof e?Object.keys(e).forEach((t=>{this.url.searchParams.append(t,e[t])})):this.url.searchParams.append(e,t),this}path(e){return this.url.pathname=i.join(this.url.pathname,e),this}body(e,t){return this.sendDataAs="object"!=typeof e||t||Buffer.isBuffer(e)?t?t.toLowerCase():"buffer":"json",this.data="form"===this.sendDataAs?a.stringify(e):"json"===this.sendDataAs?JSON.stringify(e):e,this}header(e,t){return"object"==typeof e?Object.keys(e).forEach((t=>{this.reqHeaders[t.toLowerCase()]=e[t]})):this.reqHeaders[e.toLowerCase()]=t,this}timeout(e){return this.timeoutTime=e,this}option(e,t){return this.coreOptions[e]=t,this}stream(){return this.streamEnabled=!0,this}compress(){return this.compressionEnabled=!0,this.reqHeaders["accept-encoding"]||(this.reqHeaders["accept-encoding"]=h.join(", ")),this}send(){return new Promise(((e,t)=>{this.data&&(this.reqHeaders.hasOwnProperty("content-type")||("json"===this.sendDataAs?this.reqHeaders["content-type"]="application/json":"form"===this.sendDataAs&&(this.reqHeaders["content-type"]="application/x-www-form-urlencoded")),this.reqHeaders.hasOwnProperty("content-length")||(this.reqHeaders["content-length"]=Buffer.byteLength(this.data)));const r=Object.assign({protocol:this.url.protocol,host:this.url.hostname.replace("[","").replace("]",""),port:this.url.port,path:this.url.pathname+(null===this.url.search?"":this.url.search),method:this.method,headers:this.reqHeaders,maxRedirects:this.maxRedirects},this.coreOptions);let i;const a=(e=>{let t,r;if(this.maxRedirects<=0?(t=n.request,r=s.request):(t=o.http.request,r=o.https.request),"http:"===e)return t;if("https:"===e)return r;throw new Error("Bad URL protocol: "+e)})(this.url.protocol);i=a(r,(r=>{let i,n=r;this.compressionEnabled&&("gzip"===r.headers["content-encoding"]?n=r.pipe(u.createGunzip()):"deflate"===r.headers["content-encoding"]?n=r.pipe(u.createInflate()):"br"===r.headers["content-encoding"]&&(n=r.pipe(u.createBrotliDecompress()))),this.streamEnabled?e(n):(i=new l(r,this.resOptions),n.on("error",(e=>{t(e)})),n.on("aborted",(()=>{t(new Error("Server aborted request"))})),n.on("data",(e=>{i._addChunk(e),null!==this.resOptions.maxBuffer&&i.body.length>this.resOptions.maxBuffer&&(n.destroy(),t("Received a response which was longer than acceptable when buffering. ("+this.body.length+" bytes)"))})),n.on("end",(()=>{e(i)})))})),this.timeoutTime&&i.setTimeout(this.timeoutTime,(()=>{i.abort(),this.streamEnabled||t(new Error("Timeout reached"))})),i.on("error",(e=>{t(e)})),this.data&&i.write(this.data),i.end()}))}}},3106:t=>{t.exports=e(import.meta.url)("zlib")},3211:(e,t,r)=>{const i=r(4635).fromPromise,n=r(6928),s=r(6289),{mkdirs:o,mkdirsSync:a}=r(8006),{symlinkPaths:u,symlinkPathsSync:c}=r(2974),{symlinkType:l,symlinkTypeSync:h}=r(360),{pathExists:d}=r(3640),{areIdentical:p}=r(5838);e.exports={createSymlink:i((async function(e,t,r){let i;try{i=await s.lstat(t)}catch{}if(i&&i.isSymbolicLink()){const[r,i]=await Promise.all([s.stat(e),s.stat(t)]);if(p(r,i))return}const a=await u(e,t);e=a.toDst;const c=await l(a.toCwd,r),h=n.dirname(t);return await d(h)||await o(h),s.symlink(e,t,c)})),createSymlinkSync:function(e,t,r){let i;try{i=s.lstatSync(t)}catch{}if(i&&i.isSymbolicLink()){const r=s.statSync(e),i=s.statSync(t);if(p(r,i))return}const o=c(e,t);e=o.toDst,r=h(o.toCwd,r);const u=n.dirname(t);return s.existsSync(u)||a(u),s.symlinkSync(e,t,r)}}},3248:e=>{const t={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25c9",radioOff:"\u25ef",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203a",line:"\u2500",pointer:"\u276f"},r={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221a",cross:"\xd7",ellipsis:"...",pointerSmall:"\xbb",line:"\u2500",pointer:">"},i="win32"===process.platform?r:t;e.exports=i},3298:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let i=0,n=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(n=i))})),t.splice(n,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(9565)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},3317:(e,t,r)=>{const i=r(8459);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}}},3339:t=>{t.exports=e(import.meta.url)("module")},3392:(e,t,r)=>{function i(e,t,r,i,n,s,o){try{var a=e[s](o),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(i,n)}function n(e){return function(){var t=this,r=arguments;return new Promise((function(n,s){var o=e.apply(t,r);function a(e){i(o,n,s,a,u,"next",e)}function u(e){i(o,n,s,a,u,"throw",e)}a(void 0)}))}}const s=r(8888),o=r(7261),a=r(4347),u=a.erase,c=a.cursor,l=r(8482),h=l.style,d=l.clear,p=l.lines,f=l.figures;e.exports=class extends o{constructor(e={}){super(e),this.transform=h.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=d("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=s.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var e=this;return n((function*(){let t=yield e.validator(e.value);"string"==typeof t&&(e.errorMsg=t,t=!1),e.error=!t}))()}submit(){var e=this;return n((function*(){if(e.value=e.value||e.initial,e.cursorOffset=0,e.cursor=e.rendered.length,yield e.validate(),e.error)return e.red=!0,e.fire(),void e.render();e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write("\n"),e.close()}))()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,t){let r=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${r}${e}${i}`,this.red=!1,this.cursor=this.placeholder?0:r.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),t=this.value.slice(this.cursor);this.value=`${e}${t}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),t=this.value.slice(this.cursor+1);this.value=`${e}${t}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return 0===this.cursor||this.placeholder&&1===this.cursor}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(c.down(p(this.outputError,this.out.columns)-1)+d(this.outputError,this.out.columns)),this.out.write(d(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[h.symbol(this.done,this.aborted),s.bold(this.msg),h.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((e,t,r)=>e+`\n${r?" ":f.pointerSmall} ${s.red().italic(t)}`),"")),this.out.write(u.line+c.to(0)+this.outputText+c.save+this.outputError+c.restore+c.move(this.cursorOffset,0)))}}},3396:e=>{e.exports=function(e){if("object"!=typeof e)throw new Error("expected an author to be an object");var t={name:["",""],email:["<",">"],url:["(",")"]},r="";for(var i in e.url&&(e.url=function(e){return e.replace(/\/$/,"")}(e.url)),t)e[i]&&(r+=t[i][0]+e[i]+t[i][1]+" ");return r.trim()}},3424:e=>{e.exports=(e,t={})=>{const r=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",i=t.width;return(e||"").split(/\r?\n/g).map((e=>e.split(/\s+/g).reduce(((e,t)=>(t.length+r.length>=i||e[e.length-1].length+t.length+1<i?e[e.length-1]+=` ${t}`:e.push(`${r}${t}`),e)),[r]).join("\n"))).join("\n")}},3480:t=>{t.exports=e(import.meta.url)("querystring")},3640:(e,t,r)=>{const i=r(4635).fromPromise,n=r(6289);e.exports={pathExists:i((function(e){return n.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:n.existsSync}},3682:(e,t,r)=>{const i=t,n=r(271),s=e=>e;function o(e,t,r={}){return new Promise(((i,o)=>{const a=new n[e](t),u=r.onAbort||s,c=r.onSubmit||s,l=r.onExit||s;a.on("state",t.onState||s),a.on("submit",(e=>i(c(e)))),a.on("exit",(e=>i(l(e)))),a.on("abort",(e=>o(u(e))))}))}i.text=e=>o("TextPrompt",e),i.password=e=>(e.style="password",i.text(e)),i.invisible=e=>(e.style="invisible",i.text(e)),i.number=e=>o("NumberPrompt",e),i.date=e=>o("DatePrompt",e),i.confirm=e=>o("ConfirmPrompt",e),i.list=e=>{const t=e.separator||",";return o("TextPrompt",e,{onSubmit:e=>e.split(t).map((e=>e.trim()))})},i.toggle=e=>o("TogglePrompt",e),i.select=e=>o("SelectPrompt",e),i.multiselect=e=>{e.choices=[].concat(e.choices||[]);const t=e=>e.filter((e=>e.selected)).map((e=>e.value));return o("MultiselectPrompt",e,{onAbort:t,onSubmit:t})},i.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);const t=e=>e.filter((e=>e.selected)).map((e=>e.value));return o("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};const a=(e,t)=>Promise.resolve(t.filter((t=>t.title.slice(0,e.length).toLowerCase()===e.toLowerCase())));i.autocomplete=e=>(e.suggest=e.suggest||a,e.choices=[].concat(e.choices||[]),o("AutocompletePrompt",e))},3683:(e,t,r)=>{const i=t,n=r(5864),s=e=>e;function o(e,t,r={}){return new Promise(((i,o)=>{const a=new n[e](t),u=r.onAbort||s,c=r.onSubmit||s,l=r.onExit||s;a.on("state",t.onState||s),a.on("submit",(e=>i(c(e)))),a.on("exit",(e=>i(l(e)))),a.on("abort",(e=>o(u(e))))}))}i.text=e=>o("TextPrompt",e),i.password=e=>(e.style="password",i.text(e)),i.invisible=e=>(e.style="invisible",i.text(e)),i.number=e=>o("NumberPrompt",e),i.date=e=>o("DatePrompt",e),i.confirm=e=>o("ConfirmPrompt",e),i.list=e=>{const t=e.separator||",";return o("TextPrompt",e,{onSubmit:e=>e.split(t).map((e=>e.trim()))})},i.toggle=e=>o("TogglePrompt",e),i.select=e=>o("SelectPrompt",e),i.multiselect=e=>{e.choices=[].concat(e.choices||[]);const t=e=>e.filter((e=>e.selected)).map((e=>e.value));return o("MultiselectPrompt",e,{onAbort:t,onSubmit:t})},i.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);const t=e=>e.filter((e=>e.selected)).map((e=>e.value));return o("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};const a=(e,t)=>Promise.resolve(t.filter((t=>t.title.slice(0,e.length).toLowerCase()===e.toLowerCase())));i.autocomplete=e=>(e.suggest=e.suggest||a,e.choices=[].concat(e.choices||[]),o("AutocompletePrompt",e))},3725:(e,t,r)=>{const i=r(8888),{cursor:n}=r(4347),s=r(8544),{clear:o,figures:a,style:u,wrap:c,entriesToDisplay:l}=r(7933);e.exports=class extends s{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map(((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),description:e&&e.description,value:e&&(void 0===e.value?t:e.value),selected:e&&e.selected,disabled:e&&e.disabled}))),this.clear=o("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map((e=>!e.selected)),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((e=>e.selected))}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const e=this.value.filter((e=>e.selected));this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){0===this.cursor?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(void 0!==this.maxChoices||this.value[this.cursor].disabled)return this.bell();const e=!this.value[this.cursor].selected;this.value.filter((e=>!e.disabled)).forEach((t=>t.selected=e)),this.render()}_(e,t){if(" "===e)this.handleSpaceToggle();else{if("a"!==e)return this.bell();this.toggleAll()}}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${a.arrowUp}/${a.arrowDown}: Highlight option\n ${a.arrowLeft}/${a.arrowRight}/[space]: Toggle selection\n`+(void 0===this.maxChoices?" a: Toggle all\n":"")+" enter/return: Complete answer":""}renderOption(e,t,r,n){const s=(t.selected?i.green(a.radioOn):a.radioOff)+" "+n+" ";let o,u;return t.disabled?o=e===r?i.gray().underline(t.title):i.strikethrough().gray(t.title):(o=e===r?i.cyan().underline(t.title):t.title,e===r&&t.description&&(u=` - ${t.description}`,(s.length+o.length+u.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(u="\n"+c(t.description,{margin:s.length,width:this.out.columns})))),s+o+i.gray(u||"")}paginateOptions(e){if(0===e.length)return i.red("No matches for this query.");let t,{startIndex:r,endIndex:n}=l(this.cursor,e.length,this.optionsPerPage),s=[];for(let i=r;i<n;i++)t=i===r&&r>0?a.arrowUp:i===n-1&&n<e.length?a.arrowDown:" ",s.push(this.renderOption(this.cursor,e[i],i,t));return"\n"+s.join("\n")}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");const e=[i.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(i.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(n.hide),super.render();let e=[u.symbol(this.done,this.aborted),i.bold(this.msg),u.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=o(e,this.out.columns)}}},3756:(e,t,r)=>{const i=r(8888),n=r(8544),{style:s,clear:o}=r(7933),{erase:a,cursor:u}=r(4347);e.exports=class extends n{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){return"y"===e.toLowerCase()?(this.value=!0,this.submit()):"n"===e.toLowerCase()?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(u.hide):this.out.write(o(this.outputText,this.out.columns)),super.render(),this.outputText=[s.symbol(this.done,this.aborted),i.bold(this.msg),s.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:i.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(a.line+u.to(0)+this.outputText))}}},3785:t=>{t.exports=e(import.meta.url)("readline")},3803:(e,t,r)=>{const i=r(6928),n=r(1905),s=r(9695);function o(e,t){const r=e.options.env||process.env,o=process.cwd(),a=null!=e.options.cwd,u=a&&void 0!==process.chdir&&!process.chdir.disabled;if(u)try{process.chdir(e.options.cwd)}catch(e){}let c;try{c=n.sync(e.command,{path:r[s({env:r})],pathExt:t?i.delimiter:void 0})}catch(e){}finally{u&&process.chdir(o)}return c&&(c=i.resolve(a?e.options.cwd:"",c)),c}e.exports=function(e){return o(e)||o(e,!0)}},3866:e=>{var t=1e3,r=60*t,i=60*r,n=24*i,s=7*n;function o(e,t,r,i){var n=t>=1.5*r;return Math.round(e/r)+" "+i+(n?"s":"")}e.exports=function(e,a){a=a||{};var u,c,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(o){var a=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return a*s;case"days":case"day":case"d":return a*n;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===l&&isFinite(e))return a.long?(u=e,(c=Math.abs(u))>=n?o(u,c,n,"day"):c>=i?o(u,c,i,"hour"):c>=r?o(u,c,r,"minute"):c>=t?o(u,c,t,"second"):u+" ms"):function(e){var s=Math.abs(e);return s>=n?Math.round(e/n)+"d":s>=i?Math.round(e/i)+"h":s>=r?Math.round(e/r)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},4003:(e,t,r)=>{const i=r(8888),n=r(7261),s=r(8482),o=s.style,a=s.clear,u=s.figures,c=s.wrap,l=s.entriesToDisplay,h=r(4347).cursor;e.exports=class extends n{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map(((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),value:e&&(void 0===e.value?t:e.value),description:e&&e.description,selected:e&&e.selected,disabled:e&&e.disabled}))),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=a("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){0===this.cursor?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,t){if(" "===e)return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(h.hide):this.out.write(a(this.outputText,this.out.columns)),super.render();let e=l(this.cursor,this.choices.length,this.optionsPerPage),t=e.startIndex,r=e.endIndex;if(this.outputText=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(!1),this.done?this.selection.title:this.selection.disabled?i.yellow(this.warn):i.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let e=t;e<r;e++){let n,s,o="",a=this.choices[e];s=e===t&&t>0?u.arrowUp:e===r-1&&r<this.choices.length?u.arrowDown:" ",a.disabled?(n=this.cursor===e?i.gray().underline(a.title):i.strikethrough().gray(a.title),s=(this.cursor===e?i.bold().gray(u.pointer)+" ":" ")+s):(n=this.cursor===e?i.cyan().underline(a.title):a.title,s=(this.cursor===e?i.cyan(u.pointer)+" ":" ")+s,a.description&&this.cursor===e&&(o=` - ${a.description}`,(s.length+n.length+o.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(o="\n"+c(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${s} ${n}${i.gray(o)}\n`}}this.out.write(this.outputText)}}},4140:e=>{e.exports=e=>{if("object"!=typeof e||null===e)throw new TypeError("Expected an object");const t={};for(const[r,i]of Object.entries(e))t[i]=r;for(const r of Object.getOwnPropertySymbols(e))t[e[r]]=r;return t}},4144:(e,t,r)=>{const{createFile:i,createFileSync:n}=r(1872),{createLink:s,createLinkSync:o}=r(130),{createSymlink:a,createSymlinkSync:u}=r(3211);e.exports={createFile:i,createFileSync:n,ensureFile:i,ensureFileSync:n,createLink:s,createLinkSync:o,ensureLink:s,ensureLinkSync:o,createSymlink:a,createSymlinkSync:u,ensureSymlink:a,ensureSymlinkSync:u}},4164:(e,t,r)=>{const i=r(627),n=r(6928),s=r(7751).copySync,o=r(9630).removeSync,a=r(8006).mkdirpSync,u=r(5838);function c(e,t,r){try{i.renameSync(e,t)}catch(i){if("EXDEV"!==i.code)throw i;return function(e,t,r){return s(e,t,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),o(e)}(e,t,r)}}e.exports=function(e,t,r){const s=(r=r||{}).overwrite||r.clobber||!1,{srcStat:l,isChangingCase:h=!1}=u.checkPathsSync(e,t,"move",r);return u.checkParentPathsSync(e,l,t,"move"),function(e){const t=n.dirname(e);return n.parse(t).root===t}(t)||a(n.dirname(t)),function(e,t,r,n){if(n)return c(e,t,r);if(r)return o(t),c(e,t,r);if(i.existsSync(t))throw new Error("dest already exists.");return c(e,t,r)}(e,t,s,h)}},4264:e=>{class t{constructor({token:e,date:t,parts:r,locales:i}){this.token=e,this.date=t||new Date,this.parts=r||[this],this.locales=i||{}}up(){}down(){}next(){const e=this.parts.indexOf(this);return this.parts.find(((r,i)=>i>e&&r instanceof t))}setTo(e){}prev(){let e=[].concat(this.parts).reverse();const r=e.indexOf(this);return e.find(((e,i)=>i>r&&e instanceof t))}toString(){return String(this.date)}}e.exports=t},4347:e=>{const t="\x1b[",r={to:(e,r)=>r?`${t}${r+1};${e+1}H`:`${t}${e+1}G`,move(e,r){let i="";return e<0?i+=`${t}${-e}D`:e>0&&(i+=`${t}${e}C`),r<0?i+=`${t}${-r}A`:r>0&&(i+=`${t}${r}B`),i},up:(e=1)=>`${t}${e}A`,down:(e=1)=>`${t}${e}B`,forward:(e=1)=>`${t}${e}C`,backward:(e=1)=>`${t}${e}D`,nextLine:(e=1)=>`${t}E`.repeat(e),prevLine:(e=1)=>`${t}F`.repeat(e),left:`${t}G`,hide:`${t}?25l`,show:`${t}?25h`,save:"\x1b7",restore:"\x1b8"},i={up:(e=1)=>`${t}S`.repeat(e),down:(e=1)=>`${t}T`.repeat(e)},n={screen:`${t}2J`,up:(e=1)=>`${t}1J`.repeat(e),down:(e=1)=>`${t}J`.repeat(e),line:`${t}2K`,lineEnd:`${t}K`,lineStart:`${t}1K`,lines(e){let t="";for(let i=0;i<e;i++)t+=this.line+(i<e-1?r.up():"");return e&&(t+=r.left),t}};e.exports={cursor:r,scroll:i,erase:n,beep:"\x07"}},4349:(e,t,r)=>{const i=r(8888),{cursor:n}=r(4347),s=r(3725),{clear:o,style:a,figures:u}=r(7933);e.exports=class extends s{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=o("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){0===this.cursor?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){const e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((e=>!this.inputValue||!("string"!=typeof e.title||!e.title.toLowerCase().includes(this.inputValue.toLowerCase()))||!("string"!=typeof e.value||!e.value.toLowerCase().includes(this.inputValue.toLowerCase()))));const t=this.filteredOptions.findIndex((t=>t===e));this.cursor=t<0?0:t,this.render()}handleSpaceToggle(){const e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,t){" "===e?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${u.arrowUp}/${u.arrowDown}: Highlight option\n ${u.arrowLeft}/${u.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`:""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:i.gray("Enter something to filter")}\n`}renderOption(e,t,r){let n;return n=t.disabled?e===r?i.gray().underline(t.title):i.strikethrough().gray(t.title):e===r?i.cyan().underline(t.title):t.title,(t.selected?i.green(u.radioOn):u.radioOff)+" "+n}renderDoneOrInstructions(){if(this.done)return this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");const e=[i.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(i.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(n.hide),super.render();let e=[a.symbol(this.done,this.aborted),i.bold(this.msg),a.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=o(e,this.out.columns)}}},4356:(e,t,r)=>{const i=r(8459);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}}},4370:(e,t,r)=>{const i=r(6289),n=r(6928),{mkdirs:s}=r(8006),{pathExists:o}=r(3640),{utimesMillis:a}=r(9467),u=r(5838);async function c(e,t,r){return!r.filter||r.filter(e,t)}async function l(e,t,r,s){const o=s.dereference?i.stat:i.lstat,a=await o(t);if(a.isDirectory())return async function(e,t,r,s,o){t||await i.mkdir(s);const a=[];for await(const e of await i.opendir(r)){const t=n.join(r,e.name),i=n.join(s,e.name);a.push(c(t,i,o).then((e=>{if(e)return u.checkPaths(t,i,"copy",o).then((({destStat:e})=>l(e,t,i,o)))})))}await Promise.all(a),t||await i.chmod(s,e.mode)}(a,e,t,r,s);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return async function(e,t,r,n,s){if(!t)return h(e,r,n,s);if(s.overwrite)return await i.unlink(n),h(e,r,n,s);if(s.errorOnExist)throw new Error(`'${n}' already exists`)}(a,e,t,r,s);if(a.isSymbolicLink())return async function(e,t,r,s){let o=await i.readlink(t);if(s.dereference&&(o=n.resolve(process.cwd(),o)),!e)return i.symlink(o,r);let a=null;try{a=await i.readlink(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return i.symlink(o,r);throw e}if(s.dereference&&(a=n.resolve(process.cwd(),a)),u.isSrcSubdir(o,a))throw new Error(`Cannot copy '${o}' to a subdirectory of itself, '${a}'.`);if(u.isSrcSubdir(a,o))throw new Error(`Cannot overwrite '${a}' with '${o}'.`);return await i.unlink(r),i.symlink(o,r)}(e,t,r,s);if(a.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(a.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}async function h(e,t,r,n){if(await i.copyFile(t,r),n.preserveTimestamps){128&e.mode||await function(e,t){return i.chmod(e,128|t)}(r,e.mode);const n=await i.stat(t);await a(r,n.atime,n.mtime)}return i.chmod(r,e.mode)}e.exports=async function(e,t,r={}){"function"==typeof r&&(r={filter:r}),r.clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001");const{srcStat:i,destStat:a}=await u.checkPaths(e,t,"copy",r);if(await u.checkParentPaths(e,i,t,"copy"),!await c(e,t,r))return;const h=n.dirname(t);await o(h)||await s(h),await l(a,e,t,r)}},4409:e=>{e.exports=(e,t,r)=>{r=r||t;let i=Math.min(t-r,e-Math.floor(r/2));return i<0&&(i=0),{startIndex:i,endIndex:Math.min(i+r,t)}}},4434:t=>{t.exports=e(import.meta.url)("events")},4635:(e,t)=>{t.fromCallback=function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise(((r,i)=>{t.push(((e,t)=>null!=e?i(e):r(t))),e.apply(this,t)}));e.apply(this,t)}),"name",{value:e.name})},t.fromPromise=function(e){return Object.defineProperty((function(...t){const r=t[t.length-1];if("function"!=typeof r)return e.apply(this,t);t.pop(),e.apply(this,t).then((e=>r(null,e)),r)}),"name",{value:e.name})}},4640:e=>{e.exports=(e,t,r)=>{r=r||t;let i=Math.min(t-r,e-Math.floor(r/2));return i<0&&(i=0),{startIndex:i,endIndex:Math.min(i+r,t)}}},4891:e=>{e.exports=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",i=t.indexOf(r+e),n=t.indexOf("--");return-1!==i&&(-1===n||i<n)}},5058:(e,t,r)=>{const i=r(8459);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),t=this.token.length;return 2===t?String(e+1).padStart(2,"0"):3===t?this.locales.monthsShort[e]:4===t?this.locales.months[e]:String(e+1)}}},5317:t=>{t.exports=e(import.meta.url)("child_process")},5338:(e,t,r)=>{const{stringify:i}=r(374),{outputFile:n}=r(1376);e.exports=async function(e,t,r={}){const s=i(t,r);await n(e,s,r)}},5495:e=>{e.exports=class{constructor(e,t){this.coreRes=e,this.resOptions=t,this.body=Buffer.alloc(0),this.headers=e.headers,this.statusCode=e.statusCode}_addChunk(e){this.body=Buffer.concat([this.body,e])}async json(){return 204===this.statusCode?null:JSON.parse(this.body)}async text(){return this.body.toString()}}},5518:(e,t,r)=>{const i=r(8888),n=r(4347).cursor,s=r(538),o=r(8482),a=o.clear,u=o.style,c=o.figures;e.exports=class extends s{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=a("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){0===this.cursor?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){const e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((e=>!this.inputValue||!("string"!=typeof e.title||!e.title.toLowerCase().includes(this.inputValue.toLowerCase()))||!("string"!=typeof e.value||!e.value.toLowerCase().includes(this.inputValue.toLowerCase()))));const t=this.filteredOptions.findIndex((t=>t===e));this.cursor=t<0?0:t,this.render()}handleSpaceToggle(){const e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,t){" "===e?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${c.arrowUp}/${c.arrowDown}: Highlight option\n ${c.arrowLeft}/${c.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`:""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:i.gray("Enter something to filter")}\n`}renderOption(e,t,r){let n;return n=t.disabled?e===r?i.gray().underline(t.title):i.strikethrough().gray(t.title):e===r?i.cyan().underline(t.title):t.title,(t.selected?i.green(c.radioOn):c.radioOff)+" "+n}renderDoneOrInstructions(){if(this.done)return this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");const e=[i.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(i.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(n.hide),super.render();let e=[u.symbol(this.done,this.aborted),i.bold(this.msg),u.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=a(e,this.out.columns)}}},5599:(e,t,r)=>{const i=r(8459);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return 2===this.token.length?e.substr(-2):e}}},5600:(e,t,r)=>{e.exports=function(e){e=(Array.isArray(e)?e:e.split(".")).map(Number);let t=0,r=process.versions.node.split(".").map(Number);for(;t<e.length;t++){if(r[t]>e[t])return!1;if(e[t]>r[t])return!0}return!1}("8.6.0")?r(2481):r(8332)},5692:t=>{t.exports=e(import.meta.url)("https")},5740:(e,t,r)=>{const{stringify:i}=r(374),{outputFileSync:n}=r(1376);e.exports=function(e,t,r){const s=i(t,r);n(e,s,r)}},5783:(e,t,r)=>{const i=r(4635).fromPromise;e.exports={move:i(r(2690)),moveSync:r(4164)}},5807:(e,t,r)=>{const i=r(8888),n=r(7261),s=r(8482),o=s.style,a=s.clear,u=r(4347),c=u.cursor,l=u.erase;e.exports=class extends n{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(!1===this.value)return this.bell();this.value=!1,this.render()}activate(){if(!0===this.value)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,t){if(" "===e)this.value=!this.value;else if("1"===e)this.value=!0;else{if("0"!==e)return this.bell();this.value=!1}this.render()}render(){this.closed||(this.firstRender?this.out.write(c.hide):this.out.write(a(this.outputText,this.out.columns)),super.render(),this.outputText=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(this.done),this.value?this.inactive:i.cyan().underline(this.inactive),i.gray("/"),this.value?i.cyan().underline(this.active):this.active].join(" "),this.out.write(l.line+c.to(0)+this.outputText))}}},5838:(e,t,r)=>{const i=r(6289),n=r(6928),s=r(4635).fromPromise;function o(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function a(e,t){const r=n.resolve(e).split(n.sep).filter((e=>e)),i=n.resolve(t).split(n.sep).filter((e=>e));return r.every(((e,t)=>i[t]===e))}function u(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:s((async function(e,t,r,s){const{srcStat:c,destStat:l}=await function(e,t,r){const n=r.dereference?e=>i.stat(e,{bigint:!0}):e=>i.lstat(e,{bigint:!0});return Promise.all([n(e),n(t).catch((e=>{if("ENOENT"===e.code)return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}(e,t,s);if(l){if(o(c,l)){const i=n.basename(e),s=n.basename(t);if("move"===r&&i!==s&&i.toLowerCase()===s.toLowerCase())return{srcStat:c,destStat:l,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(c.isDirectory()&&!l.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!c.isDirectory()&&l.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(c.isDirectory()&&a(e,t))throw new Error(u(e,t,r));return{srcStat:c,destStat:l}})),checkPathsSync:function(e,t,r,s){const{srcStat:c,destStat:l}=function(e,t,r){let n;const s=r.dereference?e=>i.statSync(e,{bigint:!0}):e=>i.lstatSync(e,{bigint:!0}),o=s(e);try{n=s(t)}catch(e){if("ENOENT"===e.code)return{srcStat:o,destStat:null};throw e}return{srcStat:o,destStat:n}}(e,t,s);if(l){if(o(c,l)){const i=n.basename(e),s=n.basename(t);if("move"===r&&i!==s&&i.toLowerCase()===s.toLowerCase())return{srcStat:c,destStat:l,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(c.isDirectory()&&!l.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!c.isDirectory()&&l.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(c.isDirectory()&&a(e,t))throw new Error(u(e,t,r));return{srcStat:c,destStat:l}},checkParentPaths:s((async function e(t,r,s,a){const c=n.resolve(n.dirname(t)),l=n.resolve(n.dirname(s));if(l===c||l===n.parse(l).root)return;let h;try{h=await i.stat(l,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(o(r,h))throw new Error(u(t,s,a));return e(t,r,l,a)})),checkParentPathsSync:function e(t,r,s,a){const c=n.resolve(n.dirname(t)),l=n.resolve(n.dirname(s));if(l===c||l===n.parse(l).root)return;let h;try{h=i.statSync(l,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(o(r,h))throw new Error(u(t,s,a));return e(t,r,l,a)},isSrcSubdir:a,areIdentical:o}},5864:(e,t,r)=>{e.exports={TextPrompt:r(1433),SelectPrompt:r(406),TogglePrompt:r(1582),DatePrompt:r(8626),NumberPrompt:r(9927),MultiselectPrompt:r(3725),AutocompletePrompt:r(8590),AutocompleteMultiselectPrompt:r(4349),ConfirmPrompt:r(3756)}},5882:(e,t,r)=>{const i=r(8459);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),t=this.date.getDay();return"DD"===this.token?String(e).padStart(2,"0"):"Do"===this.token?e+(e=>1==(e%=10)?"st":2===e?"nd":3===e?"rd":"th")(e):"d"===this.token?t+1:"ddd"===this.token?this.locales.weekdaysShort[t]:"dddd"===this.token?this.locales.weekdays[t]:e}}},5982:(e,t,r)=>{const{builtinModules:i}=r(3339);var n=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),s=["node_modules","favicon.ico"],o=function(e,t){var r={validForNewPackages:0===t.length&&0===e.length,validForOldPackages:0===t.length,warnings:e,errors:t};return r.warnings.length||delete r.warnings,r.errors.length||delete r.errors,r};e.exports=function(e){var t=[],r=[];if(null===e)return r.push("name cannot be null"),o(t,r);if(void 0===e)return r.push("name cannot be undefined"),o(t,r);if("string"!=typeof e)return r.push("name must be a string"),o(t,r);if(e.length||r.push("name length must be greater than zero"),e.match(/^\./)&&r.push("name cannot start with a period"),e.match(/^_/)&&r.push("name cannot start with an underscore"),e.trim()!==e&&r.push("name cannot contain leading or trailing spaces"),s.forEach((function(t){e.toLowerCase()===t&&r.push(t+" is a blacklisted name")})),i.includes(e.toLowerCase())&&t.push(e+" is a core module name"),e.length>214&&t.push("name can no longer contain more than 214 characters"),e.toLowerCase()!==e&&t.push("name can no longer contain capital letters"),/[~'!()*]/.test(e.split("/").slice(-1)[0])&&t.push('name can no longer contain special characters ("~\'!()*")'),encodeURIComponent(e)!==e){var a=e.match(n);if(a){var u=a[1],c=a[2];if(encodeURIComponent(u)===u&&encodeURIComponent(c)===c)return o(t,r)}r.push("name can only contain URL-friendly characters")}return o(t,r)}},6135:e=>{const t={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25c9",radioOff:"\u25ef",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203a",line:"\u2500",pointer:"\u276f"},r={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221a",cross:"\xd7",ellipsis:"...",pointerSmall:"\xbb",line:"\u2500",pointer:">"},i="win32"===process.platform?r:t;e.exports=i},6187:(e,t,r)=>{const i=r(8888),n=r(6135),s=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"\u{1f603}".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),o=Object.freeze({aborted:i.red(n.cross),done:i.green(n.tick),exited:i.yellow(n.cross),default:i.cyan("?")});e.exports={styles:s,render:e=>s[e]||s.default,symbols:o,symbol:(e,t,r)=>t?o.aborted:r?o.exited:e?o.done:o.default,delimiter:e=>i.gray(e?n.ellipsis:n.pointerSmall),item:(e,t)=>i.gray(e?t?n.pointerSmall:"+":n.line)}},6203:(e,t,r)=>{function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}const n=r(9440),s=r(4347),o=s.erase,a=s.cursor;e.exports=function(e,t){if(!t)return o.line+a.to(0);let r=0;var s,u=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,s=function(){};return{s,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}(e.split(/\r?\n/));try{for(u.s();!(s=u.n()).done;){let e=s.value;r+=1+Math.floor(Math.max([...n(e)].length-1,0)/t)}}catch(e){u.e(e)}finally{u.f()}return o.lines(r)}},6272:(e,t,r)=>{const i=r(4264);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}}},6289:(e,t,r)=>{const i=r(4635).fromCallback,n=r(627),s=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof n[e]));Object.assign(t,n),s.forEach((e=>{t[e]=i(n[e])})),t.exists=function(e,t){return"function"==typeof t?n.exists(e,t):new Promise((t=>n.exists(e,t)))},t.read=function(e,t,r,i,s,o){return"function"==typeof o?n.read(e,t,r,i,s,o):new Promise(((o,a)=>{n.read(e,t,r,i,s,((e,t,r)=>{if(e)return a(e);o({bytesRead:t,buffer:r})}))}))},t.write=function(e,t,...r){return"function"==typeof r[r.length-1]?n.write(e,t,...r):new Promise(((i,s)=>{n.write(e,t,...r,((e,t,r)=>{if(e)return s(e);i({bytesWritten:t,buffer:r})}))}))},t.readv=function(e,t,...r){return"function"==typeof r[r.length-1]?n.readv(e,t,...r):new Promise(((i,s)=>{n.readv(e,t,...r,((e,t,r)=>{if(e)return s(e);i({bytesRead:t,buffers:r})}))}))},t.writev=function(e,t,...r){return"function"==typeof r[r.length-1]?n.writev(e,t,...r):new Promise(((i,s)=>{n.writev(e,t,...r,((e,t,r)=>{if(e)return s(e);i({bytesWritten:t,buffers:r})}))}))},"function"==typeof n.realpath.native?t.realpath.native=i(n.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")},6507:(e,t,r)=>{const i=r(5317),n=r(8388),s=r(442);function o(e,t,r){const o=n(e,t,r),a=i.spawn(o.command,o.args,o.options);return s.hookChildProcess(a,o),a}e.exports=o,e.exports.spawn=o,e.exports.sync=function(e,t,r){const o=n(e,t,r),a=i.spawnSync(o.command,o.args,o.options);return a.error=a.error||s.verifyENOENTSync(a.status,o),a},e.exports._parse=n,e.exports._enoent=s},6551:(e,t,r)=>{const i=r(4264);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}}},6704:(e,t,r)=>{const i=r(4635).fromPromise,n=r(7590);n.outputJson=i(r(5338)),n.outputJsonSync=r(5740),n.outputJSON=n.outputJson,n.outputJSONSync=n.outputJsonSync,n.writeJSON=n.writeJson,n.writeJSONSync=n.writeJsonSync,n.readJSON=n.readJson,n.readJSONSync=n.readJsonSync,e.exports=n},6905:(e,t,r)=>{const i=r(9440);e.exports=function(e,t){let r=String(i(e)||"").split(/\r?\n/);return t?r.map((e=>Math.ceil(e.length/t))).reduce(((e,t)=>e+t)):r.length}},6928:t=>{t.exports=e(import.meta.url)("path")},7016:t=>{t.exports=e(import.meta.url)("url")},7124:(e,t,r)=>{var i,n,s,o=r(7016),a=o.URL,u=r(8611),c=r(5692),l=r(2203).Writable,h=r(2613),d=r(7131);i="undefined"!=typeof process,n="undefined"!=typeof window&&"undefined"!=typeof document,s=k(Error.captureStackTrace),i||!n&&s||console.warn("The follow-redirects package should be excluded from browser builds.");var p=!1;try{h(new a(""))}catch(e){p="ERR_INVALID_URL"===e.code}var f=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],m=["abort","aborted","connect","error","socket","timeout"],g=Object.create(null);m.forEach((function(e){g[e]=function(t,r,i){this._redirectable.emit(e,t,r,i)}}));var D=T("ERR_INVALID_URL","Invalid URL",TypeError),y=T("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),b=T("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",y),w=T("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),v=T("ERR_STREAM_WRITE_AFTER_END","write after end"),E=l.prototype.destroy||S;function F(e,t){l.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){try{r._processResponse(e)}catch(e){r.emit("error",e instanceof y?e:new y({cause:e}))}},this._performRequest()}function C(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(i){var n=i+":",s=r[n]=e[i],o=t[i]=Object.create(s);Object.defineProperties(o,{request:{value:function(e,i,s){return a&&e instanceof a?e=_(e):I(e)?e=_(x(e)):(s=i,i=O(e),e={protocol:n}),k(i)&&(s=i,i=null),(i=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,i)).nativeProtocols=r,I(i.host)||I(i.hostname)||(i.hostname="::1"),h.equal(i.protocol,n,"protocol mismatch"),d("options",i),new F(i,s)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var i=o.request(e,t,r);return i.end(),i},configurable:!0,enumerable:!0,writable:!0}})})),t}function S(){}function x(e){var t;if(p)t=new a(e);else if(!I((t=O(o.parse(e))).protocol))throw new D({input:e});return t}function O(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new D({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new D({input:e.href||e});return e}function _(e,t){var r=t||{};for(var i of f)r[i]=e[i];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),""!==r.port&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function A(e,t){var r;for(var i in t)e.test(i)&&(r=t[i],delete t[i]);return null==r?void 0:String(r).trim()}function T(e,t,r){function i(r){k(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return i.prototype=new(r||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),i}function M(e,t){for(var r of m)e.removeListener(r,g[r]);e.on("error",S),e.destroy(t)}function I(e){return"string"==typeof e||e instanceof String}function k(e){return"function"==typeof e}F.prototype=Object.create(l.prototype),F.prototype.abort=function(){M(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},F.prototype.destroy=function(e){return M(this._currentRequest,e),E.call(this,e),this},F.prototype.write=function(e,t,r){if(this._ending)throw new v;if(!(I(e)||"object"==typeof(i=e)&&"length"in i))throw new TypeError("data should be a string, Buffer or Uint8Array");var i;k(t)&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new w),this.abort()):r&&r()},F.prototype.end=function(e,t,r){if(k(e)?(r=e,e=t=null):k(t)&&(r=t,t=null),e){var i=this,n=this._currentRequest;this.write(e,t,(function(){i._ended=!0,n.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},F.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},F.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},F.prototype.setTimeout=function(e,t){var r=this;function i(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function n(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),s()}),e),i(t)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),r.removeListener("close",s),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",n)}return t&&this.on("timeout",t),this.socket?n(this.socket):this._currentRequest.once("socket",n),this.on("socket",i),this.on("abort",s),this.on("error",s),this.on("response",s),this.on("close",s),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){F.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(F.prototype,e,{get:function(){return this._currentRequest[e]}})})),F.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},F.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var n of(i._redirectable=this,m))i.on(n,g[n]);if(this._currentUrl=/^\//.test(this._options.path)?o.format(this._options):this._options.path,this._isRedirect){var s=0,a=this,u=this._requestBodyBuffers;!function e(t){if(i===a._currentRequest)if(t)a.emit("error",t);else if(s<u.length){var r=u[s++];i.finished||i.write(r.data,r.encoding,e)}else a._ended&&i.end()}()}},F.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r,i=e.headers.location;if(!i||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(M(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new b;var n=this._options.beforeRedirect;n&&(r=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],A(/^content-/i,this._options.headers));var u,c,l=A(/^host$/i,this._options.headers),f=x(this._currentUrl),m=l||f.host,g=/^\w+:/.test(i)?this._currentUrl:o.format(Object.assign(f,{host:m})),D=(u=i,c=g,p?new a(u,c):x(o.resolve(c,u)));if(d("redirecting to",D.href),this._isRedirect=!0,_(D,this._options),(D.protocol!==f.protocol&&"https:"!==D.protocol||D.host!==m&&!function(e,t){h(I(e)&&I(t));var r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(D.host,m))&&A(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),k(n)){var y={headers:e.headers,statusCode:t},w={url:g,method:s,headers:r};n(this._options,y,w),this._sanitizeOptions(this._options)}this._performRequest()},e.exports=C({http:u,https:c}),e.exports.wrap=C},7131:(e,t,r)=>{var i;e.exports=function(){if(!i){try{i=r(8770)("follow-redirects")}catch(e){}"function"!=typeof i&&(i=function(){})}i.apply(null,arguments)}},7135:e=>{e.exports=e=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(t,"g");return"string"==typeof e?e.replace(r,""):e}},7191:(e,t,r)=>{function i(e,t,r,i,n,s,o){try{var a=e[s](o),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(i,n)}function n(e){return function(){var t=this,r=arguments;return new Promise((function(n,s){var o=e.apply(t,r);function a(e){i(o,n,s,a,u,"next",e)}function u(e){i(o,n,s,a,u,"throw",e)}a(void 0)}))}}const s=r(8888),o=r(7261),a=r(8482),u=a.style,c=a.clear,l=a.figures,h=r(4347),d=h.erase,p=h.cursor,f=r(9180),m=f.DatePart,g=f.Meridiem,D=f.Day,y=f.Hours,b=f.Milliseconds,w=f.Minutes,v=f.Month,E=f.Seconds,F=f.Year,C=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,S={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new D(e),3:e=>new v(e),4:e=>new F(e),5:e=>new g(e),6:e=>new y(e),7:e=>new w(e),8:e=>new E(e),9:e=>new b(e)},x={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};e.exports=class extends o{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(x,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=c("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let t;for(this.parts=[];t=C.exec(e);){let e=t.shift(),r=t.findIndex((e=>null!=e));this.parts.push(r in S?S[r]({token:t[r]||e,date:this.date,parts:this.parts,locales:this.locales}):t[r]||e)}let r=this.parts.reduce(((e,t)=>("string"==typeof t&&"string"==typeof e[e.length-1]?e[e.length-1]+=t:e.push(t),e)),[]);this.parts.splice(0),this.parts.push(...r),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex((e=>e instanceof m))),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var e=this;return n((function*(){let t=yield e.validator(e.value);"string"==typeof t&&(e.errorMsg=t,t=!1),e.error=!t}))()}submit(){var e=this;return n((function*(){if(yield e.validate(),e.error)return e.color="red",e.fire(),void e.render();e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write("\n"),e.close()}))()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex((e=>e instanceof m))),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(p.hide):this.out.write(c(this.outputText,this.out.columns)),super.render(),this.outputText=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(!1),this.parts.reduce(((e,t,r)=>e.concat(r!==this.cursor||this.done?t:s.cyan().underline(t.toString()))),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split("\n").reduce(((e,t,r)=>e+`\n${r?" ":l.pointerSmall} ${s.red().italic(t)}`),"")),this.out.write(d.line+p.to(0)+this.outputText))}}},7256:e=>{e.exports=JSON.parse('{"dots":{"interval":80,"frames":["\u280b","\u2819","\u2839","\u2838","\u283c","\u2834","\u2826","\u2827","\u2807","\u280f"]},"dots2":{"interval":80,"frames":["\u28fe","\u28fd","\u28fb","\u28bf","\u287f","\u28df","\u28ef","\u28f7"]},"dots3":{"interval":80,"frames":["\u280b","\u2819","\u281a","\u281e","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},"dots4":{"interval":80,"frames":["\u2804","\u2806","\u2807","\u280b","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280b","\u2807","\u2806"]},"dots5":{"interval":80,"frames":["\u280b","\u2819","\u281a","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280b"]},"dots6":{"interval":80,"frames":["\u2801","\u2809","\u2819","\u281a","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281a","\u2819","\u2809","\u2801"]},"dots7":{"interval":80,"frames":["\u2808","\u2809","\u280b","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280b","\u2809","\u2808"]},"dots8":{"interval":80,"frames":["\u2801","\u2801","\u2809","\u2819","\u281a","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280b","\u2809","\u2808","\u2808"]},"dots9":{"interval":80,"frames":["\u28b9","\u28ba","\u28bc","\u28f8","\u28c7","\u2867","\u2857","\u284f"]},"dots10":{"interval":80,"frames":["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},"dots11":{"interval":100,"frames":["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},"dots12":{"interval":80,"frames":["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280d\u2800","\u288b\u2800","\u284b\u2800","\u280d\u2801","\u288b\u2801","\u284b\u2801","\u280d\u2809","\u280b\u2809","\u280b\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280d\u2850","\u288b\u2820","\u284b\u2880","\u280d\u2841","\u288b\u2801","\u284b\u2801","\u280d\u2809","\u280b\u2809","\u280b\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},"dots13":{"interval":80,"frames":["\u28fc","\u28f9","\u28bb","\u283f","\u285f","\u28cf","\u28e7","\u28f6"]},"dots8Bit":{"interval":80,"frames":["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280a","\u280b","\u280c","\u280d","\u280e","\u280f","\u2848","\u2849","\u284a","\u284b","\u284c","\u284d","\u284e","\u284f","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281a","\u281b","\u281c","\u281d","\u281e","\u281f","\u2858","\u2859","\u285a","\u285b","\u285c","\u285d","\u285e","\u285f","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282a","\u282b","\u282c","\u282d","\u282e","\u282f","\u2868","\u2869","\u286a","\u286b","\u286c","\u286d","\u286e","\u286f","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283a","\u283b","\u283c","\u283d","\u283e","\u283f","\u2878","\u2879","\u287a","\u287b","\u287c","\u287d","\u287e","\u287f","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28c0","\u28c1","\u28c2","\u28c3","\u28c4","\u28c5","\u28c6","\u28c7","\u2888","\u2889","\u288a","\u288b","\u288c","\u288d","\u288e","\u288f","\u28c8","\u28c9","\u28ca","\u28cb","\u28cc","\u28cd","\u28ce","\u28cf","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28d0","\u28d1","\u28d2","\u28d3","\u28d4","\u28d5","\u28d6","\u28d7","\u2898","\u2899","\u289a","\u289b","\u289c","\u289d","\u289e","\u289f","\u28d8","\u28d9","\u28da","\u28db","\u28dc","\u28dd","\u28de","\u28df","\u28a0","\u28a1","\u28a2","\u28a3","\u28a4","\u28a5","\u28a6","\u28a7","\u28e0","\u28e1","\u28e2","\u28e3","\u28e4","\u28e5","\u28e6","\u28e7","\u28a8","\u28a9","\u28aa","\u28ab","\u28ac","\u28ad","\u28ae","\u28af","\u28e8","\u28e9","\u28ea","\u28eb","\u28ec","\u28ed","\u28ee","\u28ef","\u28b0","\u28b1","\u28b2","\u28b3","\u28b4","\u28b5","\u28b6","\u28b7","\u28f0","\u28f1","\u28f2","\u28f3","\u28f4","\u28f5","\u28f6","\u28f7","\u28b8","\u28b9","\u28ba","\u28bb","\u28bc","\u28bd","\u28be","\u28bf","\u28f8","\u28f9","\u28fa","\u28fb","\u28fc","\u28fd","\u28fe","\u28ff"]},"sand":{"interval":80,"frames":["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28c0","\u28c1","\u28c2","\u28c4","\u28cc","\u28d4","\u28e4","\u28e5","\u28e6","\u28ee","\u28f6","\u28f7","\u28ff","\u287f","\u283f","\u289f","\u281f","\u285b","\u281b","\u282b","\u288b","\u280b","\u280d","\u2849","\u2809","\u2811","\u2821","\u2881"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["\u2802","-","\u2013","\u2014","\u2013","-"]},"pipe":{"interval":100,"frames":["\u2524","\u2518","\u2534","\u2514","\u251c","\u250c","\u252c","\u2510"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["\u2736","\u2738","\u2739","\u273a","\u2739","\u2737"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","\'","\xb4","-","_","_","_"]},"hamburger":{"interval":100,"frames":["\u2631","\u2632","\u2634"]},"growVertical":{"interval":120,"frames":["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},"growHorizontal":{"interval":120,"frames":["\u258f","\u258e","\u258d","\u258c","\u258b","\u258a","\u2589","\u258a","\u258b","\u258c","\u258d","\u258e"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","\xb0","O","o","."]},"noise":{"interval":100,"frames":["\u2593","\u2592","\u2591"]},"bounce":{"interval":120,"frames":["\u2801","\u2802","\u2804","\u2802"]},"boxBounce":{"interval":120,"frames":["\u2596","\u2598","\u259d","\u2597"]},"boxBounce2":{"interval":100,"frames":["\u258c","\u2580","\u2590","\u2584"]},"triangle":{"interval":50,"frames":["\u25e2","\u25e3","\u25e4","\u25e5"]},"binary":{"interval":80,"frames":["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},"arc":{"interval":100,"frames":["\u25dc","\u25e0","\u25dd","\u25de","\u25e1","\u25df"]},"circle":{"interval":120,"frames":["\u25e1","\u2299","\u25e0"]},"squareCorners":{"interval":180,"frames":["\u25f0","\u25f3","\u25f2","\u25f1"]},"circleQuarters":{"interval":120,"frames":["\u25f4","\u25f7","\u25f6","\u25f5"]},"circleHalves":{"interval":50,"frames":["\u25d0","\u25d3","\u25d1","\u25d2"]},"squish":{"interval":100,"frames":["\u256b","\u256a"]},"toggle":{"interval":250,"frames":["\u22b6","\u22b7"]},"toggle2":{"interval":80,"frames":["\u25ab","\u25aa"]},"toggle3":{"interval":120,"frames":["\u25a1","\u25a0"]},"toggle4":{"interval":100,"frames":["\u25a0","\u25a1","\u25aa","\u25ab"]},"toggle5":{"interval":100,"frames":["\u25ae","\u25af"]},"toggle6":{"interval":300,"frames":["\u101d","\u1040"]},"toggle7":{"interval":80,"frames":["\u29be","\u29bf"]},"toggle8":{"interval":100,"frames":["\u25cd","\u25cc"]},"toggle9":{"interval":100,"frames":["\u25c9","\u25ce"]},"toggle10":{"interval":100,"frames":["\u3282","\u3280","\u3281"]},"toggle11":{"interval":50,"frames":["\u29c7","\u29c6"]},"toggle12":{"interval":120,"frames":["\u2617","\u2616"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},"arrow2":{"interval":80,"frames":["\u2b06\ufe0f ","\u2197\ufe0f ","\u27a1\ufe0f ","\u2198\ufe0f ","\u2b07\ufe0f ","\u2199\ufe0f ","\u2b05\ufe0f ","\u2196\ufe0f "]},"arrow3":{"interval":120,"frames":["\u25b9\u25b9\u25b9\u25b9\u25b9","\u25b8\u25b9\u25b9\u25b9\u25b9","\u25b9\u25b8\u25b9\u25b9\u25b9","\u25b9\u25b9\u25b8\u25b9\u25b9","\u25b9\u25b9\u25b9\u25b8\u25b9","\u25b9\u25b9\u25b9\u25b9\u25b8"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( \u25cf )","( \u25cf )","( \u25cf )","( \u25cf )","( \u25cf)","( \u25cf )","( \u25cf )","( \u25cf )","( \u25cf )","(\u25cf )"]},"smiley":{"interval":200,"frames":["\u{1f604} ","\u{1f61d} "]},"monkey":{"interval":300,"frames":["\u{1f648} ","\u{1f648} ","\u{1f649} ","\u{1f64a} "]},"hearts":{"interval":100,"frames":["\u{1f49b} ","\u{1f499} ","\u{1f49c} ","\u{1f49a} ","\u2764\ufe0f "]},"clock":{"interval":100,"frames":["\u{1f55b} ","\u{1f550} ","\u{1f551} ","\u{1f552} ","\u{1f553} ","\u{1f554} ","\u{1f555} ","\u{1f556} ","\u{1f557} ","\u{1f558} ","\u{1f559} ","\u{1f55a} "]},"earth":{"interval":180,"frames":["\u{1f30d} ","\u{1f30e} ","\u{1f30f} "]},"material":{"interval":17,"frames":["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},"moon":{"interval":80,"frames":["\u{1f311} ","\u{1f312} ","\u{1f313} ","\u{1f314} ","\u{1f315} ","\u{1f316} ","\u{1f317} ","\u{1f318} "]},"runner":{"interval":140,"frames":["\u{1f6b6} ","\u{1f3c3} "]},"pong":{"interval":80,"frames":["\u2590\u2802 \u258c","\u2590\u2808 \u258c","\u2590 \u2802 \u258c","\u2590 \u2820 \u258c","\u2590 \u2840 \u258c","\u2590 \u2820 \u258c","\u2590 \u2802 \u258c","\u2590 \u2808 \u258c","\u2590 \u2802 \u258c","\u2590 \u2820 \u258c","\u2590 \u2840 \u258c","\u2590 \u2820 \u258c","\u2590 \u2802 \u258c","\u2590 \u2808 \u258c","\u2590 \u2802\u258c","\u2590 \u2820\u258c","\u2590 \u2840\u258c","\u2590 \u2820 \u258c","\u2590 \u2802 \u258c","\u2590 \u2808 \u258c","\u2590 \u2802 \u258c","\u2590 \u2820 \u258c","\u2590 \u2840 \u258c","\u2590 \u2820 \u258c","\u2590 \u2802 \u258c","\u2590 \u2808 \u258c","\u2590 \u2802 \u258c","\u2590 \u2820 \u258c","\u2590 \u2840 \u258c","\u2590\u2820 \u258c"]},"shark":{"interval":120,"frames":["\u2590|\\\\____________\u258c","\u2590_|\\\\___________\u258c","\u2590__|\\\\__________\u258c","\u2590___|\\\\_________\u258c","\u2590____|\\\\________\u258c","\u2590_____|\\\\_______\u258c","\u2590______|\\\\______\u258c","\u2590_______|\\\\_____\u258c","\u2590________|\\\\____\u258c","\u2590_________|\\\\___\u258c","\u2590__________|\\\\__\u258c","\u2590___________|\\\\_\u258c","\u2590____________|\\\\\u258c","\u2590____________/|\u258c","\u2590___________/|_\u258c","\u2590__________/|__\u258c","\u2590_________/|___\u258c","\u2590________/|____\u258c","\u2590_______/|_____\u258c","\u2590______/|______\u258c","\u2590_____/|_______\u258c","\u2590____/|________\u258c","\u2590___/|_________\u258c","\u2590__/|__________\u258c","\u2590_/|___________\u258c","\u2590/|____________\u258c"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["\u2600\ufe0f ","\u2600\ufe0f ","\u2600\ufe0f ","\u{1f324} ","\u26c5\ufe0f ","\u{1f325} ","\u2601\ufe0f ","\u{1f327} ","\u{1f328} ","\u{1f327} ","\u{1f328} ","\u{1f327} ","\u{1f328} ","\u26c8 ","\u{1f328} ","\u{1f327} ","\u{1f328} ","\u2601\ufe0f ","\u{1f325} ","\u26c5\ufe0f ","\u{1f324} ","\u2600\ufe0f ","\u2600\ufe0f "]},"christmas":{"interval":400,"frames":["\u{1f332}","\u{1f384}"]},"grenade":{"interval":80,"frames":["\u060c ","\u2032 "," \xb4 "," \u203e "," \u2e0c"," \u2e0a"," |"," \u204e"," \u2055"," \u0df4 "," \u2053"," "," "," "]},"point":{"interval":125,"frames":["\u2219\u2219\u2219","\u25cf\u2219\u2219","\u2219\u25cf\u2219","\u2219\u2219\u25cf","\u2219\u2219\u2219"]},"layer":{"interval":150,"frames":["-","=","\u2261"]},"betaWave":{"interval":80,"frames":["\u03c1\u03b2\u03b2\u03b2\u03b2\u03b2\u03b2","\u03b2\u03c1\u03b2\u03b2\u03b2\u03b2\u03b2","\u03b2\u03b2\u03c1\u03b2\u03b2\u03b2\u03b2","\u03b2\u03b2\u03b2\u03c1\u03b2\u03b2\u03b2","\u03b2\u03b2\u03b2\u03b2\u03c1\u03b2\u03b2","\u03b2\u03b2\u03b2\u03b2\u03b2\u03c1\u03b2","\u03b2\u03b2\u03b2\u03b2\u03b2\u03b2\u03c1"]},"fingerDance":{"interval":160,"frames":["\u{1f918} ","\u{1f91f} ","\u{1f596} ","\u270b ","\u{1f91a} ","\u{1f446} "]},"fistBump":{"interval":80,"frames":["\u{1f91c}\u3000\u3000\u3000\u3000\u{1f91b} ","\u{1f91c}\u3000\u3000\u3000\u3000\u{1f91b} ","\u{1f91c}\u3000\u3000\u3000\u3000\u{1f91b} ","\u3000\u{1f91c}\u3000\u3000\u{1f91b}\u3000 ","\u3000\u3000\u{1f91c}\u{1f91b}\u3000\u3000 ","\u3000\u{1f91c}\u2728\u{1f91b}\u3000\u3000 ","\u{1f91c}\u3000\u2728\u3000\u{1f91b}\u3000 "]},"soccerHeader":{"interval":80,"frames":[" \u{1f9d1}\u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f\u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} ","\u{1f9d1} \u26bd\ufe0f \u{1f9d1} "]},"mindblown":{"interval":160,"frames":["\u{1f610} ","\u{1f610} ","\u{1f62e} ","\u{1f62e} ","\u{1f626} ","\u{1f626} ","\u{1f627} ","\u{1f627} ","\u{1f92f} ","\u{1f4a5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},"speaker":{"interval":160,"frames":["\u{1f508} ","\u{1f509} ","\u{1f50a} ","\u{1f509} "]},"orangePulse":{"interval":100,"frames":["\u{1f538} ","\u{1f536} ","\u{1f7e0} ","\u{1f7e0} ","\u{1f536} "]},"bluePulse":{"interval":100,"frames":["\u{1f539} ","\u{1f537} ","\u{1f535} ","\u{1f535} ","\u{1f537} "]},"orangeBluePulse":{"interval":100,"frames":["\u{1f538} ","\u{1f536} ","\u{1f7e0} ","\u{1f7e0} ","\u{1f536} ","\u{1f539} ","\u{1f537} ","\u{1f535} ","\u{1f535} ","\u{1f537} "]},"timeTravel":{"interval":100,"frames":["\u{1f55b} ","\u{1f55a} ","\u{1f559} ","\u{1f558} ","\u{1f557} ","\u{1f556} ","\u{1f555} ","\u{1f554} ","\u{1f553} ","\u{1f552} ","\u{1f551} ","\u{1f550} "]},"aesthetic":{"interval":80,"frames":["\u25b0\u25b1\u25b1\u25b1\u25b1\u25b1\u25b1","\u25b0\u25b0\u25b1\u25b1\u25b1\u25b1\u25b1","\u25b0\u25b0\u25b0\u25b1\u25b1\u25b1\u25b1","\u25b0\u25b0\u25b0\u25b0\u25b1\u25b1\u25b1","\u25b0\u25b0\u25b0\u25b0\u25b0\u25b1\u25b1","\u25b0\u25b0\u25b0\u25b0\u25b0\u25b0\u25b1","\u25b0\u25b0\u25b0\u25b0\u25b0\u25b0\u25b0","\u25b0\u25b1\u25b1\u25b1\u25b1\u25b1\u25b1"]},"dwarfFortress":{"interval":80,"frames":[" \u2588\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2588\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2588\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2593\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2593\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2592\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2592\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2591\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a\u2591\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 ","\u263a \u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a \u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a \u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\u2588\xa3\xa3\xa3 "," \u263a \u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2588\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\xa3\xa3\xa3 "," \u263a\u2593\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\xa3\xa3\xa3 "," \u263a\u2592\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\xa3\xa3\xa3 "," \u263a\u2591\u2588\xa3\xa3\xa3 "," \u263a \u2588\xa3\xa3\xa3 "," \u263a\u2588\xa3\xa3\xa3 "," \u263a\u2588\xa3\xa3\xa3 "," \u263a\u2593\xa3\xa3\xa3 "," \u263a\u2593\xa3\xa3\xa3 "," \u263a\u2592\xa3\xa3\xa3 "," \u263a\u2592\xa3\xa3\xa3 "," \u263a\u2591\xa3\xa3\xa3 "," \u263a\u2591\xa3\xa3\xa3 "," \u263a \xa3\xa3\xa3 "," \u263a\xa3\xa3\xa3 "," \u263a\xa3\xa3\xa3 "," \u263a\u2593\xa3\xa3 "," \u263a\u2593\xa3\xa3 "," \u263a\u2592\xa3\xa3 "," \u263a\u2592\xa3\xa3 "," \u263a\u2591\xa3\xa3 "," \u263a\u2591\xa3\xa3 "," \u263a \xa3\xa3 "," \u263a\xa3\xa3 "," \u263a\xa3\xa3 "," \u263a\u2593\xa3 "," \u263a\u2593\xa3 "," \u263a\u2592\xa3 "," \u263a\u2592\xa3 "," \u263a\u2591\xa3 "," \u263a\u2591\xa3 "," \u263a \xa3 "," \u263a\xa3 "," \u263a\xa3 "," \u263a\u2593 "," \u263a\u2593 "," \u263a\u2592 "," \u263a\u2592 "," \u263a\u2591 "," \u263a\u2591 "," \u263a "," \u263a &"," \u263a \u263c&"," \u263a \u263c &"," \u263a\u263c &"," \u263a\u263c & "," \u203c & "," \u263a & "," \u203c & "," \u263a & "," \u203c & "," \u263a & ","\u203c & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xa3 "," & \u2591\xa3 "," & \u2592\xa3 "," & \u2593\xa3 "," & \xa3\xa3 "," & \u2591\xa3\xa3 "," & \u2592\xa3\xa3 ","& \u2593\xa3\xa3 ","& \xa3\xa3\xa3 "," \u2591\xa3\xa3\xa3 "," \u2592\xa3\xa3\xa3 "," \u2593\xa3\xa3\xa3 "," \u2588\xa3\xa3\xa3 "," \u2591\u2588\xa3\xa3\xa3 "," \u2592\u2588\xa3\xa3\xa3 "," \u2593\u2588\xa3\xa3\xa3 "," \u2588\u2588\xa3\xa3\xa3 "," \u2591\u2588\u2588\xa3\xa3\xa3 "," \u2592\u2588\u2588\xa3\xa3\xa3 "," \u2593\u2588\u2588\xa3\xa3\xa3 "," \u2588\u2588\u2588\xa3\xa3\xa3 "," \u2591\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2592\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2593\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2591\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2592\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2593\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xa3\xa3\xa3 "]}}')},7257:e=>{e.exports=/^#!(.*)/},7261:(e,t,r)=>{const i=r(3785),n=r(8482).action,s=r(4434),o=r(4347),a=o.beep,u=o.cursor,c=r(8888);e.exports=class extends s{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);const t=i.createInterface({input:this.in,escapeCodeTimeout:50});i.emitKeypressEvents(this.in,t),this.in.isTTY&&this.in.setRawMode(!0);const r=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,s=(e,t)=>{let i=n(t,r);!1===i?this._&&this._(e,t):"function"==typeof this[i]?this[i](t):this.bell()};this.close=()=>{this.out.write(u.show),this.in.removeListener("keypress",s),this.in.isTTY&&this.in.setRawMode(!1),t.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",s)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(a)}render(){this.onRender(c),this.firstRender&&(this.firstRender=!1)}}},7456:(e,t,r)=>{const i=r(8888),n=r(3248),s=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"\u{1f603}".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),o=Object.freeze({aborted:i.red(n.cross),done:i.green(n.tick),exited:i.yellow(n.cross),default:i.cyan("?")});e.exports={styles:s,render:e=>s[e]||s.default,symbols:o,symbol:(e,t,r)=>t?o.aborted:r?o.exited:e?o.done:o.default,delimiter:e=>i.gray(e?n.ellipsis:n.pointerSmall),item:(e,t)=>i.gray(e?t?n.pointerSmall:"+":n.line)}},7590:(e,t,r)=>{const i=r(8843);e.exports={readJson:i.readFile,readJsonSync:i.readFileSync,writeJson:i.writeFile,writeJsonSync:i.writeFileSync}},7676:(e,t,r)=>{const i=r(7135),{erase:n,cursor:s}=r(4347);e.exports=function(e,t){if(!t)return n.line+s.to(0);let r=0;const o=e.split(/\r?\n/);for(let e of o)r+=1+Math.floor(Math.max([...i(e)].length-1,0)/t);return n.lines(r)}},7751:(e,t,r)=>{const i=r(4635).fromPromise;e.exports={copy:i(r(4370)),copySync:r(1796)}},7908:(e,t,r)=>{const i=r(6289),{checkPath:n}=r(1319),s=e=>"number"==typeof e?e:{mode:511,...e}.mode;e.exports.makeDir=async(e,t)=>(n(e),i.mkdir(e,{mode:s(t),recursive:!0})),e.exports.makeDirSync=(e,t)=>(n(e),i.mkdirSync(e,{mode:s(t),recursive:!0}))},7933:(e,t,r)=>{e.exports={action:r(1787),clear:r(7676),style:r(7456),strip:r(7135),figures:r(3248),lines:r(334),wrap:r(1485),entriesToDisplay:r(4640)}},8006:(e,t,r)=>{const i=r(4635).fromPromise,{makeDir:n,makeDirSync:s}=r(7908),o=i(n);e.exports={mkdirs:o,mkdirsSync:s,mkdirp:o,mkdirpSync:s,ensureDir:o,ensureDirSync:s}},8171:(e,t,r)=>{const i=r(4264);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),t=this.date.getDay();return"DD"===this.token?String(e).padStart(2,"0"):"Do"===this.token?e+(e=>1==(e%=10)?"st":2===e?"nd":3===e?"rd":"th")(e):"d"===this.token?t+1:"ddd"===this.token?this.locales.weekdaysShort[t]:"dddd"===this.token?this.locales.weekdays[t]:e}}},8254:(e,t,r)=>{var i=r(9140),n=process.cwd,s=null,o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return s||(s=n.call(process)),s};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var a=process.chdir;process.chdir=function(e){s=null,a.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,a)}e.exports=function(e){function t(t){return t?function(r,i,n){return t.call(e,r,i,(function(e){c(e)&&(e=null),n&&n.apply(this,arguments)}))}:t}function r(t){return t?function(r,i){try{return t.call(e,r,i)}catch(e){if(!c(e))throw e}}:t}function n(t){return t?function(r,i,n,s){return t.call(e,r,i,n,(function(e){c(e)&&(e=null),s&&s.apply(this,arguments)}))}:t}function s(t){return t?function(r,i,n){try{return t.call(e,r,i,n)}catch(e){if(!c(e))throw e}}:t}function a(t){return t?function(r,i,n){function s(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),n&&n.apply(this,arguments)}return"function"==typeof i&&(n=i,i=null),i?t.call(e,r,i,s):t.call(e,r,s)}:t}function u(t){return t?function(r,i){var n=i?t.call(e,r,i):t.call(e,r);return n&&(n.uid<0&&(n.uid+=4294967296),n.gid<0&&(n.gid+=4294967296)),n}:t}function c(e){return!e||"ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}var l;i.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,n){e.open(t,i.O_WRONLY|i.O_SYMLINK,r,(function(t,i){t?n&&n(t):e.fchmod(i,r,(function(t){e.close(i,(function(e){n&&n(t||e)}))}))}))},e.lchmodSync=function(t,r){var n,s=e.openSync(t,i.O_WRONLY|i.O_SYMLINK,r),o=!0;try{n=e.fchmodSync(s,r),o=!1}finally{if(o)try{e.closeSync(s)}catch(e){}else e.closeSync(s)}return n}}(e),e.lutimes||function(e){i.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(t,r,n,s){e.open(t,i.O_SYMLINK,(function(t,i){t?s&&s(t):e.futimes(i,r,n,(function(t){e.close(i,(function(e){s&&s(t||e)}))}))}))},e.lutimesSync=function(t,r,n){var s,o=e.openSync(t,i.O_SYMLINK),a=!0;try{s=e.futimesSync(o,r,n),a=!1}finally{if(a)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return s}):e.futimes&&(e.lutimes=function(e,t,r,i){i&&process.nextTick(i)},e.lutimesSync=function(){})}(e),e.chown=n(e.chown),e.fchown=n(e.fchown),e.lchown=n(e.lchown),e.chmod=t(e.chmod),e.fchmod=t(e.fchmod),e.lchmod=t(e.lchmod),e.chownSync=s(e.chownSync),e.fchownSync=s(e.fchownSync),e.lchownSync=s(e.lchownSync),e.chmodSync=r(e.chmodSync),e.fchmodSync=r(e.fchmodSync),e.lchmodSync=r(e.lchmodSync),e.stat=a(e.stat),e.fstat=a(e.fstat),e.lstat=a(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,r){r&&process.nextTick(r)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,r,i){i&&process.nextTick(i)},e.lchownSync=function(){}),"win32"===o&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function r(r,i,n){var s=Date.now(),o=0;t(r,i,(function a(u){if(u&&("EACCES"===u.code||"EPERM"===u.code||"EBUSY"===u.code)&&Date.now()-s<6e4)return setTimeout((function(){e.stat(i,(function(e,s){e&&"ENOENT"===e.code?t(r,i,a):n(u)}))}),o),void(o<100&&(o+=10));n&&n(u)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.rename)),e.read="function"!=typeof e.read?e.read:function(t){function r(r,i,n,s,o,a){var u;if(a&&"function"==typeof a){var c=0;u=function(l,h,d){if(l&&"EAGAIN"===l.code&&c<10)return c++,t.call(e,r,i,n,s,o,u);a.apply(this,arguments)}}return t.call(e,r,i,n,s,o,u)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.read),e.readSync="function"!=typeof e.readSync?e.readSync:(l=e.readSync,function(t,r,i,n,s){for(var o=0;;)try{return l.call(e,t,r,i,n,s)}catch(e){if("EAGAIN"===e.code&&o<10){o++;continue}throw e}})}},8332:(e,t,r)=>{const i=r(3683),n=["suggest","format","onState","validate","onRender","type"],s=()=>{};async function o(e=[],{onSubmit:t=s,onCancel:r=s}={}){const u={},c=o._override||{};let l,h,d,p,f,m;e=[].concat(e);const g=async(e,t,r=!1)=>{if(r||!e.validate||!0===e.validate(t))return e.format?await e.format(t,u):t};for(h of e)if(({name:p,type:f}=h),"function"==typeof f&&(f=await f(l,{...u},h),h.type=f),f){for(let e in h){if(n.includes(e))continue;let t=h[e];h[e]="function"==typeof t?await t(l,{...u},m):t}if(m=h,"string"!=typeof h.message)throw new Error("prompt message is required");if(({name:p,type:f}=h),void 0===i[f])throw new Error(`prompt type (${f}) is not defined`);if(void 0===c[h.name]||(l=await g(h,c[h.name]),void 0===l)){try{l=o._injected?a(o._injected,h.initial):await i[f](h),u[p]=l=await g(h,l,!0),d=await t(h,l,u)}catch(e){d=!await r(h,u)}if(d)return u}else u[p]=l}return u}function a(e,t){const r=e.shift();if(r instanceof Error)throw r;return void 0===r?t:r}e.exports=Object.assign(o,{prompt:o,prompts:i,inject:function(e){o._injected=(o._injected||[]).concat(e)},override:function(e){o._override=Object.assign({},e)}})},8359:e=>{e.exports=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var r={__proto__:t(e)};else r=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})),r};var t=Object.getPrototypeOf||function(e){return e.__proto__}},8360:e=>{e.exports=JSON.parse('{"4":"zh_CHS","1025":"ar_SA","1026":"bg_BG","1027":"ca_ES","1028":"zh_TW","1029":"cs_CZ","1030":"da_DK","1031":"de_DE","1032":"el_GR","1033":"en_US","1034":"es_ES","1035":"fi_FI","1036":"fr_FR","1037":"he_IL","1038":"hu_HU","1039":"is_IS","1040":"it_IT","1041":"ja_JP","1042":"ko_KR","1043":"nl_NL","1044":"nb_NO","1045":"pl_PL","1046":"pt_BR","1047":"rm_CH","1048":"ro_RO","1049":"ru_RU","1050":"hr_HR","1051":"sk_SK","1052":"sq_AL","1053":"sv_SE","1054":"th_TH","1055":"tr_TR","1056":"ur_PK","1057":"id_ID","1058":"uk_UA","1059":"be_BY","1060":"sl_SI","1061":"et_EE","1062":"lv_LV","1063":"lt_LT","1064":"tg_TJ","1065":"fa_IR","1066":"vi_VN","1067":"hy_AM","1069":"eu_ES","1070":"wen_DE","1071":"mk_MK","1074":"tn_ZA","1076":"xh_ZA","1077":"zu_ZA","1078":"af_ZA","1079":"ka_GE","1080":"fo_FO","1081":"hi_IN","1082":"mt_MT","1083":"se_NO","1086":"ms_MY","1087":"kk_KZ","1088":"ky_KG","1089":"sw_KE","1090":"tk_TM","1092":"tt_RU","1093":"bn_IN","1094":"pa_IN","1095":"gu_IN","1096":"or_IN","1097":"ta_IN","1098":"te_IN","1099":"kn_IN","1100":"ml_IN","1101":"as_IN","1102":"mr_IN","1103":"sa_IN","1104":"mn_MN","1105":"bo_CN","1106":"cy_GB","1107":"kh_KH","1108":"lo_LA","1109":"my_MM","1110":"gl_ES","1111":"kok_IN","1114":"syr_SY","1115":"si_LK","1118":"am_ET","1121":"ne_NP","1122":"fy_NL","1123":"ps_AF","1124":"fil_PH","1125":"div_MV","1128":"ha_NG","1130":"yo_NG","1131":"quz_BO","1132":"ns_ZA","1133":"ba_RU","1134":"lb_LU","1135":"kl_GL","1144":"ii_CN","1146":"arn_CL","1148":"moh_CA","1150":"br_FR","1152":"ug_CN","1153":"mi_NZ","1154":"oc_FR","1155":"co_FR","1156":"gsw_FR","1157":"sah_RU","1158":"qut_GT","1159":"rw_RW","1160":"wo_SN","1164":"gbz_AF","2049":"ar_IQ","2052":"zh_CN","2055":"de_CH","2057":"en_GB","2058":"es_MX","2060":"fr_BE","2064":"it_CH","2067":"nl_BE","2068":"nn_NO","2070":"pt_PT","2077":"sv_FI","2080":"ur_IN","2092":"az_AZ","2094":"dsb_DE","2107":"se_SE","2108":"ga_IE","2110":"ms_BN","2115":"uz_UZ","2128":"mn_CN","2129":"bo_BT","2141":"iu_CA","2143":"tmz_DZ","2155":"quz_EC","3073":"ar_EG","3076":"zh_HK","3079":"de_AT","3081":"en_AU","3082":"es_ES","3084":"fr_CA","3098":"sr_SP","3131":"se_FI","3179":"quz_PE","4097":"ar_LY","4100":"zh_SG","4103":"de_LU","4105":"en_CA","4106":"es_GT","4108":"fr_CH","4122":"hr_BA","4155":"smj_NO","5121":"ar_DZ","5124":"zh_MO","5127":"de_LI","5129":"en_NZ","5130":"es_CR","5132":"fr_LU","5179":"smj_SE","6145":"ar_MA","6153":"en_IE","6154":"es_PA","6156":"fr_MC","6203":"sma_NO","7169":"ar_TN","7177":"en_ZA","7178":"es_DO","7194":"sr_BA","7227":"sma_SE","8193":"ar_OM","8201":"en_JA","8202":"es_VE","8218":"bs_BA","8251":"sms_FI","9217":"ar_YE","9225":"en_CB","9226":"es_CO","9275":"smn_FI","10241":"ar_SY","10249":"en_BZ","10250":"es_PE","11265":"ar_JO","11273":"en_TT","11274":"es_AR","12289":"ar_LB","12297":"en_ZW","12298":"es_EC","13313":"ar_KW","13321":"en_PH","13322":"es_CL","14337":"ar_AE","14346":"es_UR","15361":"ar_BH","15370":"es_PY","16385":"ar_QA","16394":"es_BO","17417":"en_MY","17418":"es_SV","18441":"en_IN","18442":"es_HN","19466":"es_NI","20490":"es_PR","21514":"es_US","31748":"zh_CHT"}')},8386:e=>{e.exports=(e,t)=>{if(!e.meta||"escape"===e.name){if(e.ctrl){if("a"===e.name)return"first";if("c"===e.name)return"abort";if("d"===e.name)return"abort";if("e"===e.name)return"last";if("g"===e.name)return"reset"}if(t){if("j"===e.name)return"down";if("k"===e.name)return"up"}return"return"===e.name||"enter"===e.name?"submit":"backspace"===e.name?"delete":"delete"===e.name?"deleteForward":"abort"===e.name?"abort":"escape"===e.name?"exit":"tab"===e.name?"next":"pagedown"===e.name?"nextPage":"pageup"===e.name?"prevPage":"home"===e.name?"home":"end"===e.name?"end":"up"===e.name?"up":"down"===e.name?"down":"right"===e.name?"right":"left"===e.name&&"left"}}},8388:(e,t,r)=>{const i=r(6928),n=r(3803),s=r(2077),o=r(1880),a="win32"===process.platform,u=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;e.exports=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const l={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?l:function(e){if(!a)return e;const t=function(e){e.file=n(e);const t=e.file&&o(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(e),r=!u.test(t);if(e.options.forceShell||r){const r=c.test(t);e.command=i.normalize(e.command),e.command=s.command(e.command),e.args=e.args.map((e=>s.argument(e,r)));const n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(l)}},8459:e=>{class t{constructor({token:e,date:t,parts:r,locales:i}){this.token=e,this.date=t||new Date,this.parts=r||[this],this.locales=i||{}}up(){}down(){}next(){const e=this.parts.indexOf(this);return this.parts.find(((r,i)=>i>e&&r instanceof t))}setTo(e){}prev(){let e=[].concat(this.parts).reverse();const r=e.indexOf(this);return e.find(((e,i)=>i>r&&e instanceof t))}toString(){return String(this.date)}}e.exports=t},8482:(e,t,r)=>{e.exports={action:r(8386),clear:r(6203),style:r(6187),strip:r(9440),figures:r(6135),lines:r(6905),wrap:r(3424),entriesToDisplay:r(4409)}},8541:(e,t,r)=>{e.exports=s,s.sync=function(e,t){return n(i.statSync(e),e,t)};var i=r(9896);function n(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var i=0;i<r.length;i++){var n=r[i].toLowerCase();if(n&&e.substr(-n.length).toLowerCase()===n)return!0}return!1}(t,r)}function s(e,t,r){i.stat(e,(function(i,s){r(i,!i&&n(s,e,t))}))}},8544:(e,t,r)=>{const i=r(3785),{action:n}=r(7933),s=r(4434),{beep:o,cursor:a}=r(4347),u=r(8888);e.exports=class extends s{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);const t=i.createInterface({input:this.in,escapeCodeTimeout:50});i.emitKeypressEvents(this.in,t),this.in.isTTY&&this.in.setRawMode(!0);const r=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,s=(e,t)=>{let i=n(t,r);!1===i?this._&&this._(e,t):"function"==typeof this[i]?this[i](t):this.bell()};this.close=()=>{this.out.write(a.show),this.in.removeListener("keypress",s),this.in.isTTY&&this.in.setRawMode(!1),t.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",s)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(o)}render(){this.onRender(u),this.firstRender&&(this.firstRender=!1)}}},8590:(e,t,r)=>{const i=r(8888),n=r(8544),{erase:s,cursor:o}=r(4347),{style:a,clear:u,figures:c,wrap:l,entriesToDisplay:h}=r(7933),d=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),p=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]);e.exports=class extends n{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial="number"==typeof e.initial?e.initial:((e,t)=>{const r=e.findIndex((e=>e.value===t||e.title===t));return r>-1?r:void 0})(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=a.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=u("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return"number"==typeof this._fb?e=this.choices[this._fb]:"string"==typeof this._fb&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=d(this.suggestions,e):this.value=this.fallback.value,this.fire()}async complete(e){const t=this.completing=this.suggest(this.input,this.choices),r=await t;if(this.completing!==t)return;this.suggestions=r.map(((e,t,r)=>({title:p(r,t),value:d(r,t),description:e.description}))),this.completing=!1;const i=Math.max(r.length-1,0);this.moveSelect(Math.min(i,this.select)),e&&e()}reset(){this.input="",this.complete((()=>{this.moveSelect(void 0!==this.initial?this.initial:0),this.render()})),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){let r=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${r}${e}${i}`,this.cursor=r.length+1,this.complete(this.render),this.render()}delete(){if(0===this.cursor)return this.bell();let e=this.input.slice(0,this.cursor-1),t=this.input.slice(this.cursor);this.input=`${e}${t}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),t=this.input.slice(this.cursor+1);this.input=`${e}${t}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){0===this.select?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,t,r,n){let s,o=r?c.arrowUp:n?c.arrowDown:" ",a=t?i.cyan().underline(e.title):e.title;return o=(t?i.cyan(c.pointer)+" ":" ")+o,e.description&&(s=` - ${e.description}`,(o.length+a.length+s.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(s="\n"+l(e.description,{margin:3,width:this.out.columns}))),o+" "+a+i.gray(s||"")}render(){if(this.closed)return;this.firstRender?this.out.write(o.hide):this.out.write(u(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:t}=h(this.select,this.choices.length,this.limit);if(this.outputText=[a.symbol(this.done,this.aborted,this.exited),i.bold(this.msg),a.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const r=this.suggestions.slice(e,t).map(((r,i)=>this.renderOption(r,this.select===i+e,0===i&&e>0,i+e===t-1&&t<this.choices.length))).join("\n");this.outputText+="\n"+(r||i.gray(this.fallback.title))}this.out.write(s.line+o.to(0)+this.outputText)}}},8611:t=>{t.exports=e(import.meta.url)("http")},8626:(e,t,r)=>{const i=r(8888),n=r(8544),{style:s,clear:o,figures:a}=r(7933),{erase:u,cursor:c}=r(4347),{DatePart:l,Meridiem:h,Day:d,Hours:p,Milliseconds:f,Minutes:m,Month:g,Seconds:D,Year:y}=r(1693),b=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,w={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new d(e),3:e=>new g(e),4:e=>new y(e),5:e=>new h(e),6:e=>new p(e),7:e=>new m(e),8:e=>new D(e),9:e=>new f(e)},v={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};e.exports=class extends n{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(v,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=o("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let t;for(this.parts=[];t=b.exec(e);){let e=t.shift(),r=t.findIndex((e=>null!=e));this.parts.push(r in w?w[r]({token:t[r]||e,date:this.date,parts:this.parts,locales:this.locales}):t[r]||e)}let r=this.parts.reduce(((e,t)=>("string"==typeof t&&"string"==typeof e[e.length-1]?e[e.length-1]+=t:e.push(t),e)),[]);this.parts.splice(0),this.parts.push(...r),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex((e=>e instanceof l))),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let e=await this.validator(this.value);"string"==typeof e&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error)return this.color="red",this.fire(),void this.render();this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex((e=>e instanceof l))),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(c.hide):this.out.write(o(this.outputText,this.out.columns)),super.render(),this.outputText=[s.symbol(this.done,this.aborted),i.bold(this.msg),s.delimiter(!1),this.parts.reduce(((e,t,r)=>e.concat(r!==this.cursor||this.done?t:i.cyan().underline(t.toString()))),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split("\n").reduce(((e,t,r)=>e+`\n${r?" ":a.pointerSmall} ${i.red().italic(t)}`),"")),this.out.write(u.line+c.to(0)+this.outputText))}}},8770:(e,t,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(3298):e.exports=r(2728)},8843:(e,t,r)=>{let i;try{i=r(627)}catch(e){i=r(9896)}const n=r(4635),{stringify:s,stripBom:o}=r(374),a={readFile:n.fromPromise((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||i,s=!("throws"in t)||t.throws;let a,u=await n.fromCallback(r.readFile)(e,t);u=o(u);try{a=JSON.parse(u,t?t.reviver:null)}catch(t){if(s)throw t.message=`${e}: ${t.message}`,t;return null}return a})),readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||i,n=!("throws"in t)||t.throws;try{let i=r.readFileSync(e,t);return i=o(i),JSON.parse(i,t.reviver)}catch(t){if(n)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:n.fromPromise((async function(e,t,r={}){const o=r.fs||i,a=s(t,r);await n.fromCallback(o.writeFile)(e,a,r)})),writeFileSync:function(e,t,r={}){const n=r.fs||i,o=s(t,r);return n.writeFileSync(e,o,r)}};e.exports=a},8888:e=>{const{FORCE_COLOR:t,NODE_DISABLE_COLORS:r,TERM:i}=process.env,n={enabled:!r&&"dumb"!==i&&"0"!==t,reset:o(0,0),bold:o(1,22),dim:o(2,22),italic:o(3,23),underline:o(4,24),inverse:o(7,27),hidden:o(8,28),strikethrough:o(9,29),black:o(30,39),red:o(31,39),green:o(32,39),yellow:o(33,39),blue:o(34,39),magenta:o(35,39),cyan:o(36,39),white:o(37,39),gray:o(90,39),grey:o(90,39),bgBlack:o(40,49),bgRed:o(41,49),bgGreen:o(42,49),bgYellow:o(43,49),bgBlue:o(44,49),bgMagenta:o(45,49),bgCyan:o(46,49),bgWhite:o(47,49)};function s(e,t){let r,i=0,n="",s="";for(;i<e.length;i++)r=e[i],n+=r.open,s+=r.close,t.includes(r.close)&&(t=t.replace(r.rgx,r.close+r.open));return n+t+s}function o(e,t){let r={open:`\x1b[${e}m`,close:`\x1b[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(t){return void 0!==this&&void 0!==this.has?(this.has.includes(e)||(this.has.push(e),this.keys.push(r)),void 0===t?this:n.enabled?s(this.keys,t+""):t+""):void 0===t?function(e,t){let r={has:e,keys:t};return r.reset=n.reset.bind(r),r.bold=n.bold.bind(r),r.dim=n.dim.bind(r),r.italic=n.italic.bind(r),r.underline=n.underline.bind(r),r.inverse=n.inverse.bind(r),r.hidden=n.hidden.bind(r),r.strikethrough=n.strikethrough.bind(r),r.black=n.black.bind(r),r.red=n.red.bind(r),r.green=n.green.bind(r),r.yellow=n.yellow.bind(r),r.blue=n.blue.bind(r),r.magenta=n.magenta.bind(r),r.cyan=n.cyan.bind(r),r.white=n.white.bind(r),r.gray=n.gray.bind(r),r.grey=n.grey.bind(r),r.bgBlack=n.bgBlack.bind(r),r.bgRed=n.bgRed.bind(r),r.bgGreen=n.bgGreen.bind(r),r.bgYellow=n.bgYellow.bind(r),r.bgBlue=n.bgBlue.bind(r),r.bgMagenta=n.bgMagenta.bind(r),r.bgCyan=n.bgCyan.bind(r),r.bgWhite=n.bgWhite.bind(r),r}([e],[r]):n.enabled?s([r],t+""):t+""}}e.exports=n},8981:(e,t,r)=>{e.exports={...r(6289),...r(7751),...r(1199),...r(4144),...r(6704),...r(8006),...r(5783),...r(1376),...r(3640),...r(9630)}},9023:t=>{t.exports=e(import.meta.url)("util")},9111:(e,t,r)=>{function i(e,t,r,i,n,s,o){try{var a=e[s](o),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(i,n)}const n=r(8888),s=r(7261),o=r(4347),a=o.erase,u=o.cursor,c=r(8482),l=c.style,h=c.clear,d=c.figures,p=c.wrap,f=c.entriesToDisplay,m=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),g=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]);e.exports=class extends s{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial="number"==typeof e.initial?e.initial:((e,t)=>{const r=e.findIndex((e=>e.value===t||e.title===t));return r>-1?r:void 0})(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=l.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=h("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return"number"==typeof this._fb?e=this.choices[this._fb]:"string"==typeof this._fb&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=m(this.suggestions,e):this.value=this.fallback.value,this.fire()}complete(e){var t,r=this;return(t=function*(){const t=r.completing=r.suggest(r.input,r.choices),i=yield t;if(r.completing!==t)return;r.suggestions=i.map(((e,t,r)=>({title:g(r,t),value:m(r,t),description:e.description}))),r.completing=!1;const n=Math.max(i.length-1,0);r.moveSelect(Math.min(n,r.select)),e&&e()},function(){var e=this,r=arguments;return new Promise((function(n,s){var o=t.apply(e,r);function a(e){i(o,n,s,a,u,"next",e)}function u(e){i(o,n,s,a,u,"throw",e)}a(void 0)}))})()}reset(){this.input="",this.complete((()=>{this.moveSelect(void 0!==this.initial?this.initial:0),this.render()})),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){let r=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${r}${e}${i}`,this.cursor=r.length+1,this.complete(this.render),this.render()}delete(){if(0===this.cursor)return this.bell();let e=this.input.slice(0,this.cursor-1),t=this.input.slice(this.cursor);this.input=`${e}${t}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),t=this.input.slice(this.cursor+1);this.input=`${e}${t}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){0===this.select?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,t,r,i){let s,o=r?d.arrowUp:i?d.arrowDown:" ",a=t?n.cyan().underline(e.title):e.title;return o=(t?n.cyan(d.pointer)+" ":" ")+o,e.description&&(s=` - ${e.description}`,(o.length+a.length+s.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(s="\n"+p(e.description,{margin:3,width:this.out.columns}))),o+" "+a+n.gray(s||"")}render(){if(this.closed)return;this.firstRender?this.out.write(u.hide):this.out.write(h(this.outputText,this.out.columns)),super.render();let e=f(this.select,this.choices.length,this.limit),t=e.startIndex,r=e.endIndex;if(this.outputText=[l.symbol(this.done,this.aborted,this.exited),n.bold(this.msg),l.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const e=this.suggestions.slice(t,r).map(((e,i)=>this.renderOption(e,this.select===i+t,0===i&&t>0,i+t===r-1&&r<this.choices.length))).join("\n");this.outputText+="\n"+(e||n.gray(this.fallback.title))}this.out.write(a.line+u.to(0)+this.outputText)}}},9140:t=>{t.exports=e(import.meta.url)("constants")},9180:(e,t,r)=>{e.exports={DatePart:r(8459),Meridiem:r(4356),Day:r(5882),Hours:r(2583),Milliseconds:r(1516),Minutes:r(3317),Month:r(5058),Seconds:r(249),Year:r(5599)}},9344:(e,t,r)=>{var i;function n(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,i){n(e,t||{},(function(e,t){e?i(e):r(t)}))}))}i(e,t||{},(function(e,i){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,i=!1),r(e,i)}))}r(9896),i="win32"===process.platform||global.TESTING_WINDOWS?r(8541):r(709),e.exports=n,n.sync=function(e,t){try{return i.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},9440:e=>{e.exports=e=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(t,"g");return"string"==typeof e?e.replace(r,""):e}},9467:(e,t,r)=>{const i=r(6289),n=r(4635).fromPromise;e.exports={utimesMillis:n((async function(e,t,r){const n=await i.open(e,"r+");let s=null;try{await i.futimes(n,t,r)}finally{try{await i.close(n)}catch(e){s=e}}if(s)throw s})),utimesMillisSync:function(e,t,r){const n=i.openSync(e,"r+");return i.futimesSync(n,t,r),i.closeSync(n)}}},9518:(e,t,r)=>{const i=r(4264);e.exports=class extends i{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}}},9565:(e,t,r)=>{e.exports=function(e){function t(e){let r,n,s,o=null;function a(...e){if(!a.enabled)return;const i=a,n=Number(new Date),s=n-(r||n);i.diff=s,i.prev=r,i.curr=n,r=n,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,n)=>{if("%%"===r)return"%";o++;const s=t.formatters[n];if("function"==typeof s){const t=e[o];r=s.call(i,t),e.splice(o,1),o--}return r})),t.formatArgs.call(i,e),(i.log||t.log).apply(i,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=i,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(n!==t.namespaces&&(n=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function i(e,r){const i=t(this.namespace+(void 0===r?":":r)+e);return i.log=this.log,i}function n(e,t){let r=0,i=0,n=-1,s=0;for(;r<e.length;)if(i<t.length&&(t[i]===e[r]||"*"===t[i]))"*"===t[i]?(n=i,s=r,i++):(r++,i++);else{if(-1===n)return!1;i=n+1,s++,r=s}for(;i<t.length&&"*"===t[i];)i++;return i===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names,...t.skips.map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").trim().replace(" ",",").split(",").filter(Boolean);for(const e of r)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const r of t.skips)if(n(e,r))return!1;for(const r of t.names)if(n(e,r))return!0;return!1},t.humanize=r(3866),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},9630:(e,t,r)=>{const i=r(627),n=r(4635).fromCallback;e.exports={remove:n((function(e,t){i.rm(e,{recursive:!0,force:!0},t)})),removeSync:function(e){i.rmSync(e,{recursive:!0,force:!0})}}},9695:e=>{const t=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};e.exports=t,e.exports.default=t},9896:t=>{t.exports=e(import.meta.url)("fs")},9927:(e,t,r)=>{const i=r(8888),n=r(8544),{cursor:s,erase:o}=r(4347),{style:a,figures:u,clear:c,lines:l}=r(7933),h=/[0-9]/,d=e=>void 0!==e,p=(e,t)=>{let r=Math.pow(10,t);return Math.round(e*r)/r};e.exports=class extends n{constructor(e={}){super(e),this.transform=a.render(e.style),this.msg=e.message,this.initial=d(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=d(e.min)?e.min:-1/0,this.max=d(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){e||0===e?(this.placeholder=!1,this.rendered=this.transform.render(`${p(e,this.round)}`),this._value=p(e,this.round)):(this.placeholder=!0,this.rendered=i.gray(this.transform.render(`${this.initial}`)),this._value=""),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return"-"===e||"."===e&&this.float||h.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=""!==e?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let e=await this.validator(this.value);"string"==typeof e&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error)return this.color="red",this.fire(),void this.render();let e=this.value;this.value=""!==e?e:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){if(this.typed="",""===this.value&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",""===this.value&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(0===e.length)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",""!==this.value&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,t){if(!this.valid(e))return this.bell();const r=Date.now();if(r-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=r,this.color="cyan","."===e)return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(s.down(l(this.outputError,this.out.columns)-1)+c(this.outputError,this.out.columns)),this.out.write(c(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[a.symbol(this.done,this.aborted),i.bold(this.msg),a.delimiter(this.done),this.done&&(this.done||this.placeholder)?this.rendered:i[this.color]().underline(this.rendered)].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((e,t,r)=>e+`\n${r?" ":u.pointerSmall} ${i.red().italic(t)}`),"")),this.out.write(o.line+s.to(0)+this.outputText+s.save+this.outputError+s.restore))}}}},r={};function i(e){var n=r[e];if(void 0!==n)return n.exports;var s=r[e]={exports:{}};return t[e](s,s.exports,i),s.exports}var n=i(9896),s=i(2613);const o={right:function(e,t){e=e.trim();const r=c.stringWidth(e);return r<t?" ".repeat(t-r)+e:e},center:function(e,t){e=e.trim();const r=c.stringWidth(e);return r>=t?e:" ".repeat(t-r>>1)+e}};class a{constructor(e){var t;this.width=e.width,this.wrap=null===(t=e.wrap)||void 0===t||t,this.rows=[]}span(...e){this.div(...e).span=!0}resetOutput(){this.rows=[]}div(...e){if(0===e.length&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&"string"==typeof e[0])return this.applyLayoutDSL(e[0]);const t=e.map((e=>"string"==typeof e?this.colFromString(e):e));return this.rows.push(t),t}shouldApplyLayoutDSL(...e){return 1===e.length&&"string"==typeof e[0]&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){const t=e.split("\n").map((e=>e.split("\t")));let r=0;return t.forEach((e=>{e.length>1&&c.stringWidth(e[0])>r&&(r=Math.min(Math.floor(.5*this.width),c.stringWidth(e[0])))})),t.forEach((e=>{this.div(...e.map(((t,i)=>({text:t.trim(),padding:this.measurePadding(t),width:0===i&&e.length>1?r:void 0}))))})),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){const t=c.stripAnsi(e);return[0,t.match(/\s*$/)[0].length,0,t.match(/^\s*/)[0].length]}toString(){const e=[];return this.rows.forEach((t=>{this.rowToString(t,e)})),e.filter((e=>!e.hidden)).map((e=>e.text)).join("\n")}rowToString(e,t){return this.rasterize(e).forEach(((r,i)=>{let n="";r.forEach(((r,s)=>{const{width:a}=e[s],l=this.negatePadding(e[s]);let h=r;l>c.stringWidth(r)&&(h+=" ".repeat(l-c.stringWidth(r))),e[s].align&&"left"!==e[s].align&&this.wrap&&(h=(0,o[e[s].align])(h,l),c.stringWidth(h)<l&&(h+=" ".repeat((a||0)-c.stringWidth(h)-1)));const d=e[s].padding||[0,0,0,0];d[3]&&(n+=" ".repeat(d[3])),n+=u(e[s],h,"| "),n+=h,n+=u(e[s],h," |"),d[1]&&(n+=" ".repeat(d[1])),0===i&&t.length>0&&(n=this.renderInline(n,t[t.length-1]))})),t.push({text:n.replace(/ +$/,""),span:e.span})})),t}renderInline(e,t){const r=e.match(/^ */),i=r?r[0].length:0,n=t.text,s=c.stringWidth(n.trimRight());return t.span?this.wrap?i<s?e:(t.hidden=!0,n.trimRight()+" ".repeat(i-s)+e.trimLeft()):(t.hidden=!0,n+e):e}rasterize(e){const t=[],r=this.columnWidths(e);let i;return e.forEach(((e,n)=>{e.width=r[n],i=this.wrap?c.wrap(e.text,this.negatePadding(e),{hard:!0}).split("\n"):e.text.split("\n"),e.border&&(i.unshift("."+"-".repeat(this.negatePadding(e)+2)+"."),i.push("'"+"-".repeat(this.negatePadding(e)+2)+"'")),e.padding&&(i.unshift(...new Array(e.padding[0]||0).fill("")),i.push(...new Array(e.padding[2]||0).fill(""))),i.forEach(((e,r)=>{t[r]||t.push([]);const i=t[r];for(let e=0;e<n;e++)void 0===i[e]&&i.push("");i.push(e)}))})),t}negatePadding(e){let t=e.width||0;return e.padding&&(t-=(e.padding[3]||0)+(e.padding[1]||0)),e.border&&(t-=4),t}columnWidths(e){if(!this.wrap)return e.map((e=>e.width||c.stringWidth(e.text)));let t=e.length,r=this.width;const i=e.map((e=>{if(e.width)return t--,r-=e.width,e.width})),n=t?Math.floor(r/t):0;return i.map(((t,r)=>void 0===t?Math.max(n,function(e){const t=e.padding||[],r=1+(t[3]||0)+(t[1]||0);return e.border?r+4:r}(e[r])):t))}}function u(e,t,r){return e.border?/[.']-+[.']/.test(t)?"":0!==t.trim().length?r:" ":""}let c;const l=new RegExp("\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function h(e){return e.replace(l,"")}function d(e,t){const[r,i]=e.match(l)||["",""];e=h(e);let n="";for(let r=0;r<e.length;r++)0!==r&&r%t==0&&(n+="\n"),n+=e.charAt(r);return r&&i&&(n=`${r}${n}${i}`),n}var p,f=i(6928),m=i(9023),g=i(7016);function D(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),-1===e.indexOf("-")&&-1===e.indexOf("_"))return e;{let t="",r=!1;const i=e.match(/^-+/);for(let n=i?i[0].length:0;n<e.length;n++){let i=e.charAt(n);r&&(r=!1,i=i.toUpperCase()),0===n||"-"!==i&&"_"!==i?"-"!==i&&"_"!==i&&(t+=i):r=!0}return t}}function y(e,t){const r=e.toLowerCase();t=t||"-";let i="";for(let n=0;n<e.length;n++){const s=r.charAt(n),o=e.charAt(n);i+=s!==o&&n>0?`${t}${r.charAt(n)}`:o}return i}function b(e){return null!=e&&("number"==typeof e||!!/^0x[0-9a-f]+$/i.test(e)||!/^0[^.]/.test(e)&&/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e))}let w;function v(e){return void 0!==e?e+1:1}function E(e){return"__proto__"===e?"___proto___":e}var F,C,S;!function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"}(p||(p={}));const x=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,O=null!==(C=null===(F=null===process||void 0===process?void 0:process.versions)||void 0===F?void 0:F.node)&&void 0!==C?C:null===(S=null===process||void 0===process?void 0:process.version)||void 0===S?void 0:S.slice(1);if(O&&Number(O.match(/^([^.]+)/)[1])<x)throw Error(`yargs parser supports a minimum Node.js version of ${x}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const _=process?process.env:{},A=new class{constructor(e){w=e}parse(e,t){const r=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},t),i=function(e){if(Array.isArray(e))return e.map((e=>"string"!=typeof e?e+"":e));e=e.trim();let t=0,r=null,i=null,n=null;const s=[];for(let o=0;o<e.length;o++)r=i,i=e.charAt(o)," "!==i||n?(i===n?n=null:"'"!==i&&'"'!==i||n||(n=i),s[t]||(s[t]=""),s[t]+=i):" "!==r&&t++;return s}(e),n="string"==typeof e,s=function(e){const t=[],r=Object.create(null);let i=!0;for(Object.keys(e).forEach((function(r){t.push([].concat(e[r],r))}));i;){i=!1;for(let e=0;e<t.length;e++)for(let r=e+1;r<t.length;r++)if(t[e].filter((function(e){return-1!==t[r].indexOf(e)})).length){t[e]=t[e].concat(t[r]),t.splice(r,1),i=!0;break}}return t.forEach((function(e){e=e.filter((function(e,t,r){return r.indexOf(e)===t}));const t=e.pop();void 0!==t&&"string"==typeof t&&(r[t]=e)})),r}(Object.assign(Object.create(null),r.alias)),o=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},r.configuration),a=Object.assign(Object.create(null),r.default),u=r.configObjects||[],c=r.envPrefix,l=o["populate--"],h=l?"--":"_",d=Object.create(null),f=Object.create(null),m=r.__||w.format,g={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},F=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,C=new RegExp("^--"+o["negation-prefix"]+"(.+)");[].concat(r.array||[]).filter(Boolean).forEach((function(e){const t="object"==typeof e?e.key:e,r=Object.keys(e).map((function(e){return{boolean:"bools",string:"strings",number:"numbers"}[e]})).filter(Boolean).pop();r&&(g[r][t]=!0),g.arrays[t]=!0,g.keys.push(t)})),[].concat(r.boolean||[]).filter(Boolean).forEach((function(e){g.bools[e]=!0,g.keys.push(e)})),[].concat(r.string||[]).filter(Boolean).forEach((function(e){g.strings[e]=!0,g.keys.push(e)})),[].concat(r.number||[]).filter(Boolean).forEach((function(e){g.numbers[e]=!0,g.keys.push(e)})),[].concat(r.count||[]).filter(Boolean).forEach((function(e){g.counts[e]=!0,g.keys.push(e)})),[].concat(r.normalize||[]).filter(Boolean).forEach((function(e){g.normalize[e]=!0,g.keys.push(e)})),"object"==typeof r.narg&&Object.entries(r.narg).forEach((([e,t])=>{"number"==typeof t&&(g.nargs[e]=t,g.keys.push(e))})),"object"==typeof r.coerce&&Object.entries(r.coerce).forEach((([e,t])=>{"function"==typeof t&&(g.coercions[e]=t,g.keys.push(e))})),void 0!==r.config&&(Array.isArray(r.config)||"string"==typeof r.config?[].concat(r.config).filter(Boolean).forEach((function(e){g.configs[e]=!0})):"object"==typeof r.config&&Object.entries(r.config).forEach((([e,t])=>{"boolean"!=typeof t&&"function"!=typeof t||(g.configs[e]=t)}))),function(...e){e.forEach((function(e){Object.keys(e||{}).forEach((function(e){g.aliases[e]||(g.aliases[e]=[].concat(s[e]||[]),g.aliases[e].concat(e).forEach((function(t){if(/-/.test(t)&&o["camel-case-expansion"]){const r=D(t);r!==e&&-1===g.aliases[e].indexOf(r)&&(g.aliases[e].push(r),d[r]=!0)}})),g.aliases[e].concat(e).forEach((function(t){if(t.length>1&&/[A-Z]/.test(t)&&o["camel-case-expansion"]){const r=y(t,"-");r!==e&&-1===g.aliases[e].indexOf(r)&&(g.aliases[e].push(r),d[r]=!0)}})),g.aliases[e].forEach((function(t){g.aliases[t]=[e].concat(g.aliases[e].filter((function(e){return t!==e})))})))}))}))}(r.key,s,r.default,g.arrays),Object.keys(a).forEach((function(e){(g.aliases[e]||[]).forEach((function(t){a[t]=a[e]}))}));let S=null;Object.keys(g.counts).find((e=>U(e,g.arrays)?(S=Error(m("Invalid configuration: %s, opts.count excludes opts.array.",e)),!0):!!U(e,g.nargs)&&(S=Error(m("Invalid configuration: %s, opts.count excludes opts.narg.",e)),!0)));let x=[];const O=Object.assign(Object.create(null),{_:[]}),_={};for(let e=0;e<i.length;e++){const t=i[e],r=t.replace(/^-{3,}/,"---");let n,s,a,u,c,l;if("--"!==t&&/^-/.test(t)&&H(t))A(t);else{if(r.match(/^---+(=|$)/)){A(t);continue}if(t.match(/^--.+=/)||!o["short-option-groups"]&&t.match(/^-.+=/))u=t.match(/^--?([^=]+)=([\s\S]*)$/),null!==u&&Array.isArray(u)&&u.length>=3&&(U(u[1],g.arrays)?e=M(e,u[1],i,u[2]):!1!==U(u[1],g.nargs)?e=T(e,u[1],i,u[2]):I(u[1],u[2],!0));else if(t.match(C)&&o["boolean-negation"])u=t.match(C),null!==u&&Array.isArray(u)&&u.length>=2&&(s=u[1],I(s,!!U(s,g.arrays)&&[!1]));else if(t.match(/^--.+/)||!o["short-option-groups"]&&t.match(/^-[^-]+/))u=t.match(/^--?(.+)/),null!==u&&Array.isArray(u)&&u.length>=2&&(s=u[1],U(s,g.arrays)?e=M(e,s,i):!1!==U(s,g.nargs)?e=T(e,s,i):(c=i[e+1],void 0===c||c.match(/^-/)&&!c.match(F)||U(s,g.bools)||U(s,g.counts)?/^(true|false)$/.test(c)?(I(s,c),e++):I(s,G(s)):(I(s,c),e++)));else if(t.match(/^-.\..+=/))u=t.match(/^-([^=]+)=([\s\S]*)$/),null!==u&&Array.isArray(u)&&u.length>=3&&I(u[1],u[2]);else if(t.match(/^-.\..+/)&&!t.match(F))c=i[e+1],u=t.match(/^-(.\..+)/),null!==u&&Array.isArray(u)&&u.length>=2&&(s=u[1],void 0===c||c.match(/^-/)||U(s,g.bools)||U(s,g.counts)?I(s,G(s)):(I(s,c),e++));else if(t.match(/^-[^-]+/)&&!t.match(F)){a=t.slice(1,-1).split(""),n=!1;for(let r=0;r<a.length;r++){if(c=t.slice(r+2),a[r+1]&&"="===a[r+1]){l=t.slice(r+3),s=a[r],U(s,g.arrays)?e=M(e,s,i,l):!1!==U(s,g.nargs)?e=T(e,s,i,l):I(s,l),n=!0;break}if("-"!==c){if(/[A-Za-z]/.test(a[r])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(c)&&!1===U(c,g.bools)){I(a[r],c),n=!0;break}if(a[r+1]&&a[r+1].match(/\W/)){I(a[r],c),n=!0;break}I(a[r],G(a[r]))}else I(a[r],c)}s=t.slice(-1)[0],n||"-"===s||(U(s,g.arrays)?e=M(e,s,i):!1!==U(s,g.nargs)?e=T(e,s,i):(c=i[e+1],void 0===c||/^(-|--)[^-]/.test(c)&&!c.match(F)||U(s,g.bools)||U(s,g.counts)?/^(true|false)$/.test(c)?(I(s,c),e++):I(s,G(s)):(I(s,c),e++)))}else if(t.match(/^-[0-9]$/)&&t.match(F)&&U(t.slice(1),g.bools))s=t.slice(1),I(s,G(s));else{if("--"===t){x=i.slice(e+1);break}if(o["halt-at-non-option"]){x=i.slice(e);break}A(t)}}}function A(e){const t=B("_",e);"string"!=typeof t&&"number"!=typeof t||O._.push(t)}function T(e,t,r,i){let n,s=U(t,g.nargs);if(s="number"!=typeof s||isNaN(s)?1:s,0===s)return z(i)||(S=Error(m("Argument unexpected for: %s",t))),I(t,G(t)),e;let a=z(i)?0:1;if(o["nargs-eats-options"])r.length-(e+1)+a<s&&(S=Error(m("Not enough arguments following: %s",t))),a=s;else{for(n=e+1;n<r.length&&(!r[n].match(/^-[^0-9]/)||r[n].match(F)||H(r[n]));n++)a++;a<s&&(S=Error(m("Not enough arguments following: %s",t)))}let u=Math.min(a,s);for(!z(i)&&u>0&&(I(t,i),u--),n=e+1;n<u+e+1;n++)I(t,r[n]);return e+u}function M(e,t,r,i){let s=[],u=i||r[e+1];const c=U(t,g.nargs);if(U(t,g.bools)&&!/^(true|false)$/.test(u))s.push(!0);else if(z(u)||z(i)&&/^-/.test(u)&&!F.test(u)&&!H(u)){if(void 0!==a[t]){const e=a[t];s=Array.isArray(e)?e:[e]}}else{z(i)||s.push(j(t,i,!0));for(let i=e+1;i<r.length&&!(!o["greedy-arrays"]&&s.length>0||c&&"number"==typeof c&&s.length>=c)&&(u=r[i],!/^-/.test(u)||F.test(u)||H(u));i++)e=i,s.push(j(t,u,n))}return"number"==typeof c&&(c&&s.length<c||isNaN(c)&&0===s.length)&&(S=Error(m("Not enough arguments following: %s",t))),I(t,s),e}function I(e,t,r=n){if(/-/.test(e)&&o["camel-case-expansion"]){const t=e.split(".").map((function(e){return D(e)})).join(".");k(e,t)}const i=j(e,t,r),s=e.split(".");L(O,s,i),g.aliases[e]&&g.aliases[e].forEach((function(e){const t=e.split(".");L(O,t,i)})),s.length>1&&o["dot-notation"]&&(g.aliases[s[0]]||[]).forEach((function(t){let r=t.split(".");const n=[].concat(s);n.shift(),r=r.concat(n),(g.aliases[e]||[]).includes(r.join("."))||L(O,r,i)})),U(e,g.normalize)&&!U(e,g.arrays)&&[e].concat(g.aliases[e]||[]).forEach((function(e){Object.defineProperty(_,e,{enumerable:!0,get:()=>t,set(e){t="string"==typeof e?w.normalize(e):e}})}))}function k(e,t){g.aliases[e]&&g.aliases[e].length||(g.aliases[e]=[t],d[t]=!0),g.aliases[t]&&g.aliases[t].length||k(t,e)}function j(e,t,r){r&&(t=function(e){return"string"!=typeof e||"'"!==e[0]&&'"'!==e[0]||e[e.length-1]!==e[0]?e:e.substring(1,e.length-1)}(t)),(U(e,g.bools)||U(e,g.counts))&&"string"==typeof t&&(t="true"===t);let i=Array.isArray(t)?t.map((function(t){return B(e,t)})):B(e,t);return U(e,g.counts)&&(z(i)||"boolean"==typeof i)&&(i=v()),U(e,g.normalize)&&U(e,g.arrays)&&(i=Array.isArray(t)?t.map((e=>w.normalize(e))):w.normalize(t)),i}function B(e,t){return o["parse-positional-numbers"]||"_"!==e?(U(e,g.strings)||U(e,g.bools)||Array.isArray(t)||(b(t)&&o["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)))||!z(t)&&U(e,g.numbers))&&(t=Number(t)),t):t}function P(e,t){Object.keys(e).forEach((function(r){const i=e[r],n=t?t+"."+r:r;"object"==typeof i&&null!==i&&!Array.isArray(i)&&o["dot-notation"]?P(i,n):(!N(O,n.split("."))||U(n,g.arrays)&&o["combine-arrays"])&&I(n,i)}))}function R(e,t){if(void 0===c)return;const r="string"==typeof c?c:"",i=w.env();Object.keys(i).forEach((function(n){if(""===r||0===n.lastIndexOf(r,0)){const s=n.split("__").map((function(e,t){return 0===t&&(e=e.substring(r.length)),D(e)}));(t&&g.configs[s.join(".")]||!t)&&!N(e,s)&&I(s.join("."),i[n])}}))}function $(e,t,r,i=!1){Object.keys(r).forEach((function(n){N(e,n.split("."))||(L(e,n.split("."),r[n]),i&&(f[n]=!0),(t[n]||[]).forEach((function(t){N(e,t.split("."))||L(e,t.split("."),r[n])})))}))}function N(e,t){let r=e;o["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach((function(e){r=r[e]||{}}));const i=t[t.length-1];return"object"==typeof r&&i in r}function L(e,t,r){let i=e;o["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach((function(e){e=E(e),"object"==typeof i&&void 0===i[e]&&(i[e]={}),"object"!=typeof i[e]||Array.isArray(i[e])?(Array.isArray(i[e])?i[e].push({}):i[e]=[i[e],{}],i=i[e][i[e].length-1]):i=i[e]}));const n=E(t[t.length-1]),s=U(t.join("."),g.arrays),a=Array.isArray(r);let u=o["duplicate-arguments-array"];!u&&U(n,g.nargs)&&(u=!0,(!z(i[n])&&1===g.nargs[n]||Array.isArray(i[n])&&i[n].length===g.nargs[n])&&(i[n]=void 0)),r===v()?i[n]=v(i[n]):Array.isArray(i[n])?u&&s&&a?i[n]=o["flatten-duplicate-arrays"]?i[n].concat(r):(Array.isArray(i[n][0])?i[n]:[i[n]]).concat([r]):u||Boolean(s)!==Boolean(a)?i[n]=i[n].concat([r]):i[n]=r:void 0===i[n]&&s?i[n]=a?r:[r]:!u||void 0===i[n]||U(n,g.counts)||U(n,g.bools)?i[n]=r:i[n]=[i[n],r]}function U(e,t){const r=[].concat(g.aliases[e]||[],e),i=Object.keys(t),n=r.find((e=>i.includes(e)));return!!n&&t[n]}function W(e){const t=Object.keys(g);return[].concat(t.map((e=>g[e]))).some((function(t){return Array.isArray(t)?t.includes(e):t[e]}))}function H(e){return o["unknown-options-as-args"]&&function(e){return!(e=e.replace(/^-{3,}/,"--")).match(F)&&(!function(e){if(e.match(F)||!e.match(/^-[^-]+/))return!1;let t,r=!0;const i=e.slice(1).split("");for(let n=0;n<i.length;n++){if(t=e.slice(n+2),!W(i[n])){r=!1;break}if(i[n+1]&&"="===i[n+1]||"-"===t||/[A-Za-z]/.test(i[n])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(t)||i[n+1]&&i[n+1].match(/\W/))break}return r}(e)&&!function(e,...t){return[].concat(...t).some((function(t){const r=e.match(t);return r&&W(r[1])}))}(e,/^-+([^=]+?)=[\s\S]*$/,C,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/))}(e)}function G(e){return U(e,g.bools)||U(e,g.counts)||!(`${e}`in a)?(t=function(e){let t=p.BOOLEAN;return U(e,g.strings)?t=p.STRING:U(e,g.numbers)?t=p.NUMBER:U(e,g.bools)?t=p.BOOLEAN:U(e,g.arrays)&&(t=p.ARRAY),t}(e),{[p.BOOLEAN]:!0,[p.STRING]:"",[p.NUMBER]:void 0,[p.ARRAY]:[]}[t]):a[e];var t}function z(e){return void 0===e}return R(O,!0),R(O,!1),function(e){const t=Object.create(null);$(t,g.aliases,a),Object.keys(g.configs).forEach((function(r){const i=e[r]||t[r];if(i)try{let e=null;const t=w.resolve(w.cwd(),i),n=g.configs[r];if("function"==typeof n){try{e=n(t)}catch(t){e=t}if(e instanceof Error)return void(S=e)}else e=w.require(t);P(e)}catch(t){"PermissionDenied"===t.name?S=t:e[r]&&(S=Error(m("Invalid JSON config file: %s",i)))}}))}(O),void 0!==u&&u.forEach((function(e){P(e)})),$(O,g.aliases,a,!0),function(e){let t;const r=new Set;Object.keys(e).forEach((function(i){if(!r.has(i)&&(t=U(i,g.coercions),"function"==typeof t))try{const n=B(i,t(e[i]));[].concat(g.aliases[i]||[],i).forEach((t=>{r.add(t),e[t]=n}))}catch(e){S=e}}))}(O),o["set-placeholder-key"]&&function(e){g.keys.forEach((t=>{~t.indexOf(".")||void 0===e[t]&&(e[t]=void 0)}))}(O),Object.keys(g.counts).forEach((function(e){N(O,e.split("."))||I(e,0)})),l&&x.length&&(O[h]=[]),x.forEach((function(e){O[h].push(e)})),o["camel-case-expansion"]&&o["strip-dashed"]&&Object.keys(O).filter((e=>"--"!==e&&e.includes("-"))).forEach((e=>{delete O[e]})),o["strip-aliased"]&&[].concat(...Object.keys(s).map((e=>s[e]))).forEach((e=>{o["camel-case-expansion"]&&e.includes("-")&&delete O[e.split(".").map((e=>D(e))).join(".")],delete O[e]})),{aliases:Object.assign({},g.aliases),argv:Object.assign(_,O),configuration:o,defaulted:Object.assign({},f),error:S,newAliases:Object.assign({},d)}}}({cwd:process.cwd,env:()=>_,format:m.format,normalize:f.normalize,resolve:f.resolve,require:e=>{if("undefined"!=typeof require)return require(e);if(e.match(/\.json$/))return JSON.parse((0,n.readFileSync)(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),T=function(e,t){return A.parse(e.slice(),t).argv};T.detailed=function(e,t){return A.parse(e.slice(),t)},T.camelCase=D,T.decamelize=y,T.looksLikeNumber=b;const M=T;class I extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,I)}}const k={fs:{readFileSync:n.readFileSync,writeFile:n.writeFile},format:m.format,resolve:f.resolve,exists:e=>{try{return(0,n.statSync)(e).isFile()}catch(e){return!1}}};let j;class B{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles="boolean"!=typeof e.updateFiles||e.updateFiles,this.locale=e.locale||"en",this.fallbackToLanguage="boolean"!=typeof e.fallbackToLanguage||e.fallbackToLanguage,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if("string"!=typeof arguments[0])return this._taggedLiteral(arguments[0],...arguments);const t=e.shift();let r=function(){};return"function"==typeof e[e.length-1]&&(r=e.pop()),r=r||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]=t,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:r})):r(),j.format.apply(j.format,[this.cache[this.locale][t]||t].concat(e))}__n(){const e=Array.prototype.slice.call(arguments),t=e.shift(),r=e.shift(),i=e.shift();let n=function(){};"function"==typeof e[e.length-1]&&(n=e.pop()),this.cache[this.locale]||this._readLocaleFile();let s=1===i?t:r;this.cache[this.locale][t]&&(s=this.cache[this.locale][t][1===i?"one":"other"]),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]={one:t,other:r},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n();const o=[s];return~s.indexOf("%d")&&o.push(i),j.format.apply(j.format,o.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.cache[this.locale][t]=e[t])}_taggedLiteral(e,...t){let r="";return e.forEach((function(e,i){const n=t[i+1];r+=e,void 0!==n&&(r+="%s")})),this.__.apply(this,[r].concat([].slice.call(t,1)))}_enqueueWrite(e){this.writeQueue.push(e),1===this.writeQueue.length&&this._processWriteQueue()}_processWriteQueue(){const e=this,t=this.writeQueue[0],r=t.directory,i=t.locale,n=t.cb,s=this._resolveLocaleFile(r,i),o=JSON.stringify(this.cache[i],null,2);j.fs.writeFile(s,o,"utf-8",(function(t){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),n(t)}))}_readLocaleFile(){let e={};const t=this._resolveLocaleFile(this.directory,this.locale);try{j.fs.readFileSync&&(e=JSON.parse(j.fs.readFileSync(t,"utf-8")))}catch(r){if(r instanceof SyntaxError&&(r.message="syntax error in "+t),"ENOENT"!==r.code)throw r;e={}}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let r=j.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(r)&&~t.lastIndexOf("_")){const i=j.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(i)&&(r=i)}return r}_fileExistsSync(e){return j.exists(e)}}const P="loading a directory of commands is not supported yet for ESM";let R;try{R=(0,g.fileURLToPath)(import.meta.url)}catch(e){R=process.cwd()}const $=R.substring(0,R.lastIndexOf("node_modules")),N={assert:{notStrictEqual:s.notStrictEqual,strictEqual:s.strictEqual},cliui:function(e){return function(e,t){return c=t,new a({width:(null==e?void 0:e.width)||("object"==typeof process&&process.stdout&&process.stdout.columns?process.stdout.columns:80),wrap:null==e?void 0:e.wrap})}(e,{stringWidth:e=>[...e].length,stripAnsi:h,wrap:d})},findUp:function(e,t){let r,i=(0,f.resolve)(".",e);for((0,n.statSync)(i).isDirectory()||(i=(0,f.dirname)(i));;){if(r=t(i,(0,n.readdirSync)(i)),r)return(0,f.resolve)(i,r);if(i=(0,f.dirname)(r=i),r===i)break}},getEnv:e=>process.env[e],inspect:m.inspect,getCallerFile:()=>{throw new I(P)},getProcessArgvBin:function(){return process.argv[process.versions.electron&&!process.defaultApp?0:1]},mainFilename:$||process.cwd(),Parser:M,path:{basename:f.basename,dirname:f.dirname,extname:f.extname,relative:f.relative,resolve:f.resolve},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(e,t)=>process.emitWarning(e,t),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:void 0!==process.stdout.columns?process.stdout.columns:null},readFileSync:n.readFileSync,require:()=>{throw new I("require is not supported by ESM")},requireDirectory:()=>{throw new I(P)},stringWidth:e=>[...e].length,y18n:(L={directory:(0,f.resolve)(R,"../../../locales"),updateFiles:!1},function(e){j=k;const t=new B(e);return{__:t.__.bind(t),__n:t.__n.bind(t),setLocale:t.setLocale.bind(t),getLocale:t.getLocale.bind(t),updateLocale:t.updateLocale.bind(t),locale:t.locale}}(L))};var L;function U(e,t,r,i){r.assert.notStrictEqual(e,t,i)}function W(e,t){t.assert.strictEqual(typeof e,"string")}function H(e){return Object.keys(e)}function G(e){return!!e&&!!e.then&&"function"==typeof e.then}function z(e){const t=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),r=/\.*[\][<>]/g,i=t.shift();if(!i)throw new Error(`No command found in: ${e}`);const n={cmd:i.replace(r,""),demanded:[],optional:[]};return t.forEach(((e,i)=>{let s=!1;e=e.replace(/\s/g,""),/\.+[\]>]/.test(e)&&i===t.length-1&&(s=!0),/^\[/.test(e)?n.optional.push({cmd:e.replace(r,"").split("|"),variadic:s}):n.demanded.push({cmd:e.replace(r,"").split("|"),variadic:s})})),n}const V=["first","second","third","fourth","fifth","sixth"];function q(e,t,r){try{let i=0;const[n,s,o]="object"==typeof e?[{demanded:[],optional:[]},e,t]:[z(`cmd ${e}`),t,r],a=[].slice.call(s);for(;a.length&&void 0===a[a.length-1];)a.pop();const u=o||a.length;if(u<n.demanded.length)throw new I(`Not enough arguments provided. Expected ${n.demanded.length} but received ${a.length}.`);const c=n.demanded.length+n.optional.length;if(u>c)throw new I(`Too many arguments provided. Expected max ${c} but received ${u}.`);n.demanded.forEach((e=>{const t=Y(a.shift());0===e.cmd.filter((e=>e===t||"*"===e)).length&&K(t,e.cmd,i),i+=1})),n.optional.forEach((e=>{if(0===a.length)return;const t=Y(a.shift());0===e.cmd.filter((e=>e===t||"*"===e)).length&&K(t,e.cmd,i),i+=1}))}catch(e){console.warn(e.stack)}}function Y(e){return Array.isArray(e)?"array":null===e?"null":typeof e}function K(e,t,r){throw new I(`Invalid ${V[r]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}class J{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,t,r=!0,i=!1){if(q("<array|function> [boolean] [boolean] [boolean]",[e,t,r],arguments.length),Array.isArray(e)){for(let i=0;i<e.length;i++){if("function"!=typeof e[i])throw Error("middleware must be a function");const n=e[i];n.applyBeforeValidation=t,n.global=r}Array.prototype.push.apply(this.globalMiddleware,e)}else if("function"==typeof e){const n=e;n.applyBeforeValidation=t,n.global=r,n.mutates=i,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,t){const r=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter((e=>{const i=[...r[t]||[],t];return!e.option||!i.includes(e.option)})),e.option=t,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){const e=this.frozens.pop();void 0!==e&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter((e=>e.global))}}function Z(e,t,r,i){return r.reduce(((e,r)=>{if(r.applyBeforeValidation!==i)return e;if(r.mutates){if(r.applied)return e;r.applied=!0}if(G(e))return e.then((e=>Promise.all([e,r(e,t)]))).then((([e,t])=>Object.assign(e,t)));{const i=r(e,t);return G(i)?i.then((t=>Object.assign(e,t))):Object.assign(e,i)}}),e)}function Q(e,t,r=e=>{throw e}){try{const r="function"==typeof e?e():e;return G(r)?r.then((e=>t(e))):t(r)}catch(e){return r(e)}}const X=/(^\*)|(^\$0)/;class ee{constructor(e,t,r,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=e,this.globalMiddleware=r,this.validation=t}addDirectory(e,t,r,i){"boolean"!=typeof(i=i||{}).recurse&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);const n="function"==typeof i.visit?i.visit:e=>e;i.visit=(e,t,r)=>{const i=n(e,t,r);if(i){if(this.requireCache.has(t))return i;this.requireCache.add(t),this.addHandler(i)}return i},this.shim.requireDirectory({require:t,filename:r},e,i)}addHandler(e,t,r,i,n,s){let o=[];const a=function(e){return e?e.map((e=>(e.applyBeforeValidation=!1,e))):[]}(n);if(i=i||(()=>{}),Array.isArray(e))if(function(e){return e.every((e=>"string"==typeof e))}(e))[e,...o]=e;else for(const t of e)this.addHandler(t);else{if(function(e){return"object"==typeof e&&!Array.isArray(e)}(e)){let t=Array.isArray(e.command)||"string"==typeof e.command?e.command:this.moduleName(e);return e.aliases&&(t=[].concat(t).concat(e.aliases)),void this.addHandler(t,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated)}if(te(r))return void this.addHandler([e].concat(o),t,r.builder,r.handler,r.middlewares,r.deprecated)}if("string"==typeof e){const n=z(e);o=o.map((e=>z(e).cmd));let u=!1;const c=[n.cmd].concat(o).filter((e=>!X.test(e)||(u=!0,!1)));0===c.length&&u&&c.push("$0"),u&&(n.cmd=c[0],o=c.slice(1),e=e.replace(X,n.cmd)),o.forEach((e=>{this.aliasMap[e]=n.cmd})),!1!==t&&this.usage.command(e,t,u,o,s),this.handlers[n.cmd]={original:e,description:t,handler:i,builder:r||{},middlewares:a,deprecated:s,demanded:n.demanded,optional:n.optional},u&&(this.defaultCommand=this.handlers[n.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,t,r,i,n,s){const o=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,a=t.getInternalMethods().getContext(),u=a.commands.slice(),c=!e;e&&(a.commands.push(e),a.fullCommands.push(o.original));const l=this.applyBuilderUpdateUsageAndParse(c,o,t,r.aliases,u,i,n,s);return G(l)?l.then((e=>this.applyMiddlewareAndGetResult(c,o,e.innerArgv,a,n,e.aliases,t))):this.applyMiddlewareAndGetResult(c,o,l.innerArgv,a,n,l.aliases,t)}applyBuilderUpdateUsageAndParse(e,t,r,i,n,s,o,a){const u=t.builder;let c=r;if(re(u)){r.getInternalMethods().getUsageInstance().freeze();const l=u(r.getInternalMethods().reset(i),a);if(G(l))return l.then((i=>{var a;return c=(a=i)&&"function"==typeof a.getInternalMethods?i:r,this.parseAndUpdateUsage(e,t,c,n,s,o)}))}else(function(e){return"object"==typeof e})(u)&&(r.getInternalMethods().getUsageInstance().freeze(),c=r.getInternalMethods().reset(i),Object.keys(t.builder).forEach((e=>{c.option(e,u[e])})));return this.parseAndUpdateUsage(e,t,c,n,s,o)}parseAndUpdateUsage(e,t,r,i,n,s){e&&r.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(r)&&r.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,t),t.description);const o=r.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,n,s);return G(o)?o.then((e=>({aliases:r.parsed.aliases,innerArgv:e}))):{aliases:r.parsed.aliases,innerArgv:o}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&0===e.getInternalMethods().getUsageInstance().getUsage().length}usageFromParentCommandsCommandHandler(e,t){const r=X.test(t.original)?t.original.replace(X,"").trim():t.original,i=e.filter((e=>!X.test(e)));return i.push(r),`$0 ${i.join(" ")}`}handleValidationAndGetResult(e,t,r,i,n,s,o,a){if(!s.getInternalMethods().getHasOutput()){const t=s.getInternalMethods().runValidation(n,a,s.parsed.error,e);r=Q(r,(e=>(t(e),e)))}if(t.handler&&!s.getInternalMethods().getHasOutput()){s.getInternalMethods().setHasOutput();const i=!!s.getOptions().configuration["populate--"];s.getInternalMethods().postProcess(r,i,!1,!1),r=Q(r=Z(r,s,o,!1),(e=>{const r=t.handler(e);return G(r)?r.then((()=>e)):e})),e||s.getInternalMethods().getUsageInstance().cacheHelpMessage(),G(r)&&!s.getInternalMethods().hasParseCallback()&&r.catch((e=>{try{s.getInternalMethods().getUsageInstance().fail(null,e)}catch(e){}}))}return e||(i.commands.pop(),i.fullCommands.pop()),r}applyMiddlewareAndGetResult(e,t,r,i,n,s,o){let a={};if(n)return r;o.getInternalMethods().getHasOutput()||(a=this.populatePositionals(t,r,i,o));const u=this.globalMiddleware.getMiddleware().slice(0).concat(t.middlewares),c=Z(r,o,u,!0);return G(c)?c.then((r=>this.handleValidationAndGetResult(e,t,r,i,s,o,u,a))):this.handleValidationAndGetResult(e,t,c,i,s,o,u,a)}populatePositionals(e,t,r,i){t._=t._.slice(r.commands.length);const n=e.demanded.slice(0),s=e.optional.slice(0),o={};for(this.validation.positionalCount(n.length,t._.length);n.length;){const e=n.shift();this.populatePositional(e,t,o)}for(;s.length;){const e=s.shift();this.populatePositional(e,t,o)}return t._=r.commands.concat(t._.map((e=>""+e))),this.postProcessPositionals(t,o,this.cmdToParseOptions(e.original),i),o}populatePositional(e,t,r){const i=e.cmd[0];e.variadic?r[i]=t._.splice(0).map(String):t._.length&&(r[i]=[String(t._.shift())])}cmdToParseOptions(e){const t={array:[],default:{},alias:{},demand:{}},r=z(e);return r.demanded.forEach((e=>{const[r,...i]=e.cmd;e.variadic&&(t.array.push(r),t.default[r]=[]),t.alias[r]=i,t.demand[r]=!0})),r.optional.forEach((e=>{const[r,...i]=e.cmd;e.variadic&&(t.array.push(r),t.default[r]=[]),t.alias[r]=i})),t}postProcessPositionals(e,t,r,i){const n=Object.assign({},i.getOptions());n.default=Object.assign(r.default,n.default);for(const e of Object.keys(r.alias))n.alias[e]=(n.alias[e]||[]).concat(r.alias[e]);n.array=n.array.concat(r.array),n.config={};const s=[];if(Object.keys(t).forEach((e=>{t[e].map((t=>{n.configuration["unknown-options-as-args"]&&(n.key[e]=!0),s.push(`--${e}`),s.push(t)}))})),!s.length)return;const o=Object.assign({},n.configuration,{"populate--":!1}),a=this.shim.Parser.detailed(s,Object.assign({},n,{configuration:o}));if(a.error)i.getInternalMethods().getUsageInstance().fail(a.error.message,a.error);else{const r=Object.keys(t);Object.keys(t).forEach((e=>{r.push(...a.aliases[e])})),Object.keys(a.argv).forEach((n=>{r.includes(n)&&(t[n]||(t[n]=a.argv[n]),!this.isInConfigs(i,n)&&!this.isDefaulted(i,n)&&Object.prototype.hasOwnProperty.call(e,n)&&Object.prototype.hasOwnProperty.call(a.argv,n)&&(Array.isArray(e[n])||Array.isArray(a.argv[n]))?e[n]=[].concat(e[n],a.argv[n]):e[n]=a.argv[n])}))}}isDefaulted(e,t){const{default:r}=e.getOptions();return Object.prototype.hasOwnProperty.call(r,t)||Object.prototype.hasOwnProperty.call(r,this.shim.Parser.camelCase(t))}isInConfigs(e,t){const{configObjects:r}=e.getOptions();return r.some((e=>Object.prototype.hasOwnProperty.call(e,t)))||r.some((e=>Object.prototype.hasOwnProperty.call(e,this.shim.Parser.camelCase(t))))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){const t=X.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(t,this.defaultCommand.description)}const t=this.defaultCommand.builder;if(re(t))return t(e,!0);te(t)||Object.keys(t).forEach((r=>{e.option(r,t[r])}))}moduleName(e){const t=function(e){if("undefined"==typeof require)return null;for(let t,r=0,i=Object.keys(require.cache);r<i.length;r++)if(t=require.cache[i[r]],t.exports===e)return t;return null}(e);if(!t)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(t.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:t,desc:r}){for(const i of[e,t,r]){if("string"==typeof i||!1===i)return i;U(i,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){const e=this.frozens.pop();U(e,void 0,this.shim),({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e)}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}}function te(e){return"object"==typeof e&&!!e.builder&&"function"==typeof e.handler}function re(e){return"function"==typeof e}function ie(e={},t=()=>!0){const r={};return H(e).forEach((i=>{t(i,e[i])&&(r[i]=e[i])})),r}function ne(e){"undefined"!=typeof process&&[process.stdout,process.stderr].forEach((t=>{const r=t;r._handle&&r.isTTY&&"function"==typeof r._handle.setBlocking&&r._handle.setBlocking(e)}))}function se(e){return"boolean"==typeof e}function oe(e){return"object"==typeof e}function ae(e){return oe(e)?e.indentation:0}function ue(e){return oe(e)?e.text:e}class ce{constructor(e,t,r,i){var n,s,o;this.yargs=e,this.usage=t,this.command=r,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=null!==(o=(null===(n=this.shim.getEnv("SHELL"))||void 0===n?void 0:n.includes("zsh"))||(null===(s=this.shim.getEnv("ZSH_NAME"))||void 0===s?void 0:s.includes("zsh")))&&void 0!==o&&o}defaultCompletion(e,t,r,i){const n=this.command.getCommandHandlers();for(let t=0,r=e.length;t<r;++t)if(n[e[t]]&&n[e[t]].builder){const r=n[e[t]].builder;if(re(r)){this.indexAfterLastReset=t+1;const e=this.yargs.getInternalMethods().reset();return r(e,!0),e.argv}}const s=[];this.commandCompletions(s,e,r),this.optionCompletions(s,e,t,r),this.choicesFromOptionsCompletions(s,e,t,r),this.choicesFromPositionalsCompletions(s,e,t,r),i(null,s)}commandCompletions(e,t,r){const i=this.yargs.getInternalMethods().getContext().commands;r.match(/^-/)||i[i.length-1]===r||this.previousArgHasChoices(t)||this.usage.getCommands().forEach((r=>{const i=z(r[0]).cmd;if(-1===t.indexOf(i))if(this.zshShell){const t=r[1]||"";e.push(i.replace(/:/g,"\\:")+":"+t)}else e.push(i)}))}optionCompletions(e,t,r,i){if((i.match(/^-/)||""===i&&0===e.length)&&!this.previousArgHasChoices(t)){const r=this.yargs.getOptions(),n=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(r.key).forEach((s=>{const o=!!r.configuration["boolean-negation"]&&r.boolean.includes(s);n.includes(s)||r.hiddenOptions.includes(s)||this.argsContainKey(t,s,o)||this.completeOptionKey(s,e,i,o&&!!r.default[s])}))}}choicesFromOptionsCompletions(e,t,r,i){if(this.previousArgHasChoices(t)){const r=this.getPreviousArgChoices(t);r&&r.length>0&&e.push(...r.map((e=>e.replace(/:/g,"\\:"))))}}choicesFromPositionalsCompletions(e,t,r,i){if(""===i&&e.length>0&&this.previousArgHasChoices(t))return;const n=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],s=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),o=n[r._.length-s-1];if(!o)return;const a=this.yargs.getOptions().choices[o]||[];for(const t of a)t.startsWith(i)&&e.push(t.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let t=e[e.length-1],r="";if(!t.startsWith("-")&&e.length>1&&(r=t,t=e[e.length-2]),!t.startsWith("-"))return;const i=t.replace(/^-+/,""),n=this.yargs.getOptions(),s=[i,...this.yargs.getAliases()[i]||[]];let o;for(const e of s)if(Object.prototype.hasOwnProperty.call(n.key,e)&&Array.isArray(n.choices[e])){o=n.choices[e];break}return o?o.filter((e=>!r||e.startsWith(r))):void 0}previousArgHasChoices(e){const t=this.getPreviousArgChoices(e);return void 0!==t&&t.length>0}argsContainKey(e,t,r){const i=t=>-1!==e.indexOf((/^[^0-9]$/.test(t)?"-":"--")+t);if(i(t))return!0;if(r&&i(`no-${t}`))return!0;if(this.aliases)for(const e of this.aliases[t])if(i(e))return!0;return!1}completeOptionKey(e,t,r,i){var n,s,o,a;let u=e;if(this.zshShell){const t=this.usage.getDescriptions(),r=null===(s=null===(n=null==this?void 0:this.aliases)||void 0===n?void 0:n[e])||void 0===s?void 0:s.find((e=>{const r=t[e];return"string"==typeof r&&r.length>0})),i=r?t[r]:void 0,c=null!==(a=null!==(o=t[e])&&void 0!==o?o:i)&&void 0!==a?a:"";u=`${e.replace(/:/g,"\\:")}:${c.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}const c=!/^--/.test(r)&&/^[^0-9]$/.test(e)?"-":"--";t.push(c+u),i&&t.push(c+"no-"+u)}customCompletion(e,t,r,i){if(U(this.customCompletionFunction,null,this.shim),this.customCompletionFunction.length<3){const e=this.customCompletionFunction(r,t);return G(e)?e.then((e=>{this.shim.process.nextTick((()=>{i(null,e)}))})).catch((e=>{this.shim.process.nextTick((()=>{i(e,void 0)}))})):i(null,e)}return this.customCompletionFunction.length>3?this.customCompletionFunction(r,t,((n=i)=>this.defaultCompletion(e,t,r,n)),(e=>{i(null,e)})):this.customCompletionFunction(r,t,(e=>{i(null,e)}))}getCompletion(e,t){const r=e.length?e[e.length-1]:"",i=this.yargs.parse(e,!0),n=this.customCompletionFunction?i=>this.customCompletion(e,i,r,t):i=>this.defaultCompletion(e,i,r,t);return G(i)?i.then(n):n(i)}generateCompletionScript(e,t){let r=this.zshShell?'#compdef {{app_name}}\n###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc\n# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local reply\n local si=$IFS\n IFS=$\'\n\' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "${words[@]}"))\n IFS=$si\n _describe \'values\' reply\n}\ncompdef _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n':'###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local cur_word args type_list\n\n cur_word="${COMP_WORDS[COMP_CWORD]}"\n args=("${COMP_WORDS[@]}")\n\n # ask yargs to generate completions.\n type_list=$({{app_path}} --get-yargs-completions "${args[@]}")\n\n COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )\n\n # if no match was found, fall back to filename completion\n if [ ${#COMPREPLY[@]} -eq 0 ]; then\n COMPREPLY=()\n fi\n\n return 0\n}\ncomplete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n';const i=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),r=r.replace(/{{app_name}}/g,i),r=r.replace(/{{completion_command}}/g,t),r.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}}function le(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;const r=[];let i,n;for(i=0;i<=t.length;i++)r[i]=[i];for(n=0;n<=e.length;n++)r[0][n]=n;for(i=1;i<=t.length;i++)for(n=1;n<=e.length;n++)t.charAt(i-1)===e.charAt(n-1)?r[i][n]=r[i-1][n-1]:i>1&&n>1&&t.charAt(i-2)===e.charAt(n-1)&&t.charAt(i-1)===e.charAt(n-2)?r[i][n]=r[i-2][n-2]+1:r[i][n]=Math.min(r[i-1][n-1]+1,Math.min(r[i][n-1]+1,r[i-1][n]+1));return r[t.length][e.length]}const he=["$0","--","_"];let de,pe=[];function fe(e,t,r,i){de=i;let n={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if("string"!=typeof e.extends)return n;const i=/\.json|\..*rc$/.test(e.extends);let s=null;if(i)s=function(e,t){return de.path.resolve(e,t)}(t,e.extends);else try{s=require.resolve(e.extends)}catch(t){return e}!function(e){if(pe.indexOf(e)>-1)throw new I(`Circular extended configurations: '${e}'.`)}(s),pe.push(s),n=i?JSON.parse(de.readFileSync(s,"utf8")):require(e.extends),delete e.extends,n=fe(n,de.path.dirname(s),r,de)}return pe=[],r?me(n,e):Object.assign({},n,e)}function me(e,t){const r={};function i(e){return e&&"object"==typeof e&&!Array.isArray(e)}Object.assign(r,e);for(const n of Object.keys(t))i(t[n])&&i(r[n])?r[n]=me(e[n],t[n]):r[n]=t[n];return r}var ge,De,ye,be,we,ve,Ee,Fe,Ce,Se,xe,Oe,_e,Ae,Te,Me,Ie,ke,je,Be,Pe,Re,$e,Ne,Le,Ue,We,He,Ge,ze,Ve,qe,Ye,Ke,Je,Ze=function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r},Qe=function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)};const Xe=Symbol("copyDoubleDash"),et=Symbol("copyDoubleDash"),tt=Symbol("deleteFromParserHintObject"),rt=Symbol("emitWarning"),it=Symbol("freeze"),nt=Symbol("getDollarZero"),st=Symbol("getParserConfiguration"),ot=Symbol("getUsageConfiguration"),at=Symbol("guessLocale"),ut=Symbol("guessVersion"),ct=Symbol("parsePositionalNumbers"),lt=Symbol("pkgUp"),ht=Symbol("populateParserHintArray"),dt=Symbol("populateParserHintSingleValueDictionary"),pt=Symbol("populateParserHintArrayDictionary"),ft=Symbol("populateParserHintDictionary"),mt=Symbol("sanitizeKey"),gt=Symbol("setKey"),Dt=Symbol("unfreeze"),yt=Symbol("validateAsync"),bt=Symbol("getCommandInstance"),wt=Symbol("getContext"),vt=Symbol("getHasOutput"),Et=Symbol("getLoggerInstance"),Ft=Symbol("getParseContext"),Ct=Symbol("getUsageInstance"),St=Symbol("getValidationInstance"),xt=Symbol("hasParseCallback"),Ot=Symbol("isGlobalContext"),_t=Symbol("postProcess"),At=Symbol("rebase"),Tt=Symbol("reset"),Mt=Symbol("runYargsParserAndExecuteCommands"),It=Symbol("runValidation"),kt=Symbol("setHasOutput"),jt=Symbol("kTrackManuallySetKeys");class Bt{constructor(e=[],t,r,i){this.customScriptName=!1,this.parsed=!1,ge.set(this,void 0),De.set(this,void 0),ye.set(this,{commands:[],fullCommands:[]}),be.set(this,null),we.set(this,null),ve.set(this,"show-hidden"),Ee.set(this,null),Fe.set(this,!0),Ce.set(this,{}),Se.set(this,!0),xe.set(this,[]),Oe.set(this,void 0),_e.set(this,{}),Ae.set(this,!1),Te.set(this,null),Me.set(this,!0),Ie.set(this,void 0),ke.set(this,""),je.set(this,void 0),Be.set(this,void 0),Pe.set(this,{}),Re.set(this,null),$e.set(this,null),Ne.set(this,{}),Le.set(this,{}),Ue.set(this,void 0),We.set(this,!1),He.set(this,void 0),Ge.set(this,!1),ze.set(this,!1),Ve.set(this,!1),qe.set(this,void 0),Ye.set(this,{}),Ke.set(this,null),Je.set(this,void 0),Ze(this,He,i,"f"),Ze(this,Ue,e,"f"),Ze(this,De,t,"f"),Ze(this,Be,r,"f"),Ze(this,Oe,new J(this),"f"),this.$0=this[nt](),this[Tt](),Ze(this,ge,Qe(this,ge,"f"),"f"),Ze(this,qe,Qe(this,qe,"f"),"f"),Ze(this,Je,Qe(this,Je,"f"),"f"),Ze(this,je,Qe(this,je,"f"),"f"),Qe(this,je,"f").showHiddenOpt=Qe(this,ve,"f"),Ze(this,Ie,this[et](),"f")}addHelpOpt(e,t){return q("[string|boolean] [string]",[e,t],arguments.length),Qe(this,Te,"f")&&(this[tt](Qe(this,Te,"f")),Ze(this,Te,null,"f")),!1===e&&void 0===t||(Ze(this,Te,"string"==typeof e?e:"help","f"),this.boolean(Qe(this,Te,"f")),this.describe(Qe(this,Te,"f"),t||Qe(this,qe,"f").deferY18nLookup("Show help"))),this}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if(q("[string|boolean] [string]",[e,t],arguments.length),!1===e&&void 0===t)return this;const r="string"==typeof e?e:Qe(this,ve,"f");return this.boolean(r),this.describe(r,t||Qe(this,qe,"f").deferY18nLookup("Show hidden options")),Qe(this,je,"f").showHiddenOpt=r,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return q("<object|string|array> [string|array]",[e,t],arguments.length),this[pt](this.alias.bind(this),"alias",e,t),this}array(e){return q("<array|string>",[e],arguments.length),this[ht]("array",e),this[jt](e),this}boolean(e){return q("<array|string>",[e],arguments.length),this[ht]("boolean",e),this[jt](e),this}check(e,t){return q("<function> [boolean]",[e,t],arguments.length),this.middleware(((t,r)=>Q((()=>e(t,r.getOptions())),(r=>(r?("string"==typeof r||r instanceof Error)&&Qe(this,qe,"f").fail(r.toString(),r):Qe(this,qe,"f").fail(Qe(this,He,"f").y18n.__("Argument check failed: %s",e.toString())),t)),(e=>(Qe(this,qe,"f").fail(e.message?e.message:e.toString(),e),t)))),!1,t),this}choices(e,t){return q("<object|string|array> [string|array]",[e,t],arguments.length),this[pt](this.choices.bind(this),"choices",e,t),this}coerce(e,t){if(q("<object|string|array> [function]",[e,t],arguments.length),Array.isArray(e)){if(!t)throw new I("coerce callback must be provided");for(const r of e)this.coerce(r,t);return this}if("object"==typeof e){for(const t of Object.keys(e))this.coerce(t,e[t]);return this}if(!t)throw new I("coerce callback must be provided");return Qe(this,je,"f").key[e]=!0,Qe(this,Oe,"f").addCoerceMiddleware(((r,i)=>{let n;return Object.prototype.hasOwnProperty.call(r,e)?Q((()=>(n=i.getAliases(),t(r[e]))),(t=>{r[e]=t;const s=i.getInternalMethods().getParserConfiguration()["strip-aliased"];if(n[e]&&!0!==s)for(const i of n[e])r[i]=t;return r}),(e=>{throw new I(e.message)})):r}),e),this}conflicts(e,t){return q("<string|object> [string|array]",[e,t],arguments.length),Qe(this,Je,"f").conflicts(e,t),this}config(e="config",t,r){return q("[object|string] [string|function] [function]",[e,t,r],arguments.length),"object"!=typeof e||Array.isArray(e)?("function"==typeof t&&(r=t,t=void 0),this.describe(e,t||Qe(this,qe,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach((e=>{Qe(this,je,"f").config[e]=r||!0})),this):(e=fe(e,Qe(this,De,"f"),this[st]()["deep-merge-config"]||!1,Qe(this,He,"f")),Qe(this,je,"f").configObjects=(Qe(this,je,"f").configObjects||[]).concat(e),this)}completion(e,t,r){return q("[string] [string|boolean|function] [function]",[e,t,r],arguments.length),"function"==typeof t&&(r=t,t=void 0),Ze(this,we,e||Qe(this,we,"f")||"completion","f"),t||!1===t||(t="generate completion script"),this.command(Qe(this,we,"f"),t),r&&Qe(this,be,"f").registerFunction(r),this}command(e,t,r,i,n,s){return q("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,t,r,i,n,s],arguments.length),Qe(this,ge,"f").addHandler(e,t,r,i,n,s),this}commands(e,t,r,i,n,s){return this.command(e,t,r,i,n,s)}commandDir(e,t){q("<string> [object]",[e,t],arguments.length);const r=Qe(this,Be,"f")||Qe(this,He,"f").require;return Qe(this,ge,"f").addDirectory(e,r,Qe(this,He,"f").getCallerFile(),t),this}count(e){return q("<array|string>",[e],arguments.length),this[ht]("count",e),this[jt](e),this}default(e,t,r){return q("<object|string|array> [*] [string]",[e,t,r],arguments.length),r&&(W(e,Qe(this,He,"f")),Qe(this,je,"f").defaultDescription[e]=r),"function"==typeof t&&(W(e,Qe(this,He,"f")),Qe(this,je,"f").defaultDescription[e]||(Qe(this,je,"f").defaultDescription[e]=Qe(this,qe,"f").functionDescription(t)),t=t.call()),this[dt](this.default.bind(this),"default",e,t),this}defaults(e,t,r){return this.default(e,t,r)}demandCommand(e=1,t,r,i){return q("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,t,r,i],arguments.length),"number"!=typeof t&&(r=t,t=1/0),this.global("_",!1),Qe(this,je,"f").demandedCommands._={min:e,max:t,minMsg:r,maxMsg:i},this}demand(e,t,r){return Array.isArray(t)?(t.forEach((e=>{U(r,!0,Qe(this,He,"f")),this.demandOption(e,r)})),t=1/0):"number"!=typeof t&&(r=t,t=1/0),"number"==typeof e?(U(r,!0,Qe(this,He,"f")),this.demandCommand(e,t,r,r)):Array.isArray(e)?e.forEach((e=>{U(r,!0,Qe(this,He,"f")),this.demandOption(e,r)})):"string"==typeof r?this.demandOption(e,r):!0!==r&&void 0!==r||this.demandOption(e),this}demandOption(e,t){return q("<object|string|array> [string]",[e,t],arguments.length),this[dt](this.demandOption.bind(this),"demandedOptions",e,t),this}deprecateOption(e,t){return q("<string> [string|boolean]",[e,t],arguments.length),Qe(this,je,"f").deprecatedOptions[e]=t,this}describe(e,t){return q("<object|string|array> [string]",[e,t],arguments.length),this[gt](e,!0),Qe(this,qe,"f").describe(e,t),this}detectLocale(e){return q("<boolean>",[e],arguments.length),Ze(this,Fe,e,"f"),this}env(e){return q("[string|boolean]",[e],arguments.length),!1===e?delete Qe(this,je,"f").envPrefix:Qe(this,je,"f").envPrefix=e||"",this}epilogue(e){return q("<string>",[e],arguments.length),Qe(this,qe,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return q("<string|array> [string]",[e,t],arguments.length),Array.isArray(e)?e.forEach((e=>this.example(...e))):Qe(this,qe,"f").example(e,t),this}exit(e,t){Ze(this,Ae,!0,"f"),Ze(this,Ee,t,"f"),Qe(this,Se,"f")&&Qe(this,He,"f").process.exit(e)}exitProcess(e=!0){return q("[boolean]",[e],arguments.length),Ze(this,Se,e,"f"),this}fail(e){if(q("<function|boolean>",[e],arguments.length),"boolean"==typeof e&&!1!==e)throw new I("Invalid first argument. Expected function or boolean 'false'");return Qe(this,qe,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return q("<array> [function]",[e,t],arguments.length),t?Qe(this,be,"f").getCompletion(e,t):new Promise(((t,r)=>{Qe(this,be,"f").getCompletion(e,((e,i)=>{e?r(e):t(i)}))}))}getDemandedOptions(){return q([],0),Qe(this,je,"f").demandedOptions}getDemandedCommands(){return q([],0),Qe(this,je,"f").demandedCommands}getDeprecatedOptions(){return q([],0),Qe(this,je,"f").deprecatedOptions}getDetectLocale(){return Qe(this,Fe,"f")}getExitProcess(){return Qe(this,Se,"f")}getGroups(){return Object.assign({},Qe(this,_e,"f"),Qe(this,Le,"f"))}getHelp(){if(Ze(this,Ae,!0,"f"),!Qe(this,qe,"f").hasCachedHelpMessage()){if(!this.parsed){const e=this[Mt](Qe(this,Ue,"f"),void 0,void 0,0,!0);if(G(e))return e.then((()=>Qe(this,qe,"f").help()))}const e=Qe(this,ge,"f").runDefaultBuilderOn(this);if(G(e))return e.then((()=>Qe(this,qe,"f").help()))}return Promise.resolve(Qe(this,qe,"f").help())}getOptions(){return Qe(this,je,"f")}getStrict(){return Qe(this,Ge,"f")}getStrictCommands(){return Qe(this,ze,"f")}getStrictOptions(){return Qe(this,Ve,"f")}global(e,t){return q("<string|array> [boolean]",[e,t],arguments.length),e=[].concat(e),!1!==t?Qe(this,je,"f").local=Qe(this,je,"f").local.filter((t=>-1===e.indexOf(t))):e.forEach((e=>{Qe(this,je,"f").local.includes(e)||Qe(this,je,"f").local.push(e)})),this}group(e,t){q("<string|array> <string>",[e,t],arguments.length);const r=Qe(this,Le,"f")[t]||Qe(this,_e,"f")[t];Qe(this,Le,"f")[t]&&delete Qe(this,Le,"f")[t];const i={};return Qe(this,_e,"f")[t]=(r||[]).concat(e).filter((e=>!i[e]&&(i[e]=!0))),this}hide(e){return q("<string>",[e],arguments.length),Qe(this,je,"f").hiddenOptions.push(e),this}implies(e,t){return q("<string|object> [number|string|array]",[e,t],arguments.length),Qe(this,Je,"f").implies(e,t),this}locale(e){return q("[string]",[e],arguments.length),void 0===e?(this[at](),Qe(this,He,"f").y18n.getLocale()):(Ze(this,Fe,!1,"f"),Qe(this,He,"f").y18n.setLocale(e),this)}middleware(e,t,r){return Qe(this,Oe,"f").addMiddleware(e,!!t,r)}nargs(e,t){return q("<string|object|array> [number]",[e,t],arguments.length),this[dt](this.nargs.bind(this),"narg",e,t),this}normalize(e){return q("<array|string>",[e],arguments.length),this[ht]("normalize",e),this}number(e){return q("<array|string>",[e],arguments.length),this[ht]("number",e),this[jt](e),this}option(e,t){if(q("<string|object> [object]",[e,t],arguments.length),"object"==typeof e)Object.keys(e).forEach((t=>{this.options(t,e[t])}));else{"object"!=typeof t&&(t={}),this[jt](e),!Qe(this,Ke,"f")||"version"!==e&&"version"!==(null==t?void 0:t.alias)||this[rt](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join("\n"),void 0,"versionWarning"),Qe(this,je,"f").key[e]=!0,t.alias&&this.alias(e,t.alias);const r=t.deprecate||t.deprecated;r&&this.deprecateOption(e,r);const i=t.demand||t.required||t.require;i&&this.demand(e,i),t.demandOption&&this.demandOption(e,"string"==typeof t.demandOption?t.demandOption:void 0),t.conflicts&&this.conflicts(e,t.conflicts),"default"in t&&this.default(e,t.default),void 0!==t.implies&&this.implies(e,t.implies),void 0!==t.nargs&&this.nargs(e,t.nargs),t.config&&this.config(e,t.configParser),t.normalize&&this.normalize(e),t.choices&&this.choices(e,t.choices),t.coerce&&this.coerce(e,t.coerce),t.group&&this.group(e,t.group),(t.boolean||"boolean"===t.type)&&(this.boolean(e),t.alias&&this.boolean(t.alias)),(t.array||"array"===t.type)&&(this.array(e),t.alias&&this.array(t.alias)),(t.number||"number"===t.type)&&(this.number(e),t.alias&&this.number(t.alias)),(t.string||"string"===t.type)&&(this.string(e),t.alias&&this.string(t.alias)),(t.count||"count"===t.type)&&this.count(e),"boolean"==typeof t.global&&this.global(e,t.global),t.defaultDescription&&(Qe(this,je,"f").defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);const n=t.describe||t.description||t.desc,s=Qe(this,qe,"f").getDescriptions();Object.prototype.hasOwnProperty.call(s,e)&&"string"!=typeof n||this.describe(e,n),t.hidden&&this.hide(e),t.requiresArg&&this.requiresArg(e)}return this}options(e,t){return this.option(e,t)}parse(e,t,r){q("[string|array] [function|boolean|object] [function]",[e,t,r],arguments.length),this[it](),void 0===e&&(e=Qe(this,Ue,"f")),"object"==typeof t&&(Ze(this,$e,t,"f"),t=r),"function"==typeof t&&(Ze(this,Re,t,"f"),t=!1),t||Ze(this,Ue,e,"f"),Qe(this,Re,"f")&&Ze(this,Se,!1,"f");const i=this[Mt](e,!!t),n=this.parsed;return Qe(this,be,"f").setParsed(this.parsed),G(i)?i.then((e=>(Qe(this,Re,"f")&&Qe(this,Re,"f").call(this,Qe(this,Ee,"f"),e,Qe(this,ke,"f")),e))).catch((e=>{throw Qe(this,Re,"f")&&Qe(this,Re,"f")(e,this.parsed.argv,Qe(this,ke,"f")),e})).finally((()=>{this[Dt](),this.parsed=n})):(Qe(this,Re,"f")&&Qe(this,Re,"f").call(this,Qe(this,Ee,"f"),i,Qe(this,ke,"f")),this[Dt](),this.parsed=n,i)}parseAsync(e,t,r){const i=this.parse(e,t,r);return G(i)?i:Promise.resolve(i)}parseSync(e,t,r){const i=this.parse(e,t,r);if(G(i))throw new I(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return i}parserConfiguration(e){return q("<object>",[e],arguments.length),Ze(this,Pe,e,"f"),this}pkgConf(e,t){q("<string> [string]",[e,t],arguments.length);let r=null;const i=this[lt](t||Qe(this,De,"f"));return i[e]&&"object"==typeof i[e]&&(r=fe(i[e],t||Qe(this,De,"f"),this[st]()["deep-merge-config"]||!1,Qe(this,He,"f")),Qe(this,je,"f").configObjects=(Qe(this,je,"f").configObjects||[]).concat(r)),this}positional(e,t){q("<string> <object>",[e,t],arguments.length);const r=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];t=ie(t,((e,t)=>!("type"===e&&!["string","number","boolean"].includes(t))&&r.includes(e)));const i=Qe(this,ye,"f").fullCommands[Qe(this,ye,"f").fullCommands.length-1],n=i?Qe(this,ge,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return H(n).forEach((r=>{const i=n[r];Array.isArray(i)?-1!==i.indexOf(e)&&(t[r]=!0):i[e]&&!(r in t)&&(t[r]=i[e])})),this.group(e,Qe(this,qe,"f").getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return q("[boolean]",[e],arguments.length),Ze(this,We,e,"f"),this}required(e,t,r){return this.demand(e,t,r)}require(e,t,r){return this.demand(e,t,r)}requiresArg(e){return q("<array|string|object> [number]",[e],arguments.length),"string"==typeof e&&Qe(this,je,"f").narg[e]||this[dt](this.requiresArg.bind(this),"narg",e,NaN),this}showCompletionScript(e,t){return q("[string] [string]",[e,t],arguments.length),e=e||this.$0,Qe(this,Ie,"f").log(Qe(this,be,"f").generateCompletionScript(e,t||Qe(this,we,"f")||"completion")),this}showHelp(e){if(q("[string|function]",[e],arguments.length),Ze(this,Ae,!0,"f"),!Qe(this,qe,"f").hasCachedHelpMessage()){if(!this.parsed){const t=this[Mt](Qe(this,Ue,"f"),void 0,void 0,0,!0);if(G(t))return t.then((()=>{Qe(this,qe,"f").showHelp(e)})),this}const t=Qe(this,ge,"f").runDefaultBuilderOn(this);if(G(t))return t.then((()=>{Qe(this,qe,"f").showHelp(e)})),this}return Qe(this,qe,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return q("[boolean|string] [string]",[e,t],arguments.length),Qe(this,qe,"f").showHelpOnFail(e,t),this}showVersion(e){return q("[string|function]",[e],arguments.length),Qe(this,qe,"f").showVersion(e),this}skipValidation(e){return q("<array|string>",[e],arguments.length),this[ht]("skipValidation",e),this}strict(e){return q("[boolean]",[e],arguments.length),Ze(this,Ge,!1!==e,"f"),this}strictCommands(e){return q("[boolean]",[e],arguments.length),Ze(this,ze,!1!==e,"f"),this}strictOptions(e){return q("[boolean]",[e],arguments.length),Ze(this,Ve,!1!==e,"f"),this}string(e){return q("<array|string>",[e],arguments.length),this[ht]("string",e),this[jt](e),this}terminalWidth(){return q([],0),Qe(this,He,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return q("<object>",[e],arguments.length),Ze(this,Fe,!1,"f"),Qe(this,He,"f").y18n.updateLocale(e),this}usage(e,t,r,i){if(q("<string|null|undefined> [string|boolean] [function|object] [function]",[e,t,r,i],arguments.length),void 0!==t){if(U(e,null,Qe(this,He,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,t,r,i);throw new I(".usage() description must start with $0 if being used as alias for .command()")}return Qe(this,qe,"f").usage(e),this}usageConfiguration(e){return q("<object>",[e],arguments.length),Ze(this,Ye,e,"f"),this}version(e,t,r){const i="version";if(q("[boolean|string] [string] [string]",[e,t,r],arguments.length),Qe(this,Ke,"f")&&(this[tt](Qe(this,Ke,"f")),Qe(this,qe,"f").version(void 0),Ze(this,Ke,null,"f")),0===arguments.length)r=this[ut](),e=i;else if(1===arguments.length){if(!1===e)return this;r=e,e=i}else 2===arguments.length&&(r=t,t=void 0);return Ze(this,Ke,"string"==typeof e?e:i,"f"),t=t||Qe(this,qe,"f").deferY18nLookup("Show version number"),Qe(this,qe,"f").version(r||void 0),this.boolean(Qe(this,Ke,"f")),this.describe(Qe(this,Ke,"f"),t),this}wrap(e){return q("<number|null|undefined>",[e],arguments.length),Qe(this,qe,"f").wrap(e),this}[(ge=new WeakMap,De=new WeakMap,ye=new WeakMap,be=new WeakMap,we=new WeakMap,ve=new WeakMap,Ee=new WeakMap,Fe=new WeakMap,Ce=new WeakMap,Se=new WeakMap,xe=new WeakMap,Oe=new WeakMap,_e=new WeakMap,Ae=new WeakMap,Te=new WeakMap,Me=new WeakMap,Ie=new WeakMap,ke=new WeakMap,je=new WeakMap,Be=new WeakMap,Pe=new WeakMap,Re=new WeakMap,$e=new WeakMap,Ne=new WeakMap,Le=new WeakMap,Ue=new WeakMap,We=new WeakMap,He=new WeakMap,Ge=new WeakMap,ze=new WeakMap,Ve=new WeakMap,qe=new WeakMap,Ye=new WeakMap,Ke=new WeakMap,Je=new WeakMap,Xe)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch(e){}return e}[et](){return{log:(...e)=>{this[xt]()||console.log(...e),Ze(this,Ae,!0,"f"),Qe(this,ke,"f").length&&Ze(this,ke,Qe(this,ke,"f")+"\n","f"),Ze(this,ke,Qe(this,ke,"f")+e.join(" "),"f")},error:(...e)=>{this[xt]()||console.error(...e),Ze(this,Ae,!0,"f"),Qe(this,ke,"f").length&&Ze(this,ke,Qe(this,ke,"f")+"\n","f"),Ze(this,ke,Qe(this,ke,"f")+e.join(" "),"f")}}}[tt](e){H(Qe(this,je,"f")).forEach((t=>{if("configObjects"===t)return;const r=Qe(this,je,"f")[t];Array.isArray(r)?r.includes(e)&&r.splice(r.indexOf(e),1):"object"==typeof r&&delete r[e]})),delete Qe(this,qe,"f").getDescriptions()[e]}[rt](e,t,r){Qe(this,Ce,"f")[r]||(Qe(this,He,"f").process.emitWarning(e,t),Qe(this,Ce,"f")[r]=!0)}[it](){Qe(this,xe,"f").push({options:Qe(this,je,"f"),configObjects:Qe(this,je,"f").configObjects.slice(0),exitProcess:Qe(this,Se,"f"),groups:Qe(this,_e,"f"),strict:Qe(this,Ge,"f"),strictCommands:Qe(this,ze,"f"),strictOptions:Qe(this,Ve,"f"),completionCommand:Qe(this,we,"f"),output:Qe(this,ke,"f"),exitError:Qe(this,Ee,"f"),hasOutput:Qe(this,Ae,"f"),parsed:this.parsed,parseFn:Qe(this,Re,"f"),parseContext:Qe(this,$e,"f")}),Qe(this,qe,"f").freeze(),Qe(this,Je,"f").freeze(),Qe(this,ge,"f").freeze(),Qe(this,Oe,"f").freeze()}[nt](){let e,t="";return e=/\b(node|iojs|electron)(\.exe)?$/.test(Qe(this,He,"f").process.argv()[0])?Qe(this,He,"f").process.argv().slice(1,2):Qe(this,He,"f").process.argv().slice(0,1),t=e.map((e=>{const t=this[At](Qe(this,De,"f"),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e})).join(" ").trim(),Qe(this,He,"f").getEnv("_")&&Qe(this,He,"f").getProcessArgvBin()===Qe(this,He,"f").getEnv("_")&&(t=Qe(this,He,"f").getEnv("_").replace(`${Qe(this,He,"f").path.dirname(Qe(this,He,"f").process.execPath())}/`,"")),t}[st](){return Qe(this,Pe,"f")}[ot](){return Qe(this,Ye,"f")}[at](){if(!Qe(this,Fe,"f"))return;const e=Qe(this,He,"f").getEnv("LC_ALL")||Qe(this,He,"f").getEnv("LC_MESSAGES")||Qe(this,He,"f").getEnv("LANG")||Qe(this,He,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[ut](){return this[lt]().version||"unknown"}[ct](e){const t=e["--"]?e["--"]:e._;for(let e,r=0;void 0!==(e=t[r]);r++)Qe(this,He,"f").Parser.looksLikeNumber(e)&&Number.isSafeInteger(Math.floor(parseFloat(`${e}`)))&&(t[r]=Number(e));return e}[lt](e){const t=e||"*";if(Qe(this,Ne,"f")[t])return Qe(this,Ne,"f")[t];let r={};try{let t=e||Qe(this,He,"f").mainFilename;!e&&Qe(this,He,"f").path.extname(t)&&(t=Qe(this,He,"f").path.dirname(t));const i=Qe(this,He,"f").findUp(t,((e,t)=>t.includes("package.json")?"package.json":void 0));U(i,void 0,Qe(this,He,"f")),r=JSON.parse(Qe(this,He,"f").readFileSync(i,"utf8"))}catch(e){}return Qe(this,Ne,"f")[t]=r||{},Qe(this,Ne,"f")[t]}[ht](e,t){(t=[].concat(t)).forEach((t=>{t=this[mt](t),Qe(this,je,"f")[e].push(t)}))}[dt](e,t,r,i){this[ft](e,t,r,i,((e,t,r)=>{Qe(this,je,"f")[e][t]=r}))}[pt](e,t,r,i){this[ft](e,t,r,i,((e,t,r)=>{Qe(this,je,"f")[e][t]=(Qe(this,je,"f")[e][t]||[]).concat(r)}))}[ft](e,t,r,i,n){if(Array.isArray(r))r.forEach((t=>{e(t,i)}));else if((e=>"object"==typeof e)(r))for(const t of H(r))e(t,r[t]);else n(t,this[mt](r),i)}[mt](e){return"__proto__"===e?"___proto___":e}[gt](e,t){return this[dt](this[gt].bind(this),"key",e,t),this}[Dt](){var e,t,r,i,n,s,o,a,u,c,l,h;const d=Qe(this,xe,"f").pop();let p;U(d,void 0,Qe(this,He,"f")),e=this,t=this,r=this,i=this,n=this,s=this,o=this,a=this,u=this,c=this,l=this,h=this,({options:{set value(t){Ze(e,je,t,"f")}}.value,configObjects:p,exitProcess:{set value(e){Ze(t,Se,e,"f")}}.value,groups:{set value(e){Ze(r,_e,e,"f")}}.value,output:{set value(e){Ze(i,ke,e,"f")}}.value,exitError:{set value(e){Ze(n,Ee,e,"f")}}.value,hasOutput:{set value(e){Ze(s,Ae,e,"f")}}.value,parsed:this.parsed,strict:{set value(e){Ze(o,Ge,e,"f")}}.value,strictCommands:{set value(e){Ze(a,ze,e,"f")}}.value,strictOptions:{set value(e){Ze(u,Ve,e,"f")}}.value,completionCommand:{set value(e){Ze(c,we,e,"f")}}.value,parseFn:{set value(e){Ze(l,Re,e,"f")}}.value,parseContext:{set value(e){Ze(h,$e,e,"f")}}.value}=d),Qe(this,je,"f").configObjects=p,Qe(this,qe,"f").unfreeze(),Qe(this,Je,"f").unfreeze(),Qe(this,ge,"f").unfreeze(),Qe(this,Oe,"f").unfreeze()}[yt](e,t){return Q(t,(t=>(e(t),t)))}getInternalMethods(){return{getCommandInstance:this[bt].bind(this),getContext:this[wt].bind(this),getHasOutput:this[vt].bind(this),getLoggerInstance:this[Et].bind(this),getParseContext:this[Ft].bind(this),getParserConfiguration:this[st].bind(this),getUsageConfiguration:this[ot].bind(this),getUsageInstance:this[Ct].bind(this),getValidationInstance:this[St].bind(this),hasParseCallback:this[xt].bind(this),isGlobalContext:this[Ot].bind(this),postProcess:this[_t].bind(this),reset:this[Tt].bind(this),runValidation:this[It].bind(this),runYargsParserAndExecuteCommands:this[Mt].bind(this),setHasOutput:this[kt].bind(this)}}[bt](){return Qe(this,ge,"f")}[wt](){return Qe(this,ye,"f")}[vt](){return Qe(this,Ae,"f")}[Et](){return Qe(this,Ie,"f")}[Ft](){return Qe(this,$e,"f")||{}}[Ct](){return Qe(this,qe,"f")}[St](){return Qe(this,Je,"f")}[xt](){return!!Qe(this,Re,"f")}[Ot](){return Qe(this,Me,"f")}[_t](e,t,r,i){return r||G(e)||(t||(e=this[Xe](e)),(this[st]()["parse-positional-numbers"]||void 0===this[st]()["parse-positional-numbers"])&&(e=this[ct](e)),i&&(e=Z(e,this,Qe(this,Oe,"f").getMiddleware(),!1))),e}[Tt](e={}){Ze(this,je,Qe(this,je,"f")||{},"f");const t={};t.local=Qe(this,je,"f").local||[],t.configObjects=Qe(this,je,"f").configObjects||[];const r={};return t.local.forEach((t=>{r[t]=!0,(e[t]||[]).forEach((e=>{r[e]=!0}))})),Object.assign(Qe(this,Le,"f"),Object.keys(Qe(this,_e,"f")).reduce(((e,t)=>{const i=Qe(this,_e,"f")[t].filter((e=>!(e in r)));return i.length>0&&(e[t]=i),e}),{})),Ze(this,_e,{},"f"),["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"].forEach((e=>{t[e]=(Qe(this,je,"f")[e]||[]).filter((e=>!r[e]))})),["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"].forEach((e=>{t[e]=ie(Qe(this,je,"f")[e],(e=>!r[e]))})),t.envPrefix=Qe(this,je,"f").envPrefix,Ze(this,je,t,"f"),Ze(this,qe,Qe(this,qe,"f")?Qe(this,qe,"f").reset(r):function(e,t){const r=t.y18n.__,i={},n=[];i.failFn=function(e){n.push(e)};let s=null,o=null,a=!0;i.showHelpOnFail=function(t=!0,r){const[n,u]="string"==typeof t?[!0,t]:[t,r];return e.getInternalMethods().isGlobalContext()&&(o=u),s=u,a=n,i};let u=!1;i.fail=function(t,r){const c=e.getInternalMethods().getLoggerInstance();if(!n.length){if(e.getExitProcess()&&ne(!0),!u){u=!0,a&&(e.showHelp("error"),c.error()),(t||r)&&c.error(t||r);const i=s||o;i&&((t||r)&&c.error(""),c.error(i))}if(r=r||new I(t),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,r);throw r}for(let e=n.length-1;e>=0;--e){const s=n[e];if(se(s)){if(r)throw r;if(t)throw Error(t)}else s(t,r,i)}};let c=[],l=!1;i.usage=(e,t)=>null===e?(l=!0,c=[],i):(l=!1,c.push([e,t||""]),i),i.getUsage=()=>c,i.getUsageDisabled=()=>l,i.getPositionalGroupName=()=>r("Positionals:");let h=[];i.example=(e,t)=>{h.push([e,t||""])};let d=[];i.command=function(e,t,r,i,n=!1){r&&(d=d.map((e=>(e[2]=!1,e)))),d.push([e,t||"",r,i,n])},i.getCommands=()=>d;let p={};i.describe=function(e,t){Array.isArray(e)?e.forEach((e=>{i.describe(e,t)})):"object"==typeof e?Object.keys(e).forEach((t=>{i.describe(t,e[t])})):p[e]=t},i.getDescriptions=()=>p;let f=[];i.epilog=e=>{f.push(e)};let m,g=!1;i.wrap=e=>{g=!0,m=e},i.getWrap=()=>t.getEnv("YARGS_DISABLE_WRAP")?null:(g||(m=t.process.stdColumns?Math.min(80,t.process.stdColumns):80,g=!0),m);const D="__yargsString__:";function y(e,r,i){let n=0;return Array.isArray(e)||(e=Object.values(e).map((e=>[e]))),e.forEach((e=>{n=Math.max(t.stringWidth(i?`${i} ${ue(e[0])}`:ue(e[0]))+ae(e[0]),n)})),r&&(n=Math.min(n,parseInt((.5*r).toString(),10))),n}let b;function w(t){return e.getOptions().hiddenOptions.indexOf(t)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}function v(e,t){let i=`[${r("default:")} `;if(void 0===e&&!t)return null;if(t)i+=t;else switch(typeof e){case"string":i+=`"${e}"`;break;case"object":i+=JSON.stringify(e);break;default:i+=e}return`${i}]`}i.deferY18nLookup=e=>D+e,i.help=function(){if(b)return b;!function(){const t=e.getDemandedOptions(),r=e.getOptions();(Object.keys(r.alias)||[]).forEach((n=>{r.alias[n].forEach((s=>{p[s]&&i.describe(n,p[s]),s in t&&e.demandOption(n,t[s]),r.boolean.includes(s)&&e.boolean(n),r.count.includes(s)&&e.count(n),r.string.includes(s)&&e.string(n),r.normalize.includes(s)&&e.normalize(n),r.array.includes(s)&&e.array(n),r.number.includes(s)&&e.number(n)}))}))}();const n=e.customScriptName?e.$0:t.path.basename(e.$0),s=e.getDemandedOptions(),o=e.getDemandedCommands(),a=e.getDeprecatedOptions(),u=e.getGroups(),m=e.getOptions();let g=[];g=g.concat(Object.keys(p)),g=g.concat(Object.keys(s)),g=g.concat(Object.keys(o)),g=g.concat(Object.keys(m.default)),g=g.filter(w),g=Object.keys(g.reduce(((e,t)=>("_"!==t&&(e[t]=!0),e)),{}));const E=i.getWrap(),F=t.cliui({width:E,wrap:!!E});if(!l)if(c.length)c.forEach((e=>{F.div({text:`${e[0].replace(/\$0/g,n)}`}),e[1]&&F.div({text:`${e[1]}`,padding:[1,0,0,0]})})),F.div();else if(d.length){let e=null;e=o._?`${n} <${r("command")}>\n`:`${n} [${r("command")}]\n`,F.div(`${e}`)}if(d.length>1||1===d.length&&!d[0][2]){F.div(r("Commands:"));const t=e.getInternalMethods().getContext(),i=t.commands.length?`${t.commands.join(" ")} `:"";!0===e.getInternalMethods().getParserConfiguration()["sort-commands"]&&(d=d.sort(((e,t)=>e[0].localeCompare(t[0]))));const s=n?`${n} `:"";d.forEach((e=>{const t=`${s}${i}${e[0].replace(/^\$0 ?/,"")}`;F.span({text:t,padding:[0,2,0,2],width:y(d,E,`${n}${i}`)+4},{text:e[1]});const o=[];e[2]&&o.push(`[${r("default")}]`),e[3]&&e[3].length&&o.push(`[${r("aliases:")} ${e[3].join(", ")}]`),e[4]&&("string"==typeof e[4]?o.push(`[${r("deprecated: %s",e[4])}]`):o.push(`[${r("deprecated")}]`)),o.length?F.div({text:o.join(" "),padding:[0,0,0,2],align:"right"}):F.div()})),F.div()}const C=(Object.keys(m.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);g=g.filter((t=>!e.parsed.newAliases[t]&&C.every((e=>-1===(m.alias[e]||[]).indexOf(t)))));const S=r("Options:");u[S]||(u[S]=[]),function(e,t,r,i){let n=[],s=null;Object.keys(r).forEach((e=>{n=n.concat(r[e])})),e.forEach((e=>{s=[e].concat(t[e]),s.some((e=>-1!==n.indexOf(e)))||r[i].push(e)}))}(g,m.alias,u,S);const x=e=>/^--/.test(ue(e)),O=Object.keys(u).filter((e=>u[e].length>0)).map((e=>{const t=u[e].filter(w).map((e=>{if(C.includes(e))return e;for(let t,r=0;void 0!==(t=C[r]);r++)if((m.alias[t]||[]).includes(e))return t;return e}));return{groupName:e,normalizedKeys:t}})).filter((({normalizedKeys:e})=>e.length>0)).map((({groupName:e,normalizedKeys:t})=>{const r=t.reduce(((t,r)=>(t[r]=[r].concat(m.alias[r]||[]).map((t=>e===i.getPositionalGroupName()?t:(/^[0-9]$/.test(t)?m.boolean.includes(r)?"-":"--":t.length>1?"--":"-")+t)).sort(((e,t)=>x(e)===x(t)?0:x(e)?1:-1)).join(", "),t)),{});return{groupName:e,normalizedKeys:t,switches:r}}));if(O.filter((({groupName:e})=>e!==i.getPositionalGroupName())).some((({normalizedKeys:e,switches:t})=>!e.every((e=>x(t[e])))))&&O.filter((({groupName:e})=>e!==i.getPositionalGroupName())).forEach((({normalizedKeys:e,switches:t})=>{e.forEach((e=>{var r;x(t[e])&&(t[e]=oe(r=t[e])?{text:r.text,indentation:r.indentation+4}:{text:r,indentation:4})}))})),O.forEach((({groupName:t,normalizedKeys:n,switches:o})=>{F.div(t),n.forEach((t=>{const n=o[t];let u=p[t]||"",c=null;u.includes(D)&&(u=r(u.substring(16))),m.boolean.includes(t)&&(c=`[${r("boolean")}]`),m.count.includes(t)&&(c=`[${r("count")}]`),m.string.includes(t)&&(c=`[${r("string")}]`),m.normalize.includes(t)&&(c=`[${r("string")}]`),m.array.includes(t)&&(c=`[${r("array")}]`),m.number.includes(t)&&(c=`[${r("number")}]`);const l=[t in a?(h=a[t],"string"==typeof h?`[${r("deprecated: %s",h)}]`:`[${r("deprecated")}]`):null,c,t in s?`[${r("required")}]`:null,m.choices&&m.choices[t]?`[${r("choices:")} ${i.stringifiedValues(m.choices[t])}]`:null,v(m.default[t],m.defaultDescription[t])].filter(Boolean).join(" ");var h;F.span({text:ue(n),padding:[0,2,0,2+ae(n)],width:y(o,E)+4},u);const d=!0===e.getInternalMethods().getUsageConfiguration()["hide-types"];l&&!d?F.div({text:l,padding:[0,0,0,2],align:"right"}):F.div()})),F.div()})),h.length&&(F.div(r("Examples:")),h.forEach((e=>{e[0]=e[0].replace(/\$0/g,n)})),h.forEach((e=>{""===e[1]?F.div({text:e[0],padding:[0,2,0,2]}):F.div({text:e[0],padding:[0,2,0,2],width:y(h,E)+4},{text:e[1]})})),F.div()),f.length>0){const e=f.map((e=>e.replace(/\$0/g,n))).join("\n");F.div(`${e}\n`)}return F.toString().replace(/\s*$/,"")},i.cacheHelpMessage=function(){b=this.help()},i.clearCachedHelpMessage=function(){b=void 0},i.hasCachedHelpMessage=function(){return!!b},i.showHelp=t=>{const r=e.getInternalMethods().getLoggerInstance();t||(t="error"),("function"==typeof t?t:r[t])(i.help())},i.functionDescription=e=>["(",e.name?t.Parser.decamelize(e.name,"-"):r("generated-value"),")"].join(""),i.stringifiedValues=function(e,t){let r="";const i=t||", ",n=[].concat(e);return e&&n.length?(n.forEach((e=>{r.length&&(r+=i),r+=JSON.stringify(e)})),r):r};let E=null;i.version=e=>{E=e},i.showVersion=t=>{const r=e.getInternalMethods().getLoggerInstance();t||(t="error"),("function"==typeof t?t:r[t])(E)},i.reset=function(e){return s=null,u=!1,c=[],l=!1,f=[],h=[],d=[],p=ie(p,(t=>!e[t])),i};const F=[];return i.freeze=function(){F.push({failMessage:s,failureOutput:u,usages:c,usageDisabled:l,epilogs:f,examples:h,commands:d,descriptions:p})},i.unfreeze=function(e=!1){const t=F.pop();t&&(e?(p={...t.descriptions,...p},d=[...t.commands,...d],c=[...t.usages,...c],h=[...t.examples,...h],f=[...t.epilogs,...f]):({failMessage:s,failureOutput:u,usages:c,usageDisabled:l,epilogs:f,examples:h,commands:d,descriptions:p}=t))},i}(this,Qe(this,He,"f")),"f"),Ze(this,Je,Qe(this,Je,"f")?Qe(this,Je,"f").reset(r):function(e,t,r){const i=r.y18n.__,n=r.y18n.__n,s={nonOptionCount:function(r){const i=e.getDemandedCommands(),s=r._.length+(r["--"]?r["--"].length:0)-e.getInternalMethods().getContext().commands.length;i._&&(s<i._.min||s>i._.max)&&(s<i._.min?void 0!==i._.minMsg?t.fail(i._.minMsg?i._.minMsg.replace(/\$0/g,s.toString()).replace(/\$1/,i._.min.toString()):null):t.fail(n("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",s,s.toString(),i._.min.toString())):s>i._.max&&(void 0!==i._.maxMsg?t.fail(i._.maxMsg?i._.maxMsg.replace(/\$0/g,s.toString()).replace(/\$1/,i._.max.toString()):null):t.fail(n("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",s,s.toString(),i._.max.toString()))))},positionalCount:function(e,r){r<e&&t.fail(n("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",r,r+"",e+""))},requiredArguments:function(e,r){let i=null;for(const t of Object.keys(r))Object.prototype.hasOwnProperty.call(e,t)&&void 0!==e[t]||(i=i||{},i[t]=r[t]);if(i){const e=[];for(const t of Object.keys(i)){const r=i[t];r&&e.indexOf(r)<0&&e.push(r)}const r=e.length?`\n${e.join("\n")}`:"";t.fail(n("Missing required argument: %s","Missing required arguments: %s",Object.keys(i).length,Object.keys(i).join(", ")+r))}},unknownArguments:function(r,i,o,a,u=!0){var c;const l=e.getInternalMethods().getCommandInstance().getCommands(),h=[],d=e.getInternalMethods().getContext();if(Object.keys(r).forEach((t=>{he.includes(t)||Object.prototype.hasOwnProperty.call(o,t)||Object.prototype.hasOwnProperty.call(e.getInternalMethods().getParseContext(),t)||s.isValidAndSomeAliasIsNotNew(t,i)||h.push(t)})),u&&(d.commands.length>0||l.length>0||a)&&r._.slice(d.commands.length).forEach((e=>{l.includes(""+e)||h.push(""+e)})),u){const t=(null===(c=e.getDemandedCommands()._)||void 0===c?void 0:c.max)||0,i=d.commands.length+t;i<r._.length&&r._.slice(i).forEach((e=>{e=String(e),d.commands.includes(e)||h.includes(e)||h.push(e)}))}h.length&&t.fail(n("Unknown argument: %s","Unknown arguments: %s",h.length,h.map((e=>e.trim()?e:`"${e}"`)).join(", ")))},unknownCommands:function(r){const i=e.getInternalMethods().getCommandInstance().getCommands(),s=[],o=e.getInternalMethods().getContext();return(o.commands.length>0||i.length>0)&&r._.slice(o.commands.length).forEach((e=>{i.includes(""+e)||s.push(""+e)})),s.length>0&&(t.fail(n("Unknown command: %s","Unknown commands: %s",s.length,s.join(", "))),!0)},isValidAndSomeAliasIsNotNew:function(t,r){if(!Object.prototype.hasOwnProperty.call(r,t))return!1;const i=e.parsed.newAliases;return[t,...r[t]].some((e=>!Object.prototype.hasOwnProperty.call(i,e)||!i[t]))},limitedChoices:function(r){const n=e.getOptions(),s={};if(!Object.keys(n.choices).length)return;Object.keys(r).forEach((e=>{-1===he.indexOf(e)&&Object.prototype.hasOwnProperty.call(n.choices,e)&&[].concat(r[e]).forEach((t=>{-1===n.choices[e].indexOf(t)&&void 0!==t&&(s[e]=(s[e]||[]).concat(t))}))}));const o=Object.keys(s);if(!o.length)return;let a=i("Invalid values:");o.forEach((e=>{a+=`\n ${i("Argument: %s, Given: %s, Choices: %s",e,t.stringifiedValues(s[e]),t.stringifiedValues(n.choices[e]))}`})),t.fail(a)}};let o={};function a(e,t){const r=Number(t);return"number"==typeof(t=isNaN(r)?t:r)?t=e._.length>=t:t.match(/^--no-.+/)?(t=t.match(/^--no-(.+)/)[1],t=!Object.prototype.hasOwnProperty.call(e,t)):t=Object.prototype.hasOwnProperty.call(e,t),t}s.implies=function(t,i){q("<string|object> [array|number|string]",[t,i],arguments.length),"object"==typeof t?Object.keys(t).forEach((e=>{s.implies(e,t[e])})):(e.global(t),o[t]||(o[t]=[]),Array.isArray(i)?i.forEach((e=>s.implies(t,e))):(U(i,void 0,r),o[t].push(i)))},s.getImplied=function(){return o},s.implications=function(e){const r=[];if(Object.keys(o).forEach((t=>{const i=t;(o[t]||[]).forEach((t=>{let n=i;const s=t;n=a(e,n),t=a(e,t),n&&!t&&r.push(` ${i} -> ${s}`)}))})),r.length){let e=`${i("Implications failed:")}\n`;r.forEach((t=>{e+=t})),t.fail(e)}};let u={};s.conflicts=function(t,r){q("<string|object> [array|string]",[t,r],arguments.length),"object"==typeof t?Object.keys(t).forEach((e=>{s.conflicts(e,t[e])})):(e.global(t),u[t]||(u[t]=[]),Array.isArray(r)?r.forEach((e=>s.conflicts(t,e))):u[t].push(r))},s.getConflicting=()=>u,s.conflicting=function(n){Object.keys(n).forEach((e=>{u[e]&&u[e].forEach((r=>{r&&void 0!==n[e]&&void 0!==n[r]&&t.fail(i("Arguments %s and %s are mutually exclusive",e,r))}))})),e.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(u).forEach((e=>{u[e].forEach((s=>{s&&void 0!==n[r.Parser.camelCase(e)]&&void 0!==n[r.Parser.camelCase(s)]&&t.fail(i("Arguments %s and %s are mutually exclusive",e,s))}))}))},s.recommendCommands=function(e,r){r=r.sort(((e,t)=>t.length-e.length));let n=null,s=1/0;for(let t,i=0;void 0!==(t=r[i]);i++){const r=le(e,t);r<=3&&r<s&&(s=r,n=t)}n&&t.fail(i("Did you mean %s?",n))},s.reset=function(e){return o=ie(o,(t=>!e[t])),u=ie(u,(t=>!e[t])),s};const c=[];return s.freeze=function(){c.push({implied:o,conflicting:u})},s.unfreeze=function(){const e=c.pop();U(e,void 0,r),({implied:o,conflicting:u}=e)},s}(this,Qe(this,qe,"f"),Qe(this,He,"f")),"f"),Ze(this,ge,Qe(this,ge,"f")?Qe(this,ge,"f").reset():function(e,t,r,i){return new ee(e,t,r,i)}(Qe(this,qe,"f"),Qe(this,Je,"f"),Qe(this,Oe,"f"),Qe(this,He,"f")),"f"),Qe(this,be,"f")||Ze(this,be,function(e,t,r,i){return new ce(e,t,r,i)}(this,Qe(this,qe,"f"),Qe(this,ge,"f"),Qe(this,He,"f")),"f"),Qe(this,Oe,"f").reset(),Ze(this,we,null,"f"),Ze(this,ke,"","f"),Ze(this,Ee,null,"f"),Ze(this,Ae,!1,"f"),this.parsed=!1,this}[At](e,t){return Qe(this,He,"f").path.relative(e,t)}[Mt](e,t,r,i=0,n=!1){let s=!!r||n;e=e||Qe(this,Ue,"f"),Qe(this,je,"f").__=Qe(this,He,"f").y18n.__,Qe(this,je,"f").configuration=this[st]();const o=!!Qe(this,je,"f").configuration["populate--"],a=Object.assign({},Qe(this,je,"f").configuration,{"populate--":!0}),u=Qe(this,He,"f").Parser.detailed(e,Object.assign({},Qe(this,je,"f"),{configuration:{"parse-positional-numbers":!1,...a}})),c=Object.assign(u.argv,Qe(this,$e,"f"));let l;const h=u.aliases;let d=!1,p=!1;Object.keys(c).forEach((e=>{e===Qe(this,Te,"f")&&c[e]?d=!0:e===Qe(this,Ke,"f")&&c[e]&&(p=!0)})),c.$0=this.$0,this.parsed=u,0===i&&Qe(this,qe,"f").clearCachedHelpMessage();try{if(this[at](),t)return this[_t](c,o,!!r,!1);Qe(this,Te,"f")&&[Qe(this,Te,"f")].concat(h[Qe(this,Te,"f")]||[]).filter((e=>e.length>1)).includes(""+c._[c._.length-1])&&(c._.pop(),d=!0),Ze(this,Me,!1,"f");const a=Qe(this,ge,"f").getCommands(),f=Qe(this,be,"f").completionKey in c,m=d||f||n;if(c._.length){if(a.length){let e;for(let t,s=i||0;void 0!==c._[s];s++){if(t=String(c._[s]),a.includes(t)&&t!==Qe(this,we,"f")){const e=Qe(this,ge,"f").runCommand(t,this,u,s+1,n,d||p||n);return this[_t](e,o,!!r,!1)}if(!e&&t!==Qe(this,we,"f")){e=t;break}}!Qe(this,ge,"f").hasDefaultCommand()&&Qe(this,We,"f")&&e&&!m&&Qe(this,Je,"f").recommendCommands(e,a)}Qe(this,we,"f")&&c._.includes(Qe(this,we,"f"))&&!f&&(Qe(this,Se,"f")&&ne(!0),this.showCompletionScript(),this.exit(0))}if(Qe(this,ge,"f").hasDefaultCommand()&&!m){const e=Qe(this,ge,"f").runCommand(null,this,u,0,n,d||p||n);return this[_t](e,o,!!r,!1)}if(f){Qe(this,Se,"f")&&ne(!0);const t=(e=[].concat(e)).slice(e.indexOf(`--${Qe(this,be,"f").completionKey}`)+1);return Qe(this,be,"f").getCompletion(t,((e,t)=>{if(e)throw new I(e.message);(t||[]).forEach((e=>{Qe(this,Ie,"f").log(e)})),this.exit(0)})),this[_t](c,!o,!!r,!1)}if(Qe(this,Ae,"f")||(d?(Qe(this,Se,"f")&&ne(!0),s=!0,this.showHelp("log"),this.exit(0)):p&&(Qe(this,Se,"f")&&ne(!0),s=!0,Qe(this,qe,"f").showVersion("log"),this.exit(0))),!s&&Qe(this,je,"f").skipValidation.length>0&&(s=Object.keys(c).some((e=>Qe(this,je,"f").skipValidation.indexOf(e)>=0&&!0===c[e]))),!s){if(u.error)throw new I(u.error.message);if(!f){const e=this[It](h,{},u.error);r||(l=Z(c,this,Qe(this,Oe,"f").getMiddleware(),!0)),l=this[yt](e,null!=l?l:c),G(l)&&!r&&(l=l.then((()=>Z(c,this,Qe(this,Oe,"f").getMiddleware(),!1))))}}}catch(e){if(!(e instanceof I))throw e;Qe(this,qe,"f").fail(e.message,e)}return this[_t](null!=l?l:c,o,!!r,!0)}[It](e,t,r,i){const n={...this.getDemandedOptions()};return s=>{if(r)throw new I(r.message);Qe(this,Je,"f").nonOptionCount(s),Qe(this,Je,"f").requiredArguments(s,n);let o=!1;Qe(this,ze,"f")&&(o=Qe(this,Je,"f").unknownCommands(s)),Qe(this,Ge,"f")&&!o?Qe(this,Je,"f").unknownArguments(s,e,t,!!i):Qe(this,Ve,"f")&&Qe(this,Je,"f").unknownArguments(s,e,{},!1,!1),Qe(this,Je,"f").limitedChoices(s),Qe(this,Je,"f").implications(s),Qe(this,Je,"f").conflicting(s)}}[kt](){Ze(this,Ae,!0,"f")}[jt](e){if("string"==typeof e)Qe(this,je,"f").key[e]=!0;else for(const t of e)Qe(this,je,"f").key[t]=!0}}const Pt=(Rt=N,(e=[],t=Rt.process.cwd(),r)=>{const i=new Bt(e,t,r,Rt);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i});var Rt;const $t=Pt;function Nt(e,t){const r=e.startsWith(".")?(0,f.join)(t,e):e;return import(r)}var Lt=i(8981);const Ut=e(import.meta.url)("node:module"),Wt=e(import.meta.url)("node:path"),Ht=e(import.meta.url)("node:url"),Gt=(e=0)=>t=>`\x1b[${t+e}m`,zt=(e=0)=>t=>`\x1b[${38+e};5;${t}m`,Vt=(e=0)=>(t,r,i)=>`\x1b[${38+e};2;${t};${r};${i}m`,qt={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(qt.modifier),Object.keys(qt.color),Object.keys(qt.bgColor);const Yt=function(){const e=new Map;for(const[t,r]of Object.entries(qt)){for(const[t,i]of Object.entries(r))qt[t]={open:`\x1b[${i[0]}m`,close:`\x1b[${i[1]}m`},r[t]=qt[t],e.set(i[0],i[1]);Object.defineProperty(qt,t,{value:r,enumerable:!1})}return Object.defineProperty(qt,"codes",{value:e,enumerable:!1}),qt.color.close="\x1b[39m",qt.bgColor.close="\x1b[49m",qt.color.ansi=Gt(),qt.color.ansi256=zt(),qt.color.ansi16m=Vt(),qt.bgColor.ansi=Gt(10),qt.bgColor.ansi256=zt(10),qt.bgColor.ansi16m=Vt(10),Object.defineProperties(qt,{rgbToAnsi256:{value:(e,t,r)=>e===t&&t===r?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(r/255*5),enumerable:!1},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[r]=t;3===r.length&&(r=[...r].map((e=>e+e)).join(""));const i=Number.parseInt(r,16);return[i>>16&255,i>>8&255,255&i]},enumerable:!1},hexToAnsi256:{value:e=>qt.rgbToAnsi256(...qt.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return e-8+90;let t,r,i;if(e>=232)t=(10*(e-232)+8)/255,r=t,i=t;else{const n=(e-=16)%36;t=Math.floor(e/36)/5,r=Math.floor(n/6)/5,i=n%6/5}const n=2*Math.max(t,r,i);if(0===n)return 30;let s=30+(Math.round(i)<<2|Math.round(r)<<1|Math.round(t));return 2===n&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,t,r)=>qt.ansi256ToAnsi(qt.rgbToAnsi256(e,t,r)),enumerable:!1},hexToAnsi:{value:e=>qt.ansi256ToAnsi(qt.hexToAnsi256(e)),enumerable:!1}}),qt}(),Kt=Yt,Jt=e(import.meta.url)("node:process"),Zt=e(import.meta.url)("node:os"),Qt=e(import.meta.url)("node:tty");function Xt(e,t=(globalThis.Deno?globalThis.Deno.args:Jt.argv)){const r=e.startsWith("-")?"":1===e.length?"-":"--",i=t.indexOf(r+e),n=t.indexOf("--");return-1!==i&&(-1===n||i<n)}const{env:er}=Jt;let tr;function rr(e,t={}){return 0!==(r=function(e,{streamIsTTY:t,sniffFlags:r=!0}={}){const i=function(){if("FORCE_COLOR"in er)return"true"===er.FORCE_COLOR?1:"false"===er.FORCE_COLOR?0:0===er.FORCE_COLOR.length?1:Math.min(Number.parseInt(er.FORCE_COLOR,10),3)}();void 0!==i&&(tr=i);const n=r?tr:i;if(0===n)return 0;if(r){if(Xt("color=16m")||Xt("color=full")||Xt("color=truecolor"))return 3;if(Xt("color=256"))return 2}if("TF_BUILD"in er&&"AGENT_NAME"in er)return 1;if(e&&!t&&void 0===n)return 0;const s=n||0;if("dumb"===er.TERM)return s;if("win32"===Jt.platform){const e=Zt.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in er)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((e=>e in er))?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((e=>e in er))||"codeship"===er.CI_NAME?1:s;if("TEAMCITY_VERSION"in er)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(er.TEAMCITY_VERSION)?1:0;if("truecolor"===er.COLORTERM)return 3;if("xterm-kitty"===er.TERM)return 3;if("TERM_PROGRAM"in er){const e=Number.parseInt((er.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(er.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(er.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(er.TERM)||"COLORTERM"in er?1:s}(e,{streamIsTTY:e&&e.isTTY,...t}))&&{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3};var r}Xt("no-color")||Xt("no-colors")||Xt("color=false")||Xt("color=never")?tr=0:(Xt("color")||Xt("colors")||Xt("color=true")||Xt("color=always"))&&(tr=1);const ir={stdout:rr({isTTY:Qt.isatty(1)}),stderr:rr({isTTY:Qt.isatty(2)})};function nr(e,t,r){let i=e.indexOf(t);if(-1===i)return e;const n=t.length;let s=0,o="";do{o+=e.slice(s,i)+t+r,s=i+n,i=e.indexOf(t,s)}while(-1!==i);return o+=e.slice(s),o}const{stdout:sr,stderr:or}=ir,ar=Symbol("GENERATOR"),ur=Symbol("STYLER"),cr=Symbol("IS_EMPTY"),lr=["ansi","ansi","ansi256","ansi16m"],hr=Object.create(null);function dr(e){return(e=>{const t=(...e)=>e.join(" ");return((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");const r=sr?sr.level:0;e.level=void 0===t.level?r:t.level})(t,e),Object.setPrototypeOf(t,dr.prototype),t})(e)}Object.setPrototypeOf(dr.prototype,Function.prototype);for(const[e,t]of Object.entries(Kt))hr[e]={get(){const r=Dr(this,gr(t.open,t.close,this[ur]),this[cr]);return Object.defineProperty(this,e,{value:r}),r}};hr.visible={get(){const e=Dr(this,this[ur],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const pr=(e,t,r,...i)=>"rgb"===e?"ansi16m"===t?Kt[r].ansi16m(...i):"ansi256"===t?Kt[r].ansi256(Kt.rgbToAnsi256(...i)):Kt[r].ansi(Kt.rgbToAnsi(...i)):"hex"===e?pr("rgb",t,r,...Kt.hexToRgb(...i)):Kt[r][e](...i),fr=["rgb","hex","ansi256"];for(const e of fr)hr[e]={get(){const{level:t}=this;return function(...r){const i=gr(pr(e,lr[t],"color",...r),Kt.color.close,this[ur]);return Dr(this,i,this[cr])}}},hr["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const i=gr(pr(e,lr[t],"bgColor",...r),Kt.bgColor.close,this[ur]);return Dr(this,i,this[cr])}}};const mr=Object.defineProperties((()=>{}),{...hr,level:{enumerable:!0,get(){return this[ar].level},set(e){this[ar].level=e}}}),gr=(e,t,r)=>{let i,n;return void 0===r?(i=e,n=t):(i=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:i,closeAll:n,parent:r}},Dr=(e,t,r)=>{const i=(...e)=>yr(i,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(i,mr),i[ar]=e,i[ur]=t,i[cr]=r,i},yr=(e,t)=>{if(e.level<=0||!t)return e[cr]?"":t;let r=e[ur];if(void 0===r)return t;const{openAll:i,closeAll:n}=r;if(t.includes("\x1b"))for(;void 0!==r;)t=nr(t,r.close,r.open),r=r.parent;const s=t.indexOf("\n");return-1!==s&&(t=function(e,t,r,i){let n=0,s="";do{const o="\r"===e[i-1];s+=e.slice(n,o?i-1:i)+t+(o?"\r\n":"\n")+r,n=i+1,i=e.indexOf("\n",n)}while(-1!==i);return s+=e.slice(n),s}(t,n,i,s)),i+t+n};Object.defineProperties(dr.prototype,hr);const br=dr(),wr=(dr({level:or?or.level:0}),br),vr=(0,Ut.createRequire)(`${process.cwd()}/`);function Er(e){return e.startsWith("file:")?(0,Ht.fileURLToPath)(e):e}function Fr(e,t=process.cwd()){if(e.startsWith("~"))return vr.resolve(e.replace(/^~/,""));const r=Er(e);if((0,Wt.isAbsolute)(r))return r;const i=Er(t);return(0,Wt.resolve)(i,r)}class Cr{constructor(){this.action=Promise.resolve()}onDone(e=e=>e){return this.action=this.action.then((e=>(this.temp=e,e))).then(e),this}onFail(e=()=>this.temp){return this.action=this.action.then((e=>(this.temp=e,e))).catch(e),this}then(e){return this.action.then(e)}catch(e){return this.action.catch(e)}finally(e){return this.action.finally(e)}}const Sr=new class{okay(...e){console.log(wr.green("\u2714"),...e)}fail(...e){console.log(wr.red("\u2718"),...e)}};function xr({read:e,write:t}){return class extends Cr{constructor(e){super(),e&&(this.root=e)}config(e){return void 0!==e&&(this.option=e),this}source(t,r=this.root){if(!t)throw new Error("path cannot be empty");return this.action=this.action.then((()=>{this.source=Fr(t,r)})).then((()=>e(this.source))),this}output(e,r=this.root){return this.action=this.action.then((i=>{const n=Fr(void 0===e?this.source:e,r);if(!n)throw new Error("path cannot be empty");return this.source=n,t(n,i,this.option).then((()=>i))})),this}logger(...e){if(0===e.length)throw new Error("message cannot be empty");return this.action=this.action.then((t=>(Sr.okay(...e),t)),(t=>{throw Sr.fail(...e),t})),this}}}const{readFile:Or,readJson:_r,outputFile:Ar,outputJson:Tr}=Lt,Mr={spaces:2,replacer:null};function Ir(e){return Or(e,{encoding:"utf8"})}function kr(e,t){return Ar(e,t,{encoding:"utf8"})}function jr(e,t,{pretty:r=!1}={}){return Tr(e,t,r?Mr:void 0)}const Br=xr({read:Ir,write:kr}),Pr=xr({read:_r,write:jr}),{cyan:Rr,red:$r,green:Nr}=(xr({read:Ir,write:jr}),xr({read:_r,write:kr}),wr);function Lr(){return(new Br).onDone((()=>"# Created by nice-move\nroot = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_size = 2\nindent_style = space\ninsert_final_newline = true\nmax_line_length = 80\nquote_type = single\ntab_width = 2\ntrim_trailing_whitespace = true\n")).output(".editorconfig").logger("Create/Overwrite",Rr(".editorconfig")).catch(console.warn)}const Ur=(e,t,r,i)=>{if("length"===r||"prototype"===r)return;if("arguments"===r||"caller"===r)return;const n=Object.getOwnPropertyDescriptor(e,r),s=Object.getOwnPropertyDescriptor(t,r);!Wr(n,s)&&i||Object.defineProperty(e,r,s)},Wr=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Hr=(e,t)=>`/* Wrapped ${e}*/\n${t}`,Gr=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),zr=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");const Vr=new WeakMap,qr=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let r,i=0;const n=e.displayName||e.name||"<anonymous>",s=function(...o){if(Vr.set(s,++i),1===i)r=e.apply(this,o),e=void 0;else if(!0===t.throw)throw new Error(`Function \`${n}\` can only be called once`);return r};return function(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:i}=e;for(const i of Reflect.ownKeys(t))Ur(e,t,i,r);((e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)})(e,t),((e,t,r)=>{const i=""===r?"":`with ${r.trim()}() `,n=Hr.bind(null,i,t.toString());Object.defineProperty(n,"name",zr);const{writable:s,enumerable:o,configurable:a}=Gr;Object.defineProperty(e,"toString",{value:n,writable:s,enumerable:o,configurable:a})})(e,t,i)}(s,e),Vr.set(s,i),s};qr.callCount=e=>{if(!Vr.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Vr.get(e)};const Yr=qr,Kr=[];Kr.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Kr.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Kr.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Jr=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,Zr=Symbol.for("signal-exit emitter"),Qr=globalThis,Xr=Object.defineProperty.bind(Object);class ei{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Qr[Zr])return Qr[Zr];Xr(Qr,Zr,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],i=r.indexOf(t);-1!==i&&(0===i&&1===r.length?r.length=0:r.splice(i,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let i=!1;for(const n of this.listeners[e])i=!0===n(t,r)||i;return"exit"===e&&(i=this.emit("afterExit",t,r)||i),i}}class ti{}const ri=globalThis.process,{onExit:ii,load:ni,unload:si}=(oi=Jr(ri)?new class extends ti{#e="win32"===ri.platform?"SIGINT":"SIGHUP";#t=new ei;#r;#i;#n;#s={};#o=!1;constructor(e){super(),this.#r=e,this.#s={};for(const t of Kr)this.#s[t]=()=>{const r=this.#r.listeners(t);let{count:i}=this.#t;const n=e;if("object"==typeof n.__signal_exit_emitter__&&"number"==typeof n.__signal_exit_emitter__.count&&(i+=n.__signal_exit_emitter__.count),r.length===i){this.unload();const r=this.#t.emit("exit",null,t),i="SIGHUP"===t?this.#e:t;r||e.kill(e.pid,i)}};this.#n=e.reallyExit,this.#i=e.emit}onExit(e,t){if(!Jr(this.#r))return()=>{};!1===this.#o&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#t.on(r,e),()=>{this.#t.removeListener(r,e),0===this.#t.listeners.exit.length&&0===this.#t.listeners.afterExit.length&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(const e of Kr)try{const t=this.#s[e];t&&this.#r.on(e,t)}catch(e){}this.#r.emit=(e,...t)=>this.#a(e,...t),this.#r.reallyExit=e=>this.#u(e)}}unload(){this.#o&&(this.#o=!1,Kr.forEach((e=>{const t=this.#s[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#r.removeListener(e,t)}catch(e){}})),this.#r.emit=this.#i,this.#r.reallyExit=this.#n,this.#t.count-=1)}#u(e){return Jr(this.#r)?(this.#r.exitCode=e||0,this.#t.emit("exit",this.#r.exitCode,null),this.#n.call(this.#r,this.#r.exitCode)):0}#a(e,...t){const r=this.#i;if("exit"===e&&Jr(this.#r)){"number"==typeof t[0]&&(this.#r.exitCode=t[0]);const i=r.call(this.#r,e,...t);return this.#t.emit("exit",this.#r.exitCode,null),i}return r.call(this.#r,e,...t)}}(ri):new class extends ti{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>oi.onExit(e,t),load:()=>oi.load(),unload:()=>oi.unload()});var oi;const ai=Jt.stderr.isTTY?Jt.stderr:Jt.stdout.isTTY?Jt.stdout:void 0,ui=ai?Yr((()=>{ii((()=>{ai.write("\x1b[?25h")}),{alwaysLast:!0})})):()=>{};let ci=!1;const li={show:(e=Jt.stderr)=>{e.isTTY&&(ci=!1,e.write("\x1b[?25h"))},hide:(e=Jt.stderr)=>{e.isTTY&&(ui(),ci=!0,e.write("\x1b[?25l"))},toggle:(e,t)=>{void 0!==e&&(ci=e),ci?li.show(t):li.hide(t)}},hi=li;var di=i(1473);const pi={info:wr.blue("\u2139"),success:wr.green("\u2714"),warning:wr.yellow("\u26a0"),error:wr.red("\u2716")},fi={info:wr.blue("i"),success:wr.green("\u221a"),warning:wr.yellow("\u203c"),error:wr.red("\xd7")},mi=("win32"!==Jt.platform?"linux"!==Jt.env.TERM:Boolean(Jt.env.CI)||Boolean(Jt.env.WT_SESSION)||Boolean(Jt.env.TERMINUS_SUBLIME)||"{cmd::Cmder}"===Jt.env.ConEmuTask||"Terminus-Sublime"===Jt.env.TERM_PROGRAM||"vscode"===Jt.env.TERM_PROGRAM||"xterm-256color"===Jt.env.TERM||"alacritty"===Jt.env.TERM||"JetBrains-JediTerm"===Jt.env.TERMINAL_EMULATOR)?pi:fi,gi=function({onlyFirst:e=!1}={}){const 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")}();function Di(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(gi,"")}function yi(e,{ambiguousAsWide:t=!1}={}){return function(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}(e),12288===(r=e)||r>=65281&&r<=65376||r>=65504&&r<=65510||function(e){return e>=4352&&e<=4447||8986===e||8987===e||9001===e||9002===e||e>=9193&&e<=9196||9200===e||9203===e||9725===e||9726===e||9748===e||9749===e||e>=9776&&e<=9783||e>=9800&&e<=9811||9855===e||e>=9866&&e<=9871||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||e>=10067&&e<=10069||10071===e||e>=10133&&e<=10135||10160===e||10175===e||11035===e||11036===e||11088===e||11093===e||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||94192===e||94193===e||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||110589===e||110590===e||e>=110592&&e<=110882||110898===e||e>=110928&&e<=110930||110933===e||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||126980===e||127183===e||127374===e||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||127568===e||127569===e||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||127988===e||e>=127992&&e<=128062||128064===e||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||128378===e||128405===e||128406===e||128420===e||e>=128507&&e<=128591||e>=128640&&e<=128709||128716===e||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||128747===e||128748===e||e>=128756&&e<=128764||e>=128992&&e<=129003||129008===e||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}(e)||t&&function(e){return 161===e||164===e||167===e||168===e||170===e||173===e||174===e||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||198===e||208===e||215===e||216===e||e>=222&&e<=225||230===e||e>=232&&e<=234||236===e||237===e||240===e||242===e||243===e||e>=247&&e<=250||252===e||254===e||257===e||273===e||275===e||283===e||294===e||295===e||299===e||e>=305&&e<=307||312===e||e>=319&&e<=322||324===e||e>=328&&e<=331||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||e>=713&&e<=715||717===e||720===e||e>=728&&e<=731||733===e||735===e||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||1025===e||e>=1040&&e<=1103||1105===e||8208===e||e>=8211&&e<=8214||8216===e||8217===e||8220===e||8221===e||e>=8224&&e<=8226||e>=8228&&e<=8231||8240===e||8242===e||8243===e||8245===e||8251===e||8254===e||8308===e||8319===e||e>=8321&&e<=8324||8364===e||8451===e||8453===e||8457===e||8467===e||8470===e||8481===e||8482===e||8486===e||8491===e||8531===e||8532===e||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||8585===e||e>=8592&&e<=8601||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||e>=8733&&e<=8736||8739===e||8741===e||e>=8743&&e<=8748||8750===e||e>=8756&&e<=8759||8764===e||8765===e||8776===e||8780===e||8786===e||8800===e||8801===e||e>=8804&&e<=8807||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||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||9632===e||9633===e||e>=9635&&e<=9641||9650===e||9651===e||9654===e||9655===e||9660===e||9661===e||9664===e||9665===e||e>=9670&&e<=9672||9675===e||e>=9678&&e<=9681||e>=9698&&e<=9701||9711===e||9733===e||9734===e||9737===e||9742===e||9743===e||9756===e||9758===e||9792===e||9794===e||9824===e||9825===e||e>=9827&&e<=9829||e>=9831&&e<=9834||9836===e||9837===e||9839===e||9886===e||9887===e||9919===e||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||9955===e||9960===e||9961===e||e>=9963&&e<=9969||9972===e||e>=9974&&e<=9977||9979===e||9980===e||9982===e||9983===e||10045===e||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||65533===e||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||127375===e||127376===e||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}(e)?2:1;var r}const bi=new Intl.Segmenter,wi=/^\p{Default_Ignorable_Code_Point}$/u;function vi(e,t={}){if("string"!=typeof e||0===e.length)return 0;const{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:i=!1}=t;if(i||(e=Di(e)),0===e.length)return 0;let n=0;const s={ambiguousAsWide:!r};for(const{segment:t}of bi.segment(e)){const e=t.codePointAt(0);e<=31||e>=127&&e<=159||e>=8203&&e<=8207||65279===e||e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071||e>=55296&&e<=57343||e>=65024&&e<=65039||wi.test(t)||(/[#*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\uDC70\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-\uDED7\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\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\uDD3D\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-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\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]|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\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.test(t)?n+=2:n+=yi(e,s))}return n}function Ei(){const{env:e}=Jt,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==Jt.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}const Fi=new class{#c=0;start(){this.#c++,1===this.#c&&this.#l()}stop(){if(this.#c<=0)throw new Error("`stop` called more times than `start`");this.#c--,0===this.#c&&this.#h()}#l(){"win32"!==Jt.platform&&Jt.stdin.isTTY&&(Jt.stdin.setRawMode(!0),Jt.stdin.on("data",this.#d),Jt.stdin.resume())}#h(){Jt.stdin.isTTY&&(Jt.stdin.off("data",this.#d),Jt.stdin.pause(),Jt.stdin.setRawMode(!1))}#d(e){3===e[0]&&Jt.emit("SIGINT")}};class Ci{#p=0;#f=!1;#m=0;#g=-1;#D=0;#y;#b;#w;#v;#E;#F;#C;#S;#x;#O;#_;color;constructor(e){"string"==typeof e&&(e={text:e}),this.#y={color:"cyan",stream:Jt.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#y.color,this.spinner=this.#y.spinner,this.#E=this.#y.interval,this.#w=this.#y.stream,this.#F="boolean"==typeof this.#y.isEnabled?this.#y.isEnabled:function({stream:e=process.stdout}={}){return Boolean(e&&e.isTTY&&"dumb"!==process.env.TERM&&!("CI"in process.env))}({stream:this.#w}),this.#C="boolean"==typeof this.#y.isSilent&&this.#y.isSilent,this.text=this.#y.text,this.prefixText=this.#y.prefixText,this.suffixText=this.#y.suffixText,this.indent=this.#y.indent,"test"===Jt.env.NODE_ENV&&(this._stream=this.#w,this._isEnabled=this.#F,Object.defineProperty(this,"_linesToClear",{get(){return this.#p},set(e){this.#p=e}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#g}}),Object.defineProperty(this,"_lineCount",{get(){return this.#m}}))}get indent(){return this.#S}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#S=e,this.#A()}get interval(){return this.#E??this.#b.interval??100}get spinner(){return this.#b}set spinner(e){if(this.#g=-1,this.#E=void 0,"object"==typeof e){if(void 0===e.frames)throw new Error("The given spinner must have a `frames` property");this.#b=e}else if(Ei())if(void 0===e)this.#b=di.dots;else{if("default"===e||!di[e])throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);this.#b=di[e]}else this.#b=di.line}get text(){return this.#x}set text(e=""){this.#x=e,this.#A()}get prefixText(){return this.#O}set prefixText(e=""){this.#O=e,this.#A()}get suffixText(){return this.#_}set suffixText(e=""){this.#_=e,this.#A()}get isSpinning(){return void 0!==this.#v}#T(e=this.#O,t=" "){return"string"==typeof e&&""!==e?e+t:"function"==typeof e?e()+t:""}#M(e=this.#_,t=" "){return"string"==typeof e&&""!==e?t+e:"function"==typeof e?t+e():""}#A(){const e=this.#w.columns??80,t=this.#T(this.#O,"-"),r=this.#M(this.#_,"-"),i=" ".repeat(this.#S)+t+"--"+this.#x+"--"+r;this.#m=0;for(const t of Di(i).split("\n"))this.#m+=Math.max(1,Math.ceil(vi(t,{countAnsiEscapeCodes:!0})/e))}get isEnabled(){return this.#F&&!this.#C}set isEnabled(e){if("boolean"!=typeof e)throw new TypeError("The `isEnabled` option must be a boolean");this.#F=e}get isSilent(){return this.#C}set isSilent(e){if("boolean"!=typeof e)throw new TypeError("The `isSilent` option must be a boolean");this.#C=e}frame(){const e=Date.now();(-1===this.#g||e-this.#D>=this.interval)&&(this.#g=++this.#g%this.#b.frames.length,this.#D=e);const{frames:t}=this.#b;let r=t[this.#g];return this.color&&(r=wr[this.color](r)),("string"==typeof this.#O&&""!==this.#O?this.#O+" ":"")+r+("string"==typeof this.text?" "+this.text:"")+("string"==typeof this.#_&&""!==this.#_?" "+this.#_:"")}clear(){if(!this.#F||!this.#w.isTTY)return this;this.#w.cursorTo(0);for(let e=0;e<this.#p;e++)e>0&&this.#w.moveCursor(0,-1),this.#w.clearLine(1);return(this.#S||this.lastIndent!==this.#S)&&this.#w.cursorTo(this.#S),this.lastIndent=this.#S,this.#p=0,this}render(){return this.#C||(this.clear(),this.#w.write(this.frame()),this.#p=this.#m),this}start(e){return e&&(this.text=e),this.#C?this:this.#F?(this.isSpinning||(this.#y.hideCursor&&hi.hide(this.#w),this.#y.discardStdin&&Jt.stdin.isTTY&&(this.#f=!0,Fi.start()),this.render(),this.#v=setInterval(this.render.bind(this),this.interval)),this):(this.text&&this.#w.write(`- ${this.text}\n`),this)}stop(){return this.#F?(clearInterval(this.#v),this.#v=void 0,this.#g=0,this.clear(),this.#y.hideCursor&&hi.show(this.#w),this.#y.discardStdin&&Jt.stdin.isTTY&&this.#f&&(Fi.stop(),this.#f=!1),this):this}succeed(e){return this.stopAndPersist({symbol:mi.success,text:e})}fail(e){return this.stopAndPersist({symbol:mi.error,text:e})}warn(e){return this.stopAndPersist({symbol:mi.warning,text:e})}info(e){return this.stopAndPersist({symbol:mi.info,text:e})}stopAndPersist(e={}){if(this.#C)return this;const t=e.prefixText??this.#O,r=this.#T(t," "),i=e.symbol??" ",n=e.text??this.text,s="string"==typeof n?(i?" ":"")+n:"",o=e.suffixText??this.#_,a=r+i+s+this.#M(o," ")+"\n";return this.stop(),this.#w.write(a),this}}const Si=e(import.meta.url)("node:child_process"),xi=e(import.meta.url)("node:fs");var Oi=i(1364),_i=i(3396);function Ai(e){return Oi(e).timeout(5e3).send().then((e=>301===e.statusCode?Ai(e.headers.location):e.text())).then((e=>{const t=e.trim();if(t)return t;throw new Error("template download fail")}))}function Ti(e){return e?e.trim():void 0}async function Mi(e){if(e)return e;const t=function(){try{return{name:(0,Si.execSync)("git config user.name").toString().trim(),email:(0,Si.execSync)("git config user.email").toString().trim()}}catch{return{}}}();return t.name?_i(t):"Unknown"}function Ii(){try{return JSON.parse((0,xi.readFileSync)((0,Wt.join)(process.cwd(),"package.json")))}catch{return{}}}const ki={Windows_NT:"windows",Linux:"linux",Darwin:"macos"};async function ji(){await(new Br).onDone((()=>"# Created by nice-move\n\n* text=auto eol=lf\n")).output(".gitattributes").logger("Create/Overwrite",Rr(".gitattributes"));const e=(r={text:"Downloading template from `gitignore.io`"},new Ci(r)).start(),t=`Create/Overwrite ${Rr(".gitignore")}`;var r;return(new Br).source(".gitignore").onFail().onDone(((e="")=>Ai(`https://gitignore.io/api/ssh,certificates,node,${ki[(0,Zt.type)()]}`).then((e=>`${e.replaceAll(/(www\.)?toptal\.com\/developers\/gitignore/g,"gitignore.io").trim()}\n`)).catch((()=>e||"node_modules\n")))).output().then((()=>{e.stopAndPersist({symbol:Nr("\u221a"),text:t})})).catch((r=>{e.stopAndPersist({symbol:$r("\xd7"),text:`${t} - ${r.message}`})}))}async function Bi(){const{license:e,author:t=""}=Ii(),r="MIT"===e;if(r||"Unlicense"===e){const e=await async function(e){return(await Mi(e)).name||"Unknown"}(t);return(new Br).onDone((()=>r?'MIT License\n\nCopyright (c) {{year}} {{holder}}\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n'.replace("{{year}}",(new Date).getFullYear()).replace("{{holder}}",e):'This is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to <https://unlicense.org/>\n')).output("LICENSE").logger("Create/Overwrite",Rr("LICENSE")).catch(console.warn)}}const Pi={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};function Ri(e,t){return t}function $i(e,t){return e.filter((e=>void 0!==e))}var Ni;function Li(e){return"object"!=typeof e||null===e?0:Array.isArray(e)?2:function(e){if(!Wi.includes(Object.prototype.toString.call(e)))return!1;const{constructor:t}=e;if(void 0===t)return!0;const r=t.prototype;return!(null===r||"object"!=typeof r||!Wi.includes(Object.prototype.toString.call(r)))&&!!r.hasOwnProperty("isPrototypeOf")}(e)?1:e instanceof Set?3:e instanceof Map?4:5}function Ui(e){let t=0,r=e[0]?.[Symbol.iterator]();return{[Symbol.iterator]:()=>({next(){for(;;){if(void 0===r)return{done:!0,value:void 0};const i=r.next();if(!0!==i.done)return{done:!1,value:i.value};t+=1,r=e[t]?.[Symbol.iterator]()}}})}}!function(e){e[e.NOT=0]="NOT",e[e.RECORD=1]="RECORD",e[e.ARRAY=2]="ARRAY",e[e.SET=3]="SET",e[e.MAP=4]="MAP",e[e.OTHER=5]="OTHER"}(Ni||(Ni={}));const Wi=["[object Object]","[object Module]"],Hi={mergeRecords:function(e,t,r){const i={};for(const o of function(e){const t=new Set;for(const r of e)for(const e of[...Object.keys(r),...Object.getOwnPropertySymbols(r)])t.add(e);return t}(e)){const a=[];for(const t of e)s=o,"object"==typeof(n=t)&&Object.prototype.propertyIsEnumerable.call(n,s)&&a.push(t[o]);if(0===a.length)continue;const u=t.metaDataUpdater(r,{key:o,parents:e}),c=zi(a,t,u);c!==Pi.skip&&("__proto__"===o?Object.defineProperty(i,o,{value:c,configurable:!0,enumerable:!0,writable:!0}):i[o]=c)}var n,s;return i},mergeArrays:function(e){return e.flat()},mergeSets:function(e){return new Set(Ui(e))},mergeMaps:function(e){return new Map(Ui(e))},mergeOthers:function(e){return e.at(-1)}};function Gi(...e){return function(){const e=function(e,t){return{defaultMergeFunctions:Hi,mergeFunctions:{...Hi,...Object.fromEntries(Object.entries(e).filter((([e,t])=>Object.hasOwn(Hi,e))).map((([e,t])=>!1===t?[e,Hi.mergeOthers]:[e,t])))},metaDataUpdater:e.metaDataUpdater??Ri,deepmerge:t,useImplicitDefaultMerging:e.enableImplicitDefaultMerging??!1,filterValues:!1===e.filterValues?void 0:e.filterValues??$i,actions:Pi}}({},t);function t(...t){return zi(t,e,undefined)}return t}()(...e)}function zi(e,t,r){const i=t.filterValues?.(e,r)??e;if(0===i.length)return;if(1===i.length)return Vi(i,t,r);const n=Li(i[0]);if(0!==n&&5!==n)for(let e=1;e<i.length;e++)if(Li(i[e])!==n)return Vi(i,t,r);switch(n){case 1:return function(e,t,r){const i=t.mergeFunctions.mergeRecords(e,t,r);return i===Pi.defaultMerge||t.useImplicitDefaultMerging&&void 0===i&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords?t.defaultMergeFunctions.mergeRecords(e,t,r):i}(i,t,r);case 2:return function(e,t,r){const i=t.mergeFunctions.mergeArrays(e,t,r);return i===Pi.defaultMerge||t.useImplicitDefaultMerging&&void 0===i&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays?t.defaultMergeFunctions.mergeArrays(e):i}(i,t,r);case 3:return function(e,t,r){const i=t.mergeFunctions.mergeSets(e,t,r);return i===Pi.defaultMerge||t.useImplicitDefaultMerging&&void 0===i&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets?t.defaultMergeFunctions.mergeSets(e):i}(i,t,r);case 4:return function(e,t,r){const i=t.mergeFunctions.mergeMaps(e,t,r);return i===Pi.defaultMerge||t.useImplicitDefaultMerging&&void 0===i&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps?t.defaultMergeFunctions.mergeMaps(e):i}(i,t,r);default:return Vi(i,t,r)}}function Vi(e,t,r){const i=t.mergeFunctions.mergeOthers(e,t,r);return i===Pi.defaultMerge||t.useImplicitDefaultMerging&&void 0===i&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):i}var qi=i(323);const Yi=e(import.meta.url)("node:util"),Ki=(0,Yi.promisify)(Si.execFile),Ji={spawn:!0},Zi="en-US";async function Qi(e,t){return(await async function(e,t){const r=await Ki(e,t,{encoding:"utf8"});return r.stdout=r.stdout.trim(),r}(e,t)).stdout}function Xi(e=process.env){return e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}function en(e){return e&&e.replace(/[.:].*/,"")}async function tn(){return Qi("locale",["-a"])}const rn=new Map;async function nn(e=Ji){if(rn.has(e.spawn))return rn.get(e.spawn);let t;try{const r=Xi();t=r||!1===e.spawn?en(r):"win32"===process.platform?await async function(){const e=await Qi("wmic",["os","get","locale"]),t=Number.parseInt(e.replace("Locale",""),16);return qi.from(t)}():"darwin"===process.platform?await async function(){const e=await Promise.all([Qi("defaults",["read","-globalDomain","AppleLocale"]),tn()]);return function(e,t=""){return t.includes(e)?e:Zi}(e[0],e[1])}():await async function(){return en(function(e){const t={};for(const r of e.split("\n")){const[e,i]=r.split("=");t[e]=i.replace(/^"|"$/g,"")}return Xi(t)}(await Qi("locale")))}()}catch{}const r=(t||Zi).replace(/_/,"-");return rn.set(e.spawn,r),r}const sn={"@bring-it/cli":"^0.10.0","@bring-it/npm":"^0.6.0","@cospaia/prettier-plugin-clojure":"^0.0.2","@vitest/ui":"^3.1.1","best-shot":"^0.9.11",eslint:"^9.24.0",garou:"^0.9.5",postcss:"^8.5.3",prettier:"^3.5.3","prettier-plugin-tailwindcss":"^0.6.11",stylelint:"^16.18.0",syncpack:"^13.0.3",typescript:"~5.8.3",vitest:"^3.1.1","@bring-it/sftp":"^0.4.0","@nice-move/init":"^0.8.17","@nice-move/syncpack-config":"^0.3.0","@playwright/test":"~1.51.1","@types/react":"~18.3.20",react:"~18.3.1","react-dom":"~18.3.1",tailwindcss:"^3.4.17",vue:"~3.5.13","@nice-move/eslint-config-base":"^0.12.17","@nice-move/stylelint-config":"^0.10.13","@nice-move/prettier-config":"^0.14.12","@nice-move/tsconfig":"^0.2.9","@nice-move/cli":"^0.11.21","@eslint/js":"^9.24.0",chalk:"^5.4.1",execa:"^9.5.2","fs-chain":"^10.0.0",globals:"^16.0.0",lodash:"^4.17.21",settingz:"^0.2.0","sort-keys":"^5.1.0",yaml:"^2.7.1",lts:"^20.18.1 || ^22.11.0"},on="package.json";async function an(){const{name:e,description:t}=Ii();(new Br).source("README.md").onFail().onDone((r=>r||[`# ${e}`,t?`${t}.\n`:""].filter(Boolean).join("\n\n"))).output().logger("Create",Rr("README.md")).catch(console.warn)}function un(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}const cn=(e,t)=>{const r=dn(ln(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},ln=e=>hn(e)?e.toString():e,hn=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,dn=e=>e instanceof URL?(0,Ht.fileURLToPath)(e):e,pn=(e,t=[],r={})=>{const i=cn(e,"First argument"),[n,s]=un(t)?[[],t]:[t,r];if(!Array.isArray(n))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${n}`);if(n.some((e=>"object"==typeof e&&null!==e)))throw new TypeError(`Second argument must be an array of strings: ${n}`);const o=n.map(String),a=o.find((e=>e.includes("\0")));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!un(s))throw new TypeError(`Last argument must be an options object: ${s}`);return[i,o,s]},fn=e(import.meta.url)("node:string_decoder"),{toString:mn}=Object.prototype,gn=e=>"[object Uint8Array]"===mn.call(e),Dn=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),yn=new TextEncoder,bn=e=>yn.encode(e),wn=new TextDecoder,vn=e=>wn.decode(e),En=e=>1===e.length&&gn(e[0])?e[0]:Cn(Fn(e)),Fn=e=>e.map((e=>"string"==typeof e?bn(e):e)),Cn=e=>{const t=new Uint8Array(Sn(e));let r=0;for(const i of e)t.set(i,r),r+=i.length;return t},Sn=e=>{let t=0;for(const r of e)t+=r.length;return t},xn=({templates:e,expressions:t,tokens:r,index:i,template:n})=>{if(void 0===n)throw new TypeError(`Invalid backslash sequence: ${e.raw[i]}`);const{nextTokens:s,leadingWhitespaces:o,trailingWhitespaces:a}=On(n,e.raw[i]),u=Tn(r,s,o);if(i===t.length)return u;const c=t[i],l=Array.isArray(c)?c.map((e=>Mn(e))):[Mn(c)];return Tn(u,l,a)},On=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let i=0;const n=_n.has(t[0]);for(let n=0,s=0;n<e.length;n+=1,s+=1){const o=t[s];if(_n.has(o))i!==n&&r.push(e.slice(i,n)),i=n+1;else if("\\"===o){const e=t[s+1];"\n"===e?(n-=1,s+=1):"u"===e&&"{"===t[s+2]?s=t.indexOf("}",s+3):s+=An[e]??1}}const s=i===e.length;return s||r.push(e.slice(i)),{nextTokens:r,leadingWhitespaces:n,trailingWhitespaces:s}},_n=new Set([" ","\t","\r","\n"]),An={x:3,u:5},Tn=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],Mn=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(un(e)&&("stdout"in e||"isMaxBuffer"in e))return In(e);if(e instanceof Si.ChildProcess||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},In=({stdout:e})=>{if("string"==typeof e)return e;if(gn(e))return vn(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},kn=e=>jn.includes(e),jn=[Jt.stdin,Jt.stdout,Jt.stderr],Bn=["stdin","stdout","stderr"],Pn=e=>Bn[e]??`stdio[${e}]`,Rn=(e,t)=>{const r=Array.from({length:$n(e)+1}),i=Nn(e[t],r,t);return Vn(i,t)},$n=({stdio:e})=>Array.isArray(e)?Math.max(e.length,Bn.length):Bn.length,Nn=(e,t,r)=>un(e)?Ln(e,t,r):t.fill(e),Ln=(e,t,r)=>{for(const i of Object.keys(e).sort(Un))for(const n of Hn(i,r,t))t[n]=e[i];return t},Un=(e,t)=>Wn(e)<Wn(t)?1:-1,Wn=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Hn=(e,t,r)=>{if("ipc"===e)return[r.length-1];const i=Gn(e);if(void 0===i||0===i)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(i>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===i?[1,2]:[i]},Gn=e=>{if("all"===e)return e;if(Bn.includes(e))return Bn.indexOf(e);const t=zn.exec(e);return null!==t?Number(t[1]):void 0},zn=/^fd(\d+)$/,Vn=(e,t)=>e.map((e=>void 0===e?qn[t]:e)),qn={lines:!1,buffer:!0,maxBuffer:1e8,verbose:(0,Yi.debuglog)("execa").enabled?"full":"none",stripFinalNewline:!0},Yn=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],Kn=(e,t)=>"ipc"===t?e.at(-1):e[t],Jn=({verbose:e},t)=>"none"!==Qn(e,t),Zn=({verbose:e},t)=>!["none","short"].includes(Qn(e,t)),Qn=(e,t)=>void 0===t?Xn(e):Kn(e,t),Xn=e=>e.find((e=>es(e)))??ts.findLast((t=>e.includes(t))),es=e=>"function"==typeof e,ts=["none","short","full"],rs=e=>(0,Yi.stripVTControlCharacters)(e).split("\n").map((e=>is(e))).join("\n"),is=e=>e.replaceAll(ss,(e=>ns(e))),ns=e=>{const t=os[e];if(void 0!==t)return t;const r=e.codePointAt(0),i=r.toString(16);return r<=as?`\\u${i.padStart(4,"0")}`:`\\U${i}`},ss=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),os={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},as=65535,us=/^[\w./-]+$/,cs={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258c",squareRight:"\u2590",squareCenter:"\u25a0",bullet:"\u25cf",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203a",triangleUp:"\u25b2",triangleUpSmall:"\u25b4",triangleDown:"\u25bc",triangleDownSmall:"\u25be",triangleLeftSmall:"\u25c2",triangleRightSmall:"\u25b8",home:"\u2302",heart:"\u2665",musicNote:"\u266a",musicNoteBeamed:"\u266b",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221e",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xbd",oneThird:"\u2153",oneQuarter:"\xbc",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215b",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xbe",threeFifths:"\u2157",threeEighths:"\u215c",fourFifths:"\u2158",fiveSixths:"\u215a",fiveEighths:"\u215d",sevenEighths:"\u215e",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254c",lineDashed5:"\u254d",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257a",lineDashed10:"\u257c",lineDashed11:"\u257e",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250a",lineVerticalDashed3:"\u250b",lineVerticalDashed4:"\u254e",lineVerticalDashed5:"\u254f",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257b",lineVerticalDashed10:"\u257d",lineVerticalDashed11:"\u257f",lineDownLeft:"\u2510",lineDownLeftArc:"\u256e",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250c",lineDownRightArc:"\u256d",lineDownBoldRightBold:"\u250f",lineDownBoldRight:"\u250e",lineDownRightBold:"\u250d",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256f",lineUpBoldLeftBold:"\u251b",lineUpBoldLeft:"\u251a",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255d",lineUpDoubleLeft:"\u255c",lineUpLeftDouble:"\u255b",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255a",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252b",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252a",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251c",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251d",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251f",lineUpBoldDownRight:"\u251e",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255f",lineUpDownRightDouble:"\u255e",lineDownLeftRight:"\u252c",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252f",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252e",lineDownLeftBoldRight:"\u252d",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253b",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253a",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253c",lineUpBoldDownBoldLeftBoldRightBold:"\u254b",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254a",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253d",lineUpDownLeftRightBold:"\u253e",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253f",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256c",lineUpDoubleDownDoubleLeftRight:"\u256b",lineUpDownLeftDoubleRightDouble:"\u256a",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},ls={tick:"\u2714",info:"\u2139",warning:"\u26a0",cross:"\u2718",squareSmall:"\u25fb",squareSmallFilled:"\u25fc",circle:"\u25ef",circleFilled:"\u25c9",circleDotted:"\u25cc",circleDouble:"\u25ce",circleCircle:"\u24de",circleCross:"\u24e7",circlePipe:"\u24be",radioOn:"\u25c9",radioOff:"\u25ef",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24e7",checkboxCircleOff:"\u24be",pointer:"\u276f",triangleUpOutline:"\u25b3",triangleLeft:"\u25c0",triangleRight:"\u25b6",lozenge:"\u25c6",lozengeOutline:"\u25c7",hamburger:"\u2630",smiley:"\u32e1",mustache:"\u0df4",star:"\u2605",play:"\u25b6",nodejs:"\u2b22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},hs={...cs,...ls},ds={...cs,tick:"\u221a",info:"i",warning:"\u203c",cross:"\xd7",squareSmall:"\u25a1",squareSmallFilled:"\u25a0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25cb)",circleCross:"(\xd7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xd7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xd7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25c4",triangleRight:"\u25ba",lozenge:"\u2666",lozengeOutline:"\u25ca",hamburger:"\u2261",smiley:"\u263a",mustache:"\u250c\u2500\u2510",star:"\u2736",play:"\u25ba",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},ps=Ei()?hs:ds,fs=(Object.entries(ls),Qt?.WriteStream?.prototype?.hasColors?.()??!1),ms=(e,t)=>{if(!fs)return e=>e;const r=`\x1b[${e}m`,i=`\x1b[${t}m`;return e=>{const t=e+"";let n=t.indexOf(i);if(-1===n)return r+t+i;let s=r,o=0;for(;-1!==n;)s+=t.slice(o,n)+r,o=n+i.length,n=t.indexOf(i,o);return s+=t.slice(o)+i,s}},gs=(ms(0,0),ms(1,22)),Ds=(ms(2,22),ms(3,23),ms(4,24),ms(53,55),ms(7,27),ms(8,28),ms(9,29),ms(30,39),ms(31,39),ms(32,39),ms(33,39),ms(34,39),ms(35,39),ms(36,39),ms(37,39),ms(90,39)),ys=(ms(40,49),ms(41,49),ms(42,49),ms(43,49),ms(44,49),ms(45,49),ms(46,49),ms(47,49),ms(100,49),ms(91,39)),bs=(ms(92,39),ms(93,39)),ws=(ms(94,39),ms(95,39),ms(96,39),ms(97,39),ms(101,49),ms(102,49),ms(103,49),ms(104,49),ms(105,49),ms(106,49),ms(107,49),e=>`${vs(e.getHours(),2)}:${vs(e.getMinutes(),2)}:${vs(e.getSeconds(),2)}.${vs(e.getMilliseconds(),3)}`),vs=(e,t)=>String(e).padStart(t,"0"),Es=({failed:e,reject:t})=>e?t?ps.cross:ps.warning:ps.tick,Fs={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:Es,duration:Es},Cs=e=>e,Ss={command:()=>gs,output:()=>Cs,ipc:()=>Cs,error:({reject:e})=>e?ys:bs,duration:()=>Ds},xs=(e,t,r)=>{if(void 0===r)return e;const i=r(e,t);return"string"==typeof i?i:void 0},Os=e=>e.endsWith("\n")?e:`${e}\n`,_s=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:i,result:n})=>{const s=As({type:e,result:n,verboseInfo:i}),o=((e,t,r)=>{const i=(({verbose:e},t)=>{const r=Qn(e,t);return es(r)?r:void 0})(t,r);return e.map((({verboseLine:e,verboseObject:t})=>xs(e,t,i))).filter((e=>void 0!==e)).map((e=>Os(e))).join("")})(Ts(t,s),i,r);""!==o&&console.warn(o.slice(0,-1))},As=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:i,rawOptions:{piped:n=!1,...s}}})=>({type:e,escapedCommand:r,commandId:`${i}`,timestamp:new Date,piped:n,result:t,options:s}),Ts=(e,t)=>e.split("\n").map((e=>Ms({...t,message:e}))),Ms=e=>{const t=(({type:e,message:t,timestamp:r,piped:i,commandId:n,result:{failed:s=!1}={},options:{reject:o=!0}})=>{const a=ws(r),u=Fs[e]({failed:s,reject:o,piped:i}),c=Ss[e]({reject:o});return`${Ds(`[${a}]`)} ${Ds(`[${n}]`)} ${c(u)} ${c(t)}`})(e);return{verboseLine:t,verboseObject:e}},Is=e=>{const t="string"==typeof e?e:(0,Yi.inspect)(e);return rs(t).replaceAll("\t"," ".repeat(ks))},ks=2,js=e=>Jn({verbose:e})?Bs++:void 0;let Bs=0n;const Ps=()=>Jt.hrtime.bigint(),Rs=e=>Number(Jt.hrtime.bigint()-e)/1e6,$s=(e,t,r)=>{const i=Ps(),{command:n,escapedCommand:s}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map((e=>{return t=is(e),us.test(t)?t:"win32"===Jt.platform?`"${t.replaceAll('"','""')}"`:`'${t.replaceAll("'","'\\''")}'`;var t})).join(" ")}})(e,t),o=((e,t,r)=>((e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!ts.includes(t)&&!es(t)){const e=ts.map((e=>`'${e}'`)).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}})(e),{verbose:e,escapedCommand:t,commandId:js(e),rawOptions:r}))(Rn(r,"verbose"),s,{...r});return((e,t)=>{Jn(t)&&_s({type:"command",verboseMessage:e,verboseInfo:t})})(s,o),{command:n,escapedCommand:s,startTime:i,verboseInfo:o}};var Ns=i(6507);function Ls(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"}function Us(e){return e instanceof URL?(0,Ht.fileURLToPath)(e):e}(0,Yi.promisify)(Si.execFile);const Ws=({env:e=Jt.env,...t}={})=>{const r=Ls({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=Jt.cwd(),path:t=Jt.env[Ls()],preferLocal:r=!0,execPath:i=Jt.execPath,addExecPath:n=!0}={})=>{const s=Wt.resolve(Us(e)),o=[],a=t.split(Wt.delimiter);return r&&((e,t,r)=>{for(const i of function(e){return{*[Symbol.iterator](){let t,r=Wt.resolve(Us(e));for(;t!==r;)yield r,t=r,r=Wt.resolve(r,"..")}}}(r)){const r=Wt.join(i,"node_modules/.bin");t.includes(r)||e.push(r)}})(o,a,s),n&&((e,t,r,i)=>{const n=Wt.resolve(i,Us(r),"..");t.includes(n)||e.push(n)})(o,a,i,s),""===t||t===Wt.delimiter?`${o.join(Wt.delimiter)}${t}`:[...o,t].join(Wt.delimiter)})(t),e},Hs=e(import.meta.url)("node:timers/promises");class Gs extends Error{}const zs=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Vs,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Vs=Symbol("isExecaError"),qs=e=>"[object Error]"===Object.prototype.toString.call(e);class Ys extends Error{}zs(Ys,Ys.name);class Ks extends Error{}zs(Ks,Ks.name);const Js=(e,t)=>({name:`SIGRT${t+1}`,number:Zs+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Zs=34,Qs=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],Xs=()=>{const e=(()=>{const e=64-Zs+1;return Array.from({length:e},Js)})();return[...Qs,...e].map(eo)},eo=({name:e,number:t,description:r,action:i,forced:n=!1,standard:s})=>{const{signals:{[e]:o}}=Zt.constants,a=void 0!==o;return{name:e,number:a?o:t,description:r,supported:a,action:i,forced:n,standard:s}},to=({name:e,number:t,description:r,supported:i,action:n,forced:s,standard:o})=>[e,{name:e,number:t,description:r,supported:i,action:n,forced:s,standard:o}],ro=(()=>{const e=Xs();return Object.fromEntries(e.map(to))})(),io=(e,t)=>{const r=t.find((({name:t})=>Zt.constants.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))},no=((()=>{const e=Xs(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=io(e,t);if(void 0===r)return{};const{name:i,description:n,supported:s,action:o,forced:a,standard:u}=r;return{[e]:{name:i,number:e,description:n,supported:s,action:o,forced:a,standard:u}}})(r,e)));Object.assign({},...t)})(),e=>0===e?e:so(e,"`subprocess.kill()`'s argument")),so=(e,t)=>{if(Number.isInteger(e))return oo(e,t);if("string"==typeof e)return uo(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${co()}`)},oo=(e,t)=>{if(ao.has(e))return ao.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${co()}`)},ao=new Map(Object.entries(Zt.constants.signals).reverse().map((([e,t])=>[t,e]))),uo=(e,t)=>{if(e in Zt.constants.signals)return e;if(e.toUpperCase()in Zt.constants.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${co()}`)},co=()=>`Available signal names: ${lo()}.\nAvailable signal numbers: ${ho()}.`,lo=()=>Object.keys(Zt.constants.signals).sort().map((e=>`'${e}'`)).join(", "),ho=()=>[...new Set(Object.values(Zt.constants.signals).sort(((e,t)=>e-t)))].join(", "),po=e=>ro[e].description,fo=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:i,context:n,controller:s},o,a)=>{const{signal:u,error:c}=mo(o,a,r);go(c,i);const l=e(u);return Do({kill:e,signal:u,forceKillAfterDelay:t,killSignal:r,killResult:l,context:n,controller:s}),l},mo=(e,t,r)=>{const[i=r,n]=qs(e)?[void 0,e]:[e,t];if("string"!=typeof i&&!Number.isInteger(i))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(i)}`);if(void 0!==n&&!qs(n))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${n}`);return{signal:no(i),error:n}},go=(e,t)=>{void 0!==e&&t.reject(e)},Do=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:i,killResult:n,context:s,controller:o})=>{t===i&&n&&yo({kill:e,forceKillAfterDelay:r,context:s,controllerSignal:o.signal})},yo=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:i})=>{if(!1!==t)try{await(0,Hs.setTimeout)(t,void 0,{signal:i}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},bo=e(import.meta.url)("node:events"),wo=async(e,t)=>{e.aborted||await(0,bo.once)(e,"abort",{signal:t})},vo=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:i,controller:n})=>void 0===t||r?[]:[Eo(e,t,i,n)],Eo=async(e,t,r,{signal:i})=>{throw await wo(t,i),r.terminationReason??="cancel",e.kill(),t.reason},Fo=({methodName:e,isSubprocess:t,ipc:r,isConnected:i})=>{Co(e,t,r),So(e,t,i)},Co=(e,t,r)=>{if(!r)throw new Error(`${Ao(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},So=(e,t,r)=>{if(!r)throw new Error(`${Ao(e,t)} cannot be used: the ${Mo(t)} has already exited or disconnected.`)},xo=(e,t)=>new Error(`${Ao("sendMessage",t)} failed when sending an acknowledgment response to the ${Mo(t)}.`,{cause:e}),Oo=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_o=["could not be cloned","circular structure","call stack size exceeded"],Ao=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${To(t)}${e}(${r})`,To=e=>e?"":"subprocess.",Mo=e=>e?"parent process":"subprocess",Io=e=>{e.connected&&e.disconnect()},ko=()=>{const e={},t=new Promise(((t,r)=>{Object.assign(e,{resolve:t,reject:r})}));return Object.assign(t,e)},jo=(e,t="stdin")=>{const r=!0,{options:i,fileDescriptors:n}=Po.get(e),s=Ro(n,t,r),o=e.stdio[s];if(null===o)throw new TypeError(Lo(s,t,i,r));return o},Bo=(e,t="stdout")=>{const r=!1,{options:i,fileDescriptors:n}=Po.get(e),s=Ro(n,t,r),o="all"===s?e.all:e.stdio[s];if(null==o)throw new TypeError(Lo(s,t,i,r));return o},Po=new WeakMap,Ro=(e,t,r)=>{const i=$o(t,r);return No(i,t,r,e),i},$o=(e,t)=>{const r=Gn(e);if(void 0!==r)return r;const{validOptions:i,defaultValue:n}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${Ho(t)}" must not be "${e}".\nIt must be ${i} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${n}".`)},No=(e,t,r,i)=>{const n=i[Wo(e)];if(void 0===n)throw new TypeError(`"${Ho(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===n.direction&&!r)throw new TypeError(`"${Ho(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==n.direction&&r)throw new TypeError(`"${Ho(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Lo=(e,t,r,i)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:n,optionValue:s}=Uo(e,r);return`The "${n}: ${Go(s)}" option is incompatible with using "${Ho(i)}: ${Go(t)}".\nPlease set this option with "pipe" instead.`},Uo=(e,{stdin:t,stdout:r,stderr:i,stdio:n})=>{const s=Wo(e);return 0===s&&void 0!==t?{optionName:"stdin",optionValue:t}:1===s&&void 0!==r?{optionName:"stdout",optionValue:r}:2===s&&void 0!==i?{optionName:"stderr",optionValue:i}:{optionName:`stdio[${s}]`,optionValue:n[s]}},Wo=e=>"all"===e?1:e,Ho=e=>e?"to":"from",Go=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",zo=(e,t,r)=>{const i=e.getMaxListeners();0!==i&&i!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(i+t),(0,bo.addAbortListener)(r,(()=>{e.setMaxListeners(e.getMaxListeners()-t)})))},Vo=(e,t)=>{t&&qo(e)},qo=e=>{e.refCounted()},Yo=(e,t)=>{t&&Ko(e)},Ko=e=>{e.unrefCounted()},Jo=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:i},n)=>{if(oa(n)||Ca(n))return;Qo.has(e)||Qo.set(e,[]);const s=Qo.get(e);if(s.push(n),!(s.length>1))for(;s.length>0;){await da(e,i,n),await Hs.scheduler.yield();const o=await sa({wrappedMessage:s[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:i});s.shift(),i.emit("message",o),i.emit("message:done")}},Zo=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:i,boundOnMessage:n})=>{xa();const s=Qo.get(e);for(;s?.length>0;)await(0,bo.once)(i,"message:done");e.removeListener("message",n),((e,t)=>{t&&(qo(e),qo(e))})(t,r),i.connected=!1,i.emit("disconnect")},Qo=new WeakMap,Xo=(e,t,r)=>{if(ea.has(e))return ea.get(e);const i=new bo.EventEmitter;return i.connected=!0,ea.set(e,i),ta({ipcEmitter:i,anyProcess:e,channel:t,isSubprocess:r}),i},ea=new WeakMap,ta=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:i})=>{const n=Jo.bind(void 0,{anyProcess:t,channel:r,isSubprocess:i,ipcEmitter:e});t.on("message",n),t.once("disconnect",Zo.bind(void 0,{anyProcess:t,channel:r,isSubprocess:i,ipcEmitter:e,boundOnMessage:n})),((e,t)=>{t&&(Ko(e),Ko(e))})(r,i)},ra=e=>{const t=ea.get(e);return void 0===t?null!==e.channel:t.connected};let ia=0n;const na=(e,t)=>{if(t?.type===la&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&ua[t].resolve({isDeadlock:!0,hasListeners:!1})},sa=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:i,ipcEmitter:n})=>{if(e?.type!==la||!t.connected)return e;const{id:s,message:o}=e,a={id:s,type:ha,message:fa(t,n)};try{await ga({anyProcess:t,channel:r,isSubprocess:i,ipc:!0},a)}catch(e){n.emit("strict:error",e)}return o},oa=e=>{if(e?.type!==ha)return!1;const{id:t,message:r}=e;return ua[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},aa=async(e,t,r)=>{if(e?.type!==la)return;const i=ko();ua[e.id]=i;const n=new AbortController;try{const{isDeadlock:e,hasListeners:s}=await Promise.race([i,ca(t,r,n)]);e&&(e=>{throw new Error(`${Ao("sendMessage",e)} failed: the ${Mo(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${Ao("getOneMessage",e)},\n\t${Ao("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),s||(e=>{throw new Error(`${Ao("sendMessage",e)} failed: the ${Mo(e)} is not listening to incoming messages.`)})(r)}finally{n.abort(),delete ua[e.id]}},ua={},ca=async(e,t,{signal:r})=>{zo(e,1,r),await(0,bo.once)(e,"disconnect",{signal:r}),(e=>{throw new Error(`${Ao("sendMessage",e)} failed: the ${Mo(e)} exited without listening to incoming messages.`)})(t)},la="execa:ipc:request",ha="execa:ipc:response",da=async(e,t,r)=>{for(;!fa(e,t)&&pa.get(e)?.size>0;){const t=[...pa.get(e)];na(t,r),await Promise.all(t.map((({onMessageSent:e})=>e)))}},pa=new WeakMap,fa=(e,t)=>t.listenerCount("message")>ma(e),ma=e=>Po.has(e)&&!Kn(Po.get(e).options.buffer,"ipc")?1:0,ga=({anyProcess:e,channel:t,isSubprocess:r,ipc:i},n,{strict:s=!1}={})=>{const o="sendMessage";return Fo({methodName:o,isSubprocess:r,ipc:i,isConnected:e.connected}),Da({anyProcess:e,channel:t,methodName:o,isSubprocess:r,message:n,strict:s})},Da=async({anyProcess:e,channel:t,methodName:r,isSubprocess:i,message:n,strict:s})=>{const o=(({anyProcess:e,channel:t,isSubprocess:r,message:i,strict:n})=>{if(!n)return i;const s=Xo(e,t,r),o=fa(e,s);return{id:ia++,type:la,message:i,hasListeners:o}})({anyProcess:e,channel:t,isSubprocess:i,message:n,strict:s}),a=((e,t,r)=>{pa.has(e)||pa.set(e,new Set);const i=pa.get(e),n={onMessageSent:ko(),id:r?t.id:void 0};return i.add(n),{outgoingMessages:i,outgoingMessage:n}})(e,o,s);try{await ya({anyProcess:e,methodName:r,isSubprocess:i,wrappedMessage:o,message:n})}catch(t){throw Io(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},ya=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:i,message:n})=>{const s=ba(e);try{await Promise.all([aa(i,e,r),s(i)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${Ao(t,r)} cannot be used: the ${Mo(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:i})=>{if((({code:e,message:t})=>Oo.has(e)||_o.some((e=>t.includes(e))))(e))throw new Error(`${Ao(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(i)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:n}),e}},ba=e=>{if(wa.has(e))return wa.get(e);const t=(0,Yi.promisify)(e.send.bind(e));return wa.set(e,t),t},wa=new WeakMap,va=async({anyProcess:e,channel:t,isSubprocess:r,ipc:i})=>(await Ea({anyProcess:e,channel:t,isSubprocess:r,ipc:i}),Oa.signal),Ea=async({anyProcess:e,channel:t,isSubprocess:r,ipc:i})=>{Fa||(Fa=!0,i?null!==t?(Xo(e,t,r),await Hs.scheduler.yield()):xa():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let Fa=!1;const Ca=e=>e?.type===Sa&&(Oa.abort(e.message),!0),Sa="execa:ipc:cancel",xa=()=>{Oa.abort(new Error(`\`cancelSignal\` aborted: the ${Mo(!0)} disconnected.`))},Oa=new AbortController,_a=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:i,context:n,controller:s})=>r?[Aa({subprocess:e,cancelSignal:t,forceKillAfterDelay:i,context:n,controller:s})]:[],Aa=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:i,controller:{signal:n}})=>{await wo(t,n);const s=Ta(t);throw await((e,t)=>{const r="cancelSignal";return So(r,!1,e.connected),ya({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:Sa,message:t},message:t})})(e,s),yo({kill:e.kill,forceKillAfterDelay:r,context:i,controllerSignal:n}),i.terminationReason??="gracefulCancel",t.reason},Ta=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Ma=(e,t,r,i)=>0===t||void 0===t?[]:[Ia(e,t,r,i)],Ia=async(e,t,r,{signal:i})=>{throw await(0,Hs.setTimeout)(t,void 0,{signal:i}),r.terminationReason??="timeout",e.kill(),new Gs},ka=e(import.meta.url)("node:v8"),ja={advanced:e=>{try{(0,ka.serialize)(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Ba=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},Pa=new Set(["utf8","utf16le"]),Ra=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),$a=new Set([...Pa,...Ra]),Na={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},La=e=>"string"==typeof e?`"${e}"`:String(e),Ua=()=>{try{return Jt.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},Wa=(e,t,r)=>{r.cwd=((e=Ua())=>{const t=cn(e,'The "cwd" option');return Wt.resolve(t)})(r.cwd);const[i,n,s]=((e,t,{node:r=!1,nodePath:i=Jt.execPath,nodeOptions:n=Jt.execArgv.filter((e=>!e.startsWith("--inspect"))),cwd:s,execPath:o,...a})=>{if(void 0!==o)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const u=cn(i,'The "nodePath" option'),c=Wt.resolve(s,u),l={...a,nodePath:c,node:r,cwd:s};if(!r)return[e,t,l];if("node"===Wt.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[c,[...n,e,...t],{ipc:!0,...l,shell:!1}]})(e,t,r),{command:o,args:a,options:u}=Ns._parse(i,n,s),c=(e=>{const t={...e};for(const r of Yn)t[r]=Rn(e,r);return t})(u),l=Ha(c);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(l),(({encoding:e})=>{if($a.has(e))return;const t=(e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Na?Na[t]:$a.has(t)?t:void 0})(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${La(e)}\`.\nPlease rename it to ${La(t)}.`);const r=[...$a].map((e=>La(e))).join(", ");throw new TypeError(`Invalid option \`encoding: ${La(e)}\`.\nPlease rename it to one of: ${r}.`)})(l),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");ja[r](e)}})(l),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(l),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:i})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===i)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(l),l.shell=dn(l.shell),l.env=Ga(l),l.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return so(e,t)})(l.killSignal),l.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(l.forceKillAfterDelay),l.lines=l.lines.map(((e,t)=>e&&!Ra.has(l.encoding)&&l.buffer[t])),"win32"===Jt.platform&&"cmd"===Wt.basename(o,".exe")&&a.unshift("/q"),{file:o,commandArguments:a,options:l}},Ha=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:i=r,encoding:n="utf8",reject:s=!0,cleanup:o=!0,all:a=!1,windowsHide:u=!0,killSignal:c="SIGTERM",forceKillAfterDelay:l=!0,gracefulCancel:h=!1,ipcInput:d,ipc:p=void 0!==d||h,serialization:f="advanced",...m})=>({...m,extendEnv:e,preferLocal:t,cwd:r,localDirectory:i,encoding:n,reject:s,cleanup:o,all:a,windowsHide:u,killSignal:c,forceKillAfterDelay:l,gracefulCancel:h,ipcInput:d,ipc:p,serialization:f}),Ga=({env:e,extendEnv:t,preferLocal:r,node:i,localDirectory:n,nodePath:s})=>{const o=t?{...Jt.env,...e}:e;return r||i?Ws({env:o,cwd:n,execPath:s,preferLocal:r,addExecPath:i}):o};function za(e){if("string"==typeof e)return Va(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return qa(e)}const Va=e=>e.at(-1)===Ya?e.slice(0,e.at(-2)===Ja?-2:-1):e,qa=e=>e.at(-1)===Ka?e.subarray(0,e.at(-2)===Za?-2:-1):e,Ya="\n",Ka=Ya.codePointAt(0),Ja="\r",Za=Ja.codePointAt(0);function Qa(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xa(e,{checkOpen:t=!0}={}){return Qa(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function eu(e,{checkOpen:t=!0}={}){return Qa(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function tu(e,t){return Xa(e,t)&&eu(e,t)}const ru=Object.getPrototypeOf(Object.getPrototypeOf((async function*(){})).prototype);class iu{#I;#k;#j=!1;#B=void 0;constructor(e,t){this.#I=e,this.#k=t}next(){const e=()=>this.#P();return this.#B=this.#B?this.#B.then(e,e):e(),this.#B}return(e){const t=()=>this.#R(e);return this.#B?this.#B.then(t,t):t()}async#P(){if(this.#j)return{done:!0,value:void 0};let e;try{e=await this.#I.read()}catch(e){throw this.#B=void 0,this.#j=!0,this.#I.releaseLock(),e}return e.done&&(this.#B=void 0,this.#j=!0,this.#I.releaseLock()),e}async#R(e){if(this.#j)return{done:!0,value:e};if(this.#j=!0,!this.#k){const t=this.#I.cancel(e);return this.#I.releaseLock(),await t,{done:!0,value:e}}return this.#I.releaseLock(),{done:!0,value:e}}}const nu=Symbol();function su(){return this[nu].next()}function ou(e){return this[nu].return(e)}Object.defineProperty(su,"name",{value:"next"}),Object.defineProperty(ou,"name",{value:"return"});const au=Object.create(ru,{next:{enumerable:!0,configurable:!0,writable:!0,value:su},return:{enumerable:!0,configurable:!0,writable:!0,value:ou}});function uu({preventCancel:e=!1}={}){const t=this.getReader(),r=new iu(t,e),i=Object.create(au);return i[nu]=r,i}const cu=e=>{if(eu(e,{checkOpen:!1})&&void 0!==pu.on)return hu(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===lu.call(e))return uu.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:lu}=Object.prototype,hu=async function*(e){const t=new AbortController,r={};du(e,t,r);try{for await(const[r]of pu.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},du=async(e,t,r)=>{try{await pu.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},pu={},fu=async(e,{init:t,convertChunk:r,getSize:i,truncateChunk:n,addChunk:s,getFinalChunk:o,finalize:a},{maxBuffer:u=Number.POSITIVE_INFINITY}={})=>{const c=cu(e),l=t();l.length=0;try{for await(const e of c){const t=r[yu(e)](e,l);gu({convertedChunk:t,state:l,getSize:i,truncateChunk:n,addChunk:s,maxBuffer:u})}return mu({state:l,convertChunk:r,getSize:i,truncateChunk:n,addChunk:s,getFinalChunk:o,maxBuffer:u}),a(l)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(l),t}},mu=({state:e,getSize:t,truncateChunk:r,addChunk:i,getFinalChunk:n,maxBuffer:s})=>{const o=n(e);void 0!==o&&gu({convertedChunk:o,state:e,getSize:t,truncateChunk:r,addChunk:i,maxBuffer:s})},gu=({convertedChunk:e,state:t,getSize:r,truncateChunk:i,addChunk:n,maxBuffer:s})=>{const o=r(e),a=t.length+o;if(a<=s)return void Du(e,t,n,a);const u=i(e,s-t.length);throw void 0!==u&&Du(u,t,n,s),new wu},Du=(e,t,r,i)=>{t.contents=r(e,t,i),t.length=i},yu=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=bu.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===bu.call(e.buffer)?"typedArray":"others"},{toString:bu}=Object.prototype;class wu extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const vu=(e,t,r)=>{if(t.length!==r)return;const i=new wu;throw i.maxBufferInfo={fdNumber:"ipc"},i},Eu=([,e])=>e,Fu=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:i,maxBuffer:n,errorCode:s,signal:o,signalDescription:a,exitCode:u,isCanceled:c,isGracefullyCanceled:l,isForcefullyTerminated:h,forceKillAfterDelay:d,killSignal:p})=>{const f=Cu(h,d);return t?`Command timed out after ${r} milliseconds${f}`:l?void 0===o?`Command was gracefully canceled with exit code ${u}`:h?`Command was gracefully canceled${f}`:`Command was gracefully canceled with ${o} (${a})`:c?`Command was canceled${f}`:i?`${((e,t)=>{const{streamName:r,threshold:i,unit:n}=((e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:i}}=e;delete e.maxBufferInfo;const n=Kn(t,r);return"ipc"===r?{streamName:"IPC output",threshold:n,unit:"messages"}:{streamName:Pn(r),threshold:n,unit:i}})(e,t);return`Command's ${r} was larger than ${i} ${n}`})(e,n)}${f}`:void 0!==s?`Command failed with ${s}${f}`:h?`Command was killed with ${p} (${po(p)})${f}`:void 0!==o?`Command was killed with ${o} (${a})`:void 0!==u?`Command failed with exit code ${u}`:"Command failed"},Cu=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Su=e=>"string"==typeof e?e:gn(e)?vn(e):"",xu=({command:e,escapedCommand:t,stdio:r,all:i,ipcOutput:n,options:{cwd:s},startTime:o})=>Tu({command:e,escapedCommand:t,cwd:s,durationMs:Rs(o),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:i,stdio:r,ipcOutput:n,pipedFrom:[]}),Ou=({error:e,command:t,escapedCommand:r,fileDescriptors:i,options:n,startTime:s,isSync:o})=>_u({error:e,command:t,escapedCommand:r,startTime:s,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:i.length}),ipcOutput:[],options:n,isSync:o}),_u=({error:e,command:t,escapedCommand:r,startTime:i,timedOut:n,isCanceled:s,isGracefullyCanceled:o,isMaxBuffer:a,isForcefullyTerminated:u,exitCode:c,signal:l,stdio:h,all:d,ipcOutput:p,options:{timeoutDuration:f,timeout:m=f,forceKillAfterDelay:g,killSignal:D,cwd:y,maxBuffer:b},isSync:w})=>{const{exitCode:v,signal:E,signalDescription:F}=Mu(c,l),{originalMessage:C,shortMessage:S,message:x}=(({stdio:e,all:t,ipcOutput:r,originalError:i,signal:n,signalDescription:s,exitCode:o,escapedCommand:a,timedOut:u,isCanceled:c,isGracefullyCanceled:l,isMaxBuffer:h,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f,maxBuffer:m,timeout:g,cwd:D})=>{const y=i?.code,b=Fu({originalError:i,timedOut:u,timeout:g,isMaxBuffer:h,maxBuffer:m,errorCode:y,signal:n,signalDescription:s,exitCode:o,isCanceled:c,isGracefullyCanceled:l,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f}),w=((e,t)=>{if(e instanceof Gs)return;const r=qs(i=e)&&Vs in i?e.originalMessage:String(e?.message??e);var i;const n=rs(((e,t)=>{if(t===Ua())return e;let r;try{r=(0,xi.statSync)(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n})(i,D),v=`${b}: ${a}${void 0===w?"":`\n${w}`}`,E=[v,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map((e=>(e=>"string"==typeof e?e:(0,Yi.inspect)(e))(e))).join("\n")].map((e=>rs(za((e=>Array.isArray(e)?e.map((e=>za(Su(e)))).filter(Boolean).join("\n"):Su(e))(e))))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:v,message:E}})({stdio:h,all:d,ipcOutput:p,originalError:e,signal:E,signalDescription:F,exitCode:v,escapedCommand:r,timedOut:n,isCanceled:s,isGracefullyCanceled:o,isMaxBuffer:a,isForcefullyTerminated:u,forceKillAfterDelay:g,killSignal:D,maxBuffer:b,timeout:m,cwd:y}),O=((e,t,r)=>new(r?Ks:Ys)(t,e instanceof Gs?{}:{cause:e}))(e,x,w);return Object.assign(O,Au({error:O,command:t,escapedCommand:r,startTime:i,timedOut:n,isCanceled:s,isGracefullyCanceled:o,isMaxBuffer:a,isForcefullyTerminated:u,exitCode:v,signal:E,signalDescription:F,stdio:h,all:d,ipcOutput:p,cwd:y,originalMessage:C,shortMessage:S})),O},Au=({error:e,command:t,escapedCommand:r,startTime:i,timedOut:n,isCanceled:s,isGracefullyCanceled:o,isMaxBuffer:a,isForcefullyTerminated:u,exitCode:c,signal:l,signalDescription:h,stdio:d,all:p,ipcOutput:f,cwd:m,originalMessage:g,shortMessage:D})=>Tu({shortMessage:D,originalMessage:g,command:t,escapedCommand:r,cwd:m,durationMs:Rs(i),failed:!0,timedOut:n,isCanceled:s,isGracefullyCanceled:o,isTerminated:void 0!==l,isMaxBuffer:a,isForcefullyTerminated:u,exitCode:c,signal:l,signalDescription:h,code:e.cause?.code,stdout:d[1],stderr:d[2],all:p,stdio:d,ipcOutput:f,pipedFrom:[]}),Tu=e=>Object.fromEntries(Object.entries(e).filter((([,e])=>void 0!==e))),Mu=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:po(t)}},Iu=e=>Number.isFinite(e)?e:0;function ku(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const i=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let n=[];const s=(e,r,i,s)=>{if(0!==n.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===i){if(s??=String(e),t.colonNotation){const e=s.includes(".")?s.split(".")[0].length:s.length,t=n.length>0?2:1;s="0".repeat(Math.max(0,t-e))+s}else s+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):i;n.push(s)}},o=function(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Iu(1e3*e)%1e3),nanoseconds:Math.trunc(Iu(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}(e),a=BigInt(o.days);if(t.hideYearAndDays?s(24n*BigInt(a)+BigInt(o.hours),"hour","h"):(t.hideYear?s(a,"day","d"):(s(a/365n,"year","y"),s(a%365n,"day","d")),s(Number(o.hours),"hour","h")),s(Number(o.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){const e=Number(o.seconds),r=Number(o.milliseconds),i=Number(o.microseconds),n=Number(o.nanoseconds);if(s(e,"second","s"),t.formatSubMilliseconds)s(r,"millisecond","ms"),s(i,"microsecond","\xb5s"),s(n,"nanosecond","ns");else{const e=r+i/1e3+n/1e6,o="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),u=o?e.toFixed(o):a;s(Number.parseFloat(u),"millisecond","ms",u)}}else{const i=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),n=t.keepDecimalsOnWholeSeconds?i:i.replace(/\.0+$/,"");s(Number.parseFloat(n),"second","s",n)}if(0===n.length)return i+"0"+(t.verbose?" milliseconds":"ms");const u=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(n=n.slice(0,Math.max(t.unitCount,1))),i+n.join(u)}const ju=(e,t)=>{const r=`(done in ${ku(e.durationMs)})`;_s({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},Bu=(e,t,{reject:r})=>{if(((e,t)=>{Jn(t)&&(((e,t)=>{e.failed&&_s({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ju(e,t))})(e,t),e.failed&&r)throw e;return e},Pu=(e,t)=>zu(e)?"asyncGenerator":Vu(e)?"generator":Yu(e)?"fileUrl":Ku(e)?"filePath":tc(e)?"webStream":Qa(e,{checkOpen:!1})?"native":gn(e)?"uint8Array":ic(e)?"asyncIterable":nc(e)?"iterable":rc(e)?Nu({transform:e},t):qu(e)?Ru(e,t):"native",Ru=(e,t)=>tu(e.transform,{checkOpen:!1})?$u(e,t):rc(e.transform)?Nu(e,t):Wu(e,t),$u=(e,t)=>(Lu(e,t,"Duplex stream"),"duplex"),Nu=(e,t)=>(Lu(e,t,"web TransformStream"),"webTransform"),Lu=({final:e,binary:t,objectMode:r},i,n)=>{Uu(e,`${i}.final`,n),Uu(t,`${i}.binary`,n),Hu(r,`${i}.objectMode`)},Uu=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},Wu=({transform:e,final:t,binary:r,objectMode:i},n)=>{if(void 0!==e&&!Gu(e))throw new TypeError(`The \`${n}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(tu(t,{checkOpen:!1}))throw new TypeError(`The \`${n}.final\` option must not be a Duplex stream.`);if(rc(t))throw new TypeError(`The \`${n}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!Gu(t))throw new TypeError(`The \`${n}.final\` option must be a generator.`);return Hu(r,`${n}.binary`),Hu(i,`${n}.objectMode`),zu(e)||zu(t)?"asyncGenerator":"generator"},Hu=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},Gu=e=>zu(e)||Vu(e),zu=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),Vu=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),qu=e=>un(e)&&(void 0!==e.transform||void 0!==e.final),Yu=e=>"[object URL]"===Object.prototype.toString.call(e),Ku=e=>un(e)&&Object.keys(e).length>0&&Object.keys(e).every((e=>Ju.has(e)))&&Zu(e.file),Ju=new Set(["file","append"]),Zu=e=>"string"==typeof e,Qu=new Set(["ipc","ignore","inherit","overlapped","pipe"]),Xu=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),ec=e=>"[object WritableStream]"===Object.prototype.toString.call(e),tc=e=>Xu(e)||ec(e),rc=e=>Xu(e?.readable)&&ec(e?.writable),ic=e=>sc(e)&&"function"==typeof e[Symbol.asyncIterator],nc=e=>sc(e)&&"function"==typeof e[Symbol.iterator],sc=e=>"object"==typeof e&&null!==e,oc=new Set(["generator","asyncGenerator","duplex","webTransform"]),ac=new Set(["fileUrl","filePath","fileNumber"]),uc=new Set(["fileUrl","filePath"]),cc=new Set([...uc,"webStream","nodeStream"]),lc=new Set(["webTransform","duplex"]),hc={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},dc=(e,t,r,i)=>"output"===i?pc(e,t,r):fc(e,t,r),pc=(e,t,r)=>{const i=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:i,readableObjectMode:e??i}},fc=(e,t,r)=>{const i=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:i,readableObjectMode:t!==r.length-1&&(e??i)}},mc=(e,t,r,{encoding:i})=>{const n=e.filter((({type:e})=>oc.has(e))),s=Array.from({length:n.length});for(const[e,o]of Object.entries(n))s[e]=gc({stdioItem:o,index:Number(e),newTransforms:s,optionName:t,direction:r,encoding:i});return wc(s,r)},gc=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:i,optionName:n,direction:s,encoding:o})=>"duplex"===t?Dc({stdioItem:e,optionName:n}):"webTransform"===t?yc({stdioItem:e,index:r,newTransforms:i,direction:s}):bc({stdioItem:e,index:r,newTransforms:i,direction:s,encoding:o}),Dc=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:i},objectMode:n=i}},optionName:s})=>{if(n&&!i)throw new TypeError(`The \`${s}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!n&&i)throw new TypeError(`The \`${s}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:i}}},yc=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:i,direction:n})=>{const{transform:s,objectMode:o}=un(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:u}=dc(o,r,i,n);return{...e,value:{transform:s,writableObjectMode:a,readableObjectMode:u}}},bc=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:i,direction:n,encoding:s})=>{const{transform:o,final:a,binary:u=!1,preserveNewlines:c=!1,objectMode:l}=un(t)?t:{transform:t},h=u||Ra.has(s),{writableObjectMode:d,readableObjectMode:p}=dc(l,r,i,n);return{...e,value:{transform:o,final:a,binary:h,preserveNewlines:c,writableObjectMode:d,readableObjectMode:p}}},wc=(e,t)=>"input"===t?e.reverse():e,vc=["input","output","output"],Ec=()=>{},Fc=()=>"input",Cc={generator:Ec,asyncGenerator:Ec,fileUrl:Ec,filePath:Ec,iterable:Fc,asyncIterable:Fc,uint8Array:Fc,webStream:e=>ec(e)?"output":"input",nodeStream:e=>eu(e,{checkOpen:!1})?Xa(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Ec,duplex:Ec,native(e){const t=Sc(e);return void 0!==t?t:Qa(e,{checkOpen:!1})?Cc.nodeStream(e):void 0}},Sc=e=>[0,Jt.stdin].includes(e)?"input":[1,2,Jt.stdout,Jt.stderr].includes(e)?"output":void 0,xc=e=>Bn.some((t=>void 0!==e[t])),Oc=(e,t)=>Array.isArray(e)?e.map((e=>Oc(e,t))):null==e?t>=Bn.length?"ignore":"pipe":e,_c=e=>"pipe"===e||Array.isArray(e)&&e.every((e=>"pipe"===e)),Ac=({value:e,optionName:t,fdNumber:r,direction:i})=>{const n=Tc(e,r);if(void 0!==n){if("output"===i)return{type:"fileNumber",value:n,optionName:t};if(Qt.isatty(n))throw new TypeError(`The \`${t}: ${Go(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Dn((0,xi.readFileSync)(n)),optionName:t}}},Tc=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=jn.indexOf(e);return-1!==r?r:void 0},Mc=(e,t,r)=>{const i=jn[e];if(void 0===i)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return i},Ic=({input:e,inputFile:t},r)=>0===r?[...kc(e),...Bc(t)]:[],kc=e=>void 0===e?[]:[{type:jc(e),value:e,optionName:"input"}],jc=e=>{if(eu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(gn(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},Bc=e=>void 0===e?[]:[{...Pc(e),optionName:"inputFile"}],Pc=e=>{if(Yu(e))return{type:"fileUrl",value:e};if(Zu(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},Rc=({otherStdioItems:e,type:t,value:r,optionName:i,direction:n})=>{const s=e.filter((e=>$c(e,r)));if(0===s.length)return;const o=s.find((e=>e.direction!==n));return Nc(o,i,t),"output"===n?s[0].stream:void 0},$c=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,Nc=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${hc[r]} that is the same.`)},Lc=(e,t,r,i)=>{const n=(({stdio:e,ipc:t,buffer:r,...i},n,s)=>{const o=((e,t)=>{if(void 0===e)return Bn.map((e=>t[e]));if(xc(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Bn.map((e=>`\`${e}\``)).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,Bn.length);return Array.from({length:r},((t,r)=>e[r]))})(e,i).map(((e,t)=>Oc(e,t)));return s?((e,t,r)=>e.map(((e,i)=>t[i]||0===i||Zn(r,i)||!_c(e)?e:"ignore")))(o,r,n):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(o,t)})(t,r,i),s=n.map(((e,r)=>Uc({stdioOption:e,fdNumber:r,options:t,isSync:i}))),o=Kc({initialFileDescriptors:s,addProperties:e,options:t,isSync:i});return t.stdio=o.map((({stdioItems:e})=>Xc(e))),o},Uc=({stdioOption:e,fdNumber:t,options:r,isSync:i})=>{const n=Pn(t),{stdioItems:s,isStdioArray:o}=Wc({stdioOption:e,fdNumber:t,options:r,optionName:n}),a=((e,t,r)=>{const i=e.map((e=>(({type:e,value:t},r)=>vc[r]??Cc[e](t))(e,t)));if(i.includes("input")&&i.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return i.find(Boolean)??"output"})(s,t,n),u=s.map((e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:i,direction:n,isSync:s})=>r&&"native"===t?s?(({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:i,direction:n})=>{const s=Ac({value:t,optionName:r,fdNumber:i,direction:n});if(void 0!==s)return s;if(Qa(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e})({stdioItem:e,fdNumber:i,direction:n}):(({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:i})=>"inherit"===t?{type:"nodeStream",value:Mc(i,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:Mc(t,t,r),optionName:r}:Qa(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e)({stdioItem:e,fdNumber:i}):e)({stdioItem:e,isStdioArray:o,fdNumber:t,direction:a,isSync:i}))),c=((e,t,r,i)=>[...e.filter((({type:e})=>!oc.has(e))),...mc(e,t,r,i)])(u,n,a,r),l=((e,t)=>{const r=e.findLast((({type:e})=>oc.has(e)));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(c,a);return Yc(c,l),{direction:a,objectMode:l,stdioItems:c}},Wc=({stdioOption:e,fdNumber:t,options:r,optionName:i})=>{const n=(e=>e.filter(((t,r)=>e.every(((e,i)=>t.value!==e.value||r>=i||"generator"===t.type||"asyncGenerator"===t.type)))))([...(Array.isArray(e)?e:[e]).map((e=>Hc(e,i))),...Ic(r,t)]),s=n.length>1;return Gc(n,s,i),Vc(n),{stdioItems:n,isStdioArray:s}},Hc=(e,t)=>({type:Pu(e,t),value:e,optionName:t}),Gc=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(zc.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},zc=new Set(["ignore","ipc"]),Vc=e=>{for(const t of e)qc(t)},qc=({type:e,value:t,optionName:r})=>{if((e=>Yu(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!Qu.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},Yc=(e,t)=>{if(!t)return;const r=e.find((({type:e})=>ac.has(e)));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Kc=({initialFileDescriptors:e,addProperties:t,options:r,isSync:i})=>{const n=[];try{for(const s of e)n.push(Jc({fileDescriptor:s,fileDescriptors:n,addProperties:t,options:r,isSync:i}));return n}catch(e){throw Qc(n),e}},Jc=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:i,addProperties:n,options:s,isSync:o})=>{const a=r.map((t=>Zc({stdioItem:t,addProperties:n,direction:e,options:s,fileDescriptors:i,isSync:o})));return{direction:e,objectMode:t,stdioItems:a}},Zc=({stdioItem:e,addProperties:t,direction:r,options:i,fileDescriptors:n,isSync:s})=>{const o=(({stdioItem:{type:e,value:t,optionName:r},direction:i,fileDescriptors:n,isSync:s})=>{const o=((e,t)=>e.flatMap((({direction:e,stdioItems:r})=>r.filter((e=>e.type===t)).map((t=>({...t,direction:e}))))))(n,e);if(0!==o.length){if(!s)return cc.has(e)?Rc({otherStdioItems:o,type:e,value:t,optionName:r,direction:i}):void(lc.has(e)&&(({otherStdioItems:e,type:t,value:r,optionName:i})=>{const n=e.find((({value:{transform:e}})=>e===r.transform));Nc(n,i,t)})({otherStdioItems:o,type:e,value:t,optionName:r}));(({otherStdioItems:e,type:t,value:r,optionName:i,direction:n})=>{uc.has(t)&&Rc({otherStdioItems:e,type:t,value:r,optionName:i,direction:n})})({otherStdioItems:o,type:e,value:t,optionName:r,direction:i})}})({stdioItem:e,direction:r,fileDescriptors:n,isSync:s});return void 0!==o?{...e,stream:o}:{...e,...t[r][e.type](e,i)}},Qc=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||kn(e)||e.destroy()},Xc=e=>{if(e.length>1)return e.some((({value:e})=>"overlapped"===e))?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},el=({type:e,optionName:t})=>{tl(t,hc[e])},tl=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},rl={generator(){},asyncGenerator:el,webStream:el,nodeStream:el,webTransform:el,duplex:el,asyncIterable:el,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||tl(e,`"${t}"`),{})},il={input:{...rl,fileUrl:({value:e})=>({contents:[Dn((0,xi.readFileSync)(e))]}),filePath:({value:{file:e}})=>({contents:[Dn((0,xi.readFileSync)(e))]}),fileNumber:el,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...rl,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:el,string:el,uint8Array:el}},nl=(e,{stripFinalNewline:t},r)=>sl(t,r)&&void 0!==e&&!Array.isArray(e)?za(e):e,sl=(e,t)=>"all"===t?e[1]||e[2]:e[t],ol=e(import.meta.url)("node:stream"),al=(e,t,r,i)=>e||r?void 0:ll(t,i),ul=(e,t,r)=>r?e.flatMap((e=>cl(e,t))):cl(e,t),cl=(e,t)=>{const{transform:r,final:i}=ll(t,{});return[...r(e),...i()]},ll=(e,t)=>(t.previousChunks="",{transform:hl.bind(void 0,t,e),final:pl.bind(void 0,t)}),hl=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:i}=e,n=-1;for(let s=0;s<r.length;s+=1)if("\n"===r[s]){const o=dl(r,s,t,e);let a=r.slice(n+1,s+1-o);i.length>0&&(a=gl(i,a),i=""),yield a,n=s}n!==r.length-1&&(i=gl(i,r.slice(n+1))),e.previousChunks=i},dl=(e,t,r,i)=>r?0:(i.isWindowsNewline=0!==t&&"\r"===e[t-1],i.isWindowsNewline?2:1),pl=function*({previousChunks:e}){e.length>0&&(yield e)},fl=({binary:e,preserveNewlines:t,readableObjectMode:r,state:i})=>e||t||r?void 0:{transform:ml.bind(void 0,i)},ml=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:i,LF:n,concatBytes:s}="string"==typeof t?Dl:yl;if(t.at(-1)===n)return void(yield t);const o=e?i:r;yield s(t,o)},gl=(e,t)=>`${e}${t}`,Dl={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:gl},yl={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},bl=e(import.meta.url)("node:buffer"),wl=(e,t)=>e?void 0:vl.bind(void 0,t),vl=function*(e,t){if("string"!=typeof t&&!gn(t)&&!bl.Buffer.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},El=(e,t)=>e?Fl.bind(void 0,t):Cl.bind(void 0,t),Fl=function*(e,t){Sl(e,t),yield t},Cl=function*(e,t){if(Sl(e,t),"string"!=typeof t&&!gn(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Sl=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},xl=(e,t,r)=>{if(r)return;if(e)return{transform:Ol.bind(void 0,new TextEncoder)};const i=new fn.StringDecoder(t);return{transform:_l.bind(void 0,i),final:Al.bind(void 0,i)}},Ol=function*(e,t){bl.Buffer.isBuffer(t)?yield Dn(t):"string"==typeof t?yield e.encode(t):yield t},_l=function*(e,t){yield gn(t)?e.write(t):t},Al=function*(e){const t=e.end();""!==t&&(yield t)},Tl=(0,Yi.callbackify)((async(e,t,r,i)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)i.push(e)}finally{delete t.currentIterable}})),Ml=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:i=Bl}=t[r];for await(const n of i(e))yield*Ml(n,t,r+1)},Il=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*kl(r,Number(t),e)},kl=async function*(e,t,r){if(void 0!==e)for await(const i of e())yield*Ml(i,r,t+1)},jl=(0,Yi.callbackify)((async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())})),Bl=function*(e){yield e},Pl=(e,t,r,i)=>{try{for(const i of e(...t))r.push(i);i()}catch(e){i(e)}},Rl=(e,t)=>[...t.flatMap((t=>[...$l(t,e,0)])),...Nl(e)],$l=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:i=Ul}=t[r];for(const n of i(e))yield*$l(n,t,r+1)},Nl=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*Ll(r,Number(t),e)},Ll=function*(e,t,r){if(void 0!==e)for(const i of e())yield*$l(i,r,t+1)},Ul=function*(e){yield e},Wl=({value:e,value:{transform:t,final:r,writableObjectMode:i,readableObjectMode:n},optionName:s},{encoding:o})=>{const a={},u=Gl(e,o,s),c=zu(t),l=zu(r),h=c?Tl.bind(void 0,Ml,a):Pl.bind(void 0,$l),d=c||l?Tl.bind(void 0,Il,a):Pl.bind(void 0,Nl),p=c||l?jl.bind(void 0,a):void 0;return{stream:new ol.Transform({writableObjectMode:i,writableHighWaterMark:(0,ol.getDefaultHighWaterMark)(i),readableObjectMode:n,readableHighWaterMark:(0,ol.getDefaultHighWaterMark)(n),transform(e,t,r){h([e,u,0],this,r)},flush(e){d([u],this,e)},destroy:p})}},Hl=(e,t,r,i)=>{const n=t.filter((({type:e})=>"generator"===e)),s=i?n.reverse():n;for(const{value:t,optionName:i}of s){const n=Gl(t,r,i);e=Rl(n,e)}return e},Gl=({transform:e,final:t,binary:r,writableObjectMode:i,readableObjectMode:n,preserveNewlines:s},o,a)=>{const u={};return[{transform:wl(i,a)},xl(r,o,i),al(r,s,i,u),{transform:e,final:t},{transform:El(n,a)},fl({binary:r,preserveNewlines:s,readableObjectMode:n,state:u})].filter(Boolean)},zl=(e,t,r)=>{const{stdioItems:i}=e[t],n=i.filter((({contents:e})=>void 0!==e));if(0===n.length)return;if(0!==t){const[{type:e,optionName:t}]=n;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${hc[e]} with synchronous methods.`)}const s=n.map((({contents:e})=>e)).map((e=>Vl(e,i)));r.input=En(s)},Vl=(e,t)=>{const r=Hl(e,t,"utf8",!0);return ql(r),En(r)},ql=e=>{const t=e.find((e=>"string"!=typeof e&&!gn(e)));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},Yl=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:i})=>"all"!==i&&Zn(r,i)&&!Ra.has(t)&&Kl(i)&&(e.some((({type:e,value:t})=>"native"===e&&Jl.has(t)))||e.every((({type:e})=>oc.has(e)))),Kl=e=>1===e||2===e,Jl=new Set(["pipe","overlapped"]),Zl=e=>e._readableState.pipes.length>0,Ql=(e,t,r)=>{const i=Is(e);_s({type:"output",verboseMessage:i,fdNumber:t,verboseInfo:r})},Xl=(e,t,r,i)=>{try{return Hl(e,t,r,!1)}catch(t){return i.error=t,e}},eh=({chunks:e,objectMode:t,encoding:r,lines:i,stripFinalNewline:n,fdNumber:s})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:En(e)};const o=((e,t)=>((e,t)=>{if("utf8"===t&&e.every((e=>"string"==typeof e)))return e;const r=new fn.StringDecoder(t),i=e.map((e=>"string"==typeof e?bn(e):e)).map((e=>r.write(e))),n=r.end();return""===n?i:[...i,n]})(e,t).join(""))(e,r);return i[s]?{serializedResult:o,finalResult:ul(o,!n[s],t)}:{serializedResult:o}},th=({serializedResult:e,fdNumber:t,state:r,verboseInfo:i,encoding:n,stdioItems:s,objectMode:o})=>{if(!Yl({stdioItems:s,encoding:n,verboseInfo:i,fdNumber:t}))return;const a=ul(e,!1,o);try{((e,t,r)=>{for(const i of e)Ql(i,t,r)})(a,t,i)}catch(e){r.error??=e}},rh=(e,t,r)=>{for(const{path:i,append:n}of t.filter((({type:e})=>ac.has(e)))){const t="string"==typeof i?i:i.toString();n||r.has(t)?(0,xi.appendFileSync)(i,e):(r.add(t),(0,xi.writeFileSync)(i,e))}},ih=async e=>{try{return await(0,bo.once)(e,"exit")}catch{return ih(e)}},nh=async e=>{const[t,r]=await e;if(!sh(t,r)&&oh(t,r))throw new Gs;return[t,r]},sh=(e,t)=>void 0===e&&void 0===t,oh=(e,t)=>0!==e||null!==t,ah=(e,t,r)=>void 0!==e?e:oh(t,r)?new Gs:void 0,uh=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,ch=({ipc:e,ipcInput:t,detached:r,cancelSignal:i})=>{t&&lh("ipcInput"),e&&lh("ipc: true"),r&&lh("detached: true"),i&&lh("cancelSignal")},lh=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},hh=({file:e,commandArguments:t,options:r,command:i,escapedCommand:n,verboseInfo:s,fileDescriptors:o,startTime:a})=>{const u=dh({file:e,commandArguments:t,options:r,command:i,escapedCommand:n,fileDescriptors:o,startTime:a});if(u.failed)return u;const{resultError:c,exitCode:l,signal:h,timedOut:d,isMaxBuffer:p}=(({error:e,status:t,signal:r,output:i},{maxBuffer:n})=>{const s=ah(e,t,r),o="ETIMEDOUT"===s?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some((e=>null!==e&&e.length>Eu(r))))(s,i,n);return{resultError:s,exitCode:t,signal:r,timedOut:o,isMaxBuffer:a}})(u,r),{output:f,error:m=c}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:i,verboseInfo:n})=>{if(null===t)return{output:Array.from({length:3})};const s={},o=new Set([]);return{output:t.map(((t,a)=>(({result:e,fileDescriptors:t,fdNumber:r,state:i,outputFiles:n,isMaxBuffer:s,verboseInfo:o},{buffer:a,encoding:u,lines:c,stripFinalNewline:l,maxBuffer:h})=>{if(null===e)return;const d=((e,t,r)=>{if(!t)return e;const i=Eu(r);return e.length>i?e.slice(0,i):e})(e,s,h),p=Dn(d),{stdioItems:f,objectMode:m}=t[r],g=Xl([p],f,u,i),{serializedResult:D,finalResult:y=D}=eh({chunks:g,objectMode:m,encoding:u,lines:c,stripFinalNewline:l,fdNumber:r});th({serializedResult:D,fdNumber:r,state:i,verboseInfo:o,encoding:u,stdioItems:f,objectMode:m});const b=a[r]?y:void 0;try{return void 0===i.error&&rh(D,f,n),b}catch(e){return i.error=e,b}})({result:t,fileDescriptors:e,fdNumber:a,state:s,outputFiles:o,isMaxBuffer:i,verboseInfo:n},r))),...s}})({fileDescriptors:o,syncResult:u,options:r,isMaxBuffer:p,verboseInfo:s}),g=f.map(((e,t)=>nl(e,r,t))),D=nl((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,nl(t,r,"all")]:Array.isArray(t)?[nl(e,r,"all"),...t]:gn(e)&&gn(t)?Cn([e,t]):`${e}${t}`})(f,r),r,"all");return fh({error:m,exitCode:l,signal:h,timedOut:d,isMaxBuffer:p,stdio:g,all:D,options:r,command:i,escapedCommand:n,startTime:a})},dh=({file:e,commandArguments:t,options:r,command:i,escapedCommand:n,fileDescriptors:s,startTime:o})=>{try{((e,t)=>{for(const r of(e=>new Set(Object.entries(e).filter((([,{direction:e}])=>"input"===e)).map((([e])=>Number(e)))))(e))zl(e,r,t)})(s,r);const i=ph(r);return(0,Si.spawnSync)(e,t,i)}catch(e){return Ou({error:e,command:i,escapedCommand:n,fileDescriptors:s,options:r,startTime:o,isSync:!0})}},ph=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:Eu(t)}),fh=({error:e,exitCode:t,signal:r,timedOut:i,isMaxBuffer:n,stdio:s,all:o,options:a,command:u,escapedCommand:c,startTime:l})=>void 0===e?xu({command:u,escapedCommand:c,stdio:s,all:o,ipcOutput:[],options:a,startTime:l}):_u({error:e,command:u,escapedCommand:c,timedOut:i,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:n,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:s,all:o,ipcOutput:[],options:a,startTime:l,isSync:!0}),mh=({anyProcess:e,channel:t,isSubprocess:r,ipc:i},{reference:n=!0,filter:s}={})=>(Fo({methodName:"getOneMessage",isSubprocess:r,ipc:i,isConnected:ra(e)}),gh({anyProcess:e,channel:t,isSubprocess:r,filter:s,reference:n})),gh=async({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:n})=>{Vo(t,n);const s=Xo(e,t,r),o=new AbortController;try{return await Promise.race([Dh(s,i,o),yh(s,r,o),bh(s,r,o)])}catch(t){throw Io(e),t}finally{o.abort(),Yo(t,n)}},Dh=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await(0,bo.once)(e,"message",{signal:r});return t}for await(const[i]of(0,bo.on)(e,"message",{signal:r}))if(t(i))return i},yh=async(e,t,{signal:r})=>{await(0,bo.once)(e,"disconnect",{signal:r}),(e=>{throw new Error(`${Ao("getOneMessage",e)} could not complete: the ${Mo(e)} exited or disconnected.`)})(t)},bh=async(e,t,{signal:r})=>{const[i]=await(0,bo.once)(e,"strict:error",{signal:r});throw xo(i,t)},wh=({anyProcess:e,channel:t,isSubprocess:r,ipc:i},{reference:n=!0}={})=>vh({anyProcess:e,channel:t,isSubprocess:r,ipc:i,shouldAwait:!r,reference:n}),vh=({anyProcess:e,channel:t,isSubprocess:r,ipc:i,shouldAwait:n,reference:s})=>{Fo({methodName:"getEachMessage",isSubprocess:r,ipc:i,isConnected:ra(e)}),Vo(t,s);const o=Xo(e,t,r),a=new AbortController,u={};return Eh(e,o,a),Fh({ipcEmitter:o,isSubprocess:r,controller:a,state:u}),Ch({anyProcess:e,channel:t,ipcEmitter:o,isSubprocess:r,shouldAwait:n,controller:a,state:u,reference:s})},Eh=async(e,t,r)=>{try{await(0,bo.once)(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},Fh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:i})=>{try{const[n]=await(0,bo.once)(e,"strict:error",{signal:r.signal});i.error=xo(n,t),r.abort()}catch{}},Ch=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:i,shouldAwait:n,controller:s,state:o,reference:a}){try{for await(const[e]of(0,bo.on)(r,"message",{signal:s.signal}))Sh(o),yield e}catch{Sh(o)}finally{s.abort(),Yo(t,a),i||Io(e),n&&await e}},Sh=({error:e})=>{if(e)throw e},xh=(e,t,r)=>({sendMessage:ga.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:mh.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:wh.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),Oh=()=>{const e=new ol.PassThrough;return e.end(),e},_h=()=>new ol.Readable({read(){}}),Ah=()=>new ol.Writable({write(){}}),Th=()=>new ol.Duplex({read(){},write(){}}),Mh=async(e,t,r)=>Bu(e,t,r),Ih=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${hc[e]}.`)},kh={fileNumber:Ih,generator:Wl,asyncGenerator:Wl,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const i=t||r;return{stream:ol.Duplex.fromWeb(e,{objectMode:i})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},jh={input:{...kh,fileUrl:({value:e})=>({stream:(0,xi.createReadStream)(e)}),filePath:({value:{file:e}})=>({stream:(0,xi.createReadStream)(e)}),webStream:({value:e})=>({stream:ol.Readable.fromWeb(e)}),iterable:({value:e})=>({stream:ol.Readable.from(e)}),asyncIterable:({value:e})=>({stream:ol.Readable.from(e)}),string:({value:e})=>({stream:ol.Readable.from(e)}),uint8Array:({value:e})=>({stream:ol.Readable.from(bl.Buffer.from(e))})},output:{...kh,fileUrl:({value:e})=>({stream:(0,xi.createWriteStream)(e)}),filePath:({value:{file:e,append:t}})=>({stream:(0,xi.createWriteStream)(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:ol.Writable.fromWeb(e)}),iterable:Ih,asyncIterable:Ih,string:Ih,uint8Array:Ih}},Bh=e(import.meta.url)("node:stream/promises");function Ph(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Wh(t);const t=e.some((({readableObjectMode:e})=>e)),r=Rh(e,t),i=new $h({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)i.add(t);return i}const Rh=(e,t)=>{if(0===e.length)return(0,ol.getDefaultHighWaterMark)(t);const r=e.filter((({readableObjectMode:e})=>e===t)).map((({readableHighWaterMark:e})=>e));return Math.max(...r)};class $h extends ol.PassThrough{#$=new Set([]);#N=new Set([]);#L=new Set([]);#U;#W=Symbol("unpipe");#H=new WeakMap;add(e){if(Wh(e),this.#$.has(e))return;this.#$.add(e),this.#U??=Nh(this,this.#$,this.#W);const t=Hh({passThroughStream:this,stream:e,streams:this.#$,ended:this.#N,aborted:this.#L,onFinished:this.#U,unpipeEvent:this.#W});this.#H.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Wh(e),!this.#$.has(e))return!1;const t=this.#H.get(e);return void 0!==t&&(this.#H.delete(e),e.unpipe(this),await t,!0)}}const Nh=async(e,t,r)=>{Xh(e,ed);const i=new AbortController;try{await Promise.race([Lh(e,i),Uh(e,t,r,i)])}finally{i.abort(),Xh(e,-ed)}},Lh=async(e,{signal:t})=>{try{await(0,Bh.finished)(e,{signal:t,cleanup:!0})}catch(t){throw Yh(e,t),t}},Uh=async(e,t,r,{signal:i})=>{for await(const[n]of(0,bo.on)(e,"unpipe",{signal:i}))t.has(n)&&n.emit(r)},Wh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Hh=async({passThroughStream:e,stream:t,streams:r,ended:i,aborted:n,onFinished:s,unpipeEvent:o})=>{Xh(e,td);const a=new AbortController;try{await Promise.race([Gh(s,t,a),zh({passThroughStream:e,stream:t,streams:r,ended:i,aborted:n,controller:a}),Vh({stream:t,streams:r,ended:i,aborted:n,unpipeEvent:o,controller:a})])}finally{a.abort(),Xh(e,-td)}r.size>0&&r.size===i.size+n.size&&(0===i.size&&n.size>0?Jh(e):qh(e))},Gh=async(e,t,{signal:r})=>{try{await e,r.aborted||Jh(t)}catch(e){r.aborted||Yh(t,e)}},zh=async({passThroughStream:e,stream:t,streams:r,ended:i,aborted:n,controller:{signal:s}})=>{try{await(0,Bh.finished)(t,{signal:s,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&i.add(t)}catch(i){if(s.aborted||!r.has(t))return;Kh(i)?n.add(t):Zh(e,i)}},Vh=async({stream:e,streams:t,ended:r,aborted:i,unpipeEvent:n,controller:{signal:s}})=>{if(await(0,bo.once)(e,n,{signal:s}),!e.readable)return(0,bo.once)(s,"abort",{signal:s});t.delete(e),r.delete(e),i.delete(e)},qh=e=>{e.writable&&e.end()},Yh=(e,t)=>{Kh(t)?Jh(e):Zh(e,t)},Kh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Jh=e=>{(e.readable||e.writable)&&e.destroy()},Zh=(e,t)=>{e.destroyed||(e.once("error",Qh),e.destroy(t))},Qh=()=>{},Xh=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},ed=2,td=1,rd=(e,t)=>{e.pipe(t),id(e,t),sd(e,t)},id=async(e,t)=>{if(!kn(e)&&!kn(t)){try{await(0,Bh.finished)(e,{cleanup:!0,readable:!0,writable:!1})}catch{}nd(t)}},nd=e=>{e.writable&&e.end()},sd=async(e,t)=>{if(!kn(e)&&!kn(t)){try{await(0,Bh.finished)(t,{cleanup:!0,readable:!1,writable:!0})}catch{}od(e)}},od=e=>{e.readable&&e.destroy()},ad=(e,t,r,i)=>{"output"===r?rd(e.stdio[i],t):rd(t,e.stdio[i]);const n=ud[i];void 0!==n&&(e[n]=t),e.stdio[i]=t},ud=["stdin","stdout","stderr"],cd=({subprocess:e,stream:t,direction:r,fdNumber:i,pipeGroups:n,controller:s})=>{if(void 0===t)return;ld(t,s);const[o,a]="output"===r?[t,e.stdio[i]]:[e.stdio[i],t],u=n.get(o)??[];n.set(o,[...u,a])},ld=(e,{signal:t})=>{kn(e)&&zo(e,hd,t)},hd=2,dd=(e,t,r,...i)=>{if(Array.isArray(r))return{destination:t(pd,e)(r,...i),pipeOptions:e};if("string"==typeof r||r instanceof URL||hn(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[n,s,o]=pn(r,...i);return{destination:t(pd)(n,s,o),pipeOptions:o}}if(Po.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:i[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},pd=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),fd=({error:e,fileDescriptors:t,sourceOptions:r,startTime:i})=>Ou({error:e,command:md,escapedCommand:md,fileDescriptors:t,options:r,startTime:i,isSync:!1}),md="source.pipe(destination)",gd=async e=>{const[{status:t,reason:r,value:i=r},{status:n,reason:s,value:o=s}]=await e;if(o.pipedFrom.includes(i)||o.pipedFrom.push(i),"rejected"===n)throw o;if("rejected"===t)throw i;return o},Dd=new WeakMap,yd=(e,t)=>void 0===e?[]:[bd(e,t)],bd=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:i,sourceOptions:n,startTime:s})=>{await(0,Yi.aborted)(e,t),await r.remove(t);const o=new Error("Pipe canceled by `unpipeSignal` option.");throw fd({error:o,fileDescriptors:i,sourceOptions:n,startTime:s})},wd=(e,...t)=>{if(un(t[0]))return wd.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...i}=(({source:e,sourcePromise:t,boundOptions:r,createNested:i},...n)=>{const s=Ps(),{destination:o,destinationStream:a,destinationError:u,from:c,unpipeSignal:l}=((e,t,r)=>{try{const{destination:i,pipeOptions:{from:n,to:s,unpipeSignal:o}={}}=dd(e,t,...r);return{destination:i,destinationStream:jo(i,s),from:n,unpipeSignal:o}}catch(e){return{destinationError:e}}})(r,i,n),{sourceStream:h,sourceError:d}=((e,t)=>{try{return{sourceStream:Bo(e,t)}}catch(e){return{sourceError:e}}})(e,c),{options:p,fileDescriptors:f}=Po.get(e);return{sourcePromise:t,sourceStream:h,sourceOptions:p,sourceError:d,destination:o,destinationStream:a,destinationError:u,unpipeSignal:l,fileDescriptors:f,startTime:s}})(e,...t),n=vd({...i,destination:r});return n.pipe=wd.bind(void 0,{...e,source:r,sourcePromise:n,boundOptions:{}}),n},vd=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:i,destination:n,destinationStream:s,destinationError:o,unpipeSignal:a,fileDescriptors:u,startTime:c})=>{const l=Ed(e,n);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:i,fileDescriptors:n,sourceOptions:s,startTime:o})=>{const a=(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:i})=>void 0!==t&&void 0!==i?i:void 0!==i?(od(e),i):void 0!==t?(nd(r),t):void 0)({sourceStream:e,sourceError:t,destinationStream:r,destinationError:i});if(void 0!==a)throw fd({error:a,fileDescriptors:n,sourceOptions:s,startTime:o})})({sourceStream:t,sourceError:i,destinationStream:s,destinationError:o,fileDescriptors:u,sourceOptions:r,startTime:c});const h=new AbortController;try{const e=((e,t,r)=>{const i=Dd.has(t)?((e,t)=>{const r=Dd.get(t);return r.add(e),r})(e,t):((e,t)=>{const r=Ph([e]);return rd(r,t),Dd.set(t,r),r})(e,t);return zo(e,2,r.signal),zo(t,1,r.signal),(async e=>{try{await(0,Bh.finished)(e,{cleanup:!0,readable:!1,writable:!0})}catch{}Dd.delete(e)})(t),i})(t,s,h);return await Promise.race([gd(l),...yd(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:u,startTime:c})])}finally{h.abort()}},Ed=(e,t)=>Promise.allSettled([e,t]),Fd=e=>e,Cd=()=>{},Sd=({contents:e})=>e,xd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Od=e=>e.length,_d={init:()=>({contents:[]}),convertChunk:{string:Fd,buffer:Fd,arrayBuffer:Fd,dataView:Fd,typedArray:Fd,others:Fd},getSize:()=>1,truncateChunk:Cd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:Cd,finalize:Sd},Ad=new TextEncoder,Td=e=>new Uint8Array(e),Md=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Id=e=>kd**Math.ceil(Math.log(e)/Math.log(kd)),kd=2,jd=()=>"resize"in ArrayBuffer.prototype,Bd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>Ad.encode(e),buffer:Td,arrayBuffer:Td,dataView:Md,typedArray:Md,others:xd},getSize:Od,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},i)=>{const n=jd()?((e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Id(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r})(t,i):((e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Id(t));return new Uint8Array(r).set(new Uint8Array(e),0),r})(t,i);return new Uint8Array(n).set(e,r),n},getFinalChunk:Cd,finalize:({contents:e,length:t})=>jd()?e:e.slice(0,t)},Pd=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Rd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:Fd,buffer:Pd,arrayBuffer:Pd,dataView:Pd,typedArray:Pd,others:xd},getSize:Od,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:Sd},$d=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:i,encoding:n,preserveNewlines:s})=>{const o=new AbortController;return Nd(t,o),Wd({stream:e,controller:o,binary:r,shouldEncode:!e.readableObjectMode&&i,encoding:n,shouldSplit:!e.readableObjectMode,preserveNewlines:s})},Nd=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Ld=({stream:e,onStreamEnd:t,lines:r,encoding:i,stripFinalNewline:n,allMixed:s})=>{const o=new AbortController;Ud(t,o,e);const a=e.readableObjectMode&&!s;return Wd({stream:e,controller:o,binary:"buffer"===i,shouldEncode:!a,encoding:i,shouldSplit:!a&&r,preserveNewlines:!n})},Ud=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},Wd=({stream:e,controller:t,binary:r,shouldEncode:i,encoding:n,shouldSplit:s,preserveNewlines:o})=>{const a=(0,bo.on)(e,"data",{signal:t.signal,highWaterMark:Gd,highWatermark:Gd});return zd({onStdoutChunk:a,controller:t,binary:r,shouldEncode:i,encoding:n,shouldSplit:s,preserveNewlines:o})},Hd=(0,ol.getDefaultHighWaterMark)(!0),Gd=Hd,zd=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:i,encoding:n,shouldSplit:s,preserveNewlines:o}){const a=Vd({binary:r,shouldEncode:i,encoding:n,shouldSplit:s,preserveNewlines:o});try{for await(const[t]of e)yield*$l(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*Nl(a)}},Vd=({binary:e,shouldEncode:t,encoding:r,shouldSplit:i,preserveNewlines:n})=>[xl(e,r,!t),al(e,n,!i,{})].filter(Boolean),qd=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:i,buffer:n,maxBuffer:s,lines:o,allMixed:a,stripFinalNewline:u,verboseInfo:c,streamInfo:l})=>{const h=Yd({stream:e,onStreamEnd:t,fdNumber:r,encoding:i,allMixed:a,verboseInfo:c,streamInfo:l});if(!n)return void await Promise.all([Kd(e),h]);const d=sl(u,r),p=Ld({stream:e,onStreamEnd:t,lines:o,encoding:i,stripFinalNewline:d,allMixed:a}),[f]=await Promise.all([Jd({stream:e,iterable:p,fdNumber:r,encoding:i,maxBuffer:s,lines:o}),h]);return f},Yd=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:i,allMixed:n,verboseInfo:s,streamInfo:{fileDescriptors:o}})=>{if(!Yl({stdioItems:o[r]?.stdioItems,encoding:i,verboseInfo:s,fdNumber:r}))return;const a=Ld({stream:e,onStreamEnd:t,lines:!0,encoding:i,stripFinalNewline:!0,allMixed:n});await(async(e,t,r,i)=>{for await(const n of e)Zl(t)||Ql(n,r,i)})(a,e,r,s)},Kd=async e=>{await(0,Hs.setImmediate)(),null===e.readableFlowing&&e.resume()},Jd=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:i,encoding:n,maxBuffer:s,lines:o})=>{try{return t||o?await async function(e,t){return fu(e,_d,t)}(r,{maxBuffer:s}):"buffer"===n?new Uint8Array(await async function(e,t){return fu(e,Bd,t)}(r,{maxBuffer:s})):await async function(e,t){return fu(e,Rd,t)}(r,{maxBuffer:s})}catch(r){return Qd((({error:e,stream:t,readableObjectMode:r,lines:i,encoding:n,fdNumber:s})=>{if(!(e instanceof wu))throw e;if("all"===s)return e;const o=((e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters")(r,i,n);throw e.maxBufferInfo={fdNumber:s,unit:o},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:o,encoding:n,fdNumber:i}))}},Zd=async e=>{try{return await e}catch(e){return Qd(e)}},Qd=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===mn.call(t)?new Uint8Array(e):e;var t},Xd=async(e,t,r,{isSameDirection:i,stopOnExit:n=!1}={})=>{const s=ep(e,r),o=new AbortController;try{await Promise.race([...n?[r.exitPromise]:[],(0,Bh.finished)(e,{cleanup:!0,signal:o.signal})])}catch(e){s.stdinCleanedUp||ip(e,t,r,i)}finally{o.abort()}},ep=(e,{originalStreams:[t],subprocess:r})=>{const i={stdinCleanedUp:!1};return e===t&&tp(e,r,i),i},tp=(e,t,r)=>{const{_destroy:i}=e;e._destroy=(...n)=>{rp(t,r),i.call(e,...n)}},rp=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},ip=(e,t,r,i)=>{if(!np(e,t,r,i))throw e},np=(e,t,r,i=!0)=>r.propagating?ap(e)||op(e):(r.propagating=!0,sp(r,t)===i?ap(e):op(e)),sp=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,op=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,ap=e=>"EPIPE"===e?.code,up=async({stream:e,fdNumber:t,encoding:r,buffer:i,maxBuffer:n,lines:s,allMixed:o,stripFinalNewline:a,verboseInfo:u,streamInfo:c})=>{if(!e)return;const l=Xd(e,t,c);if(sp(c,t))return void await l;const[h]=await Promise.all([qd({stream:e,onStreamEnd:l,fdNumber:t,encoding:r,buffer:i,maxBuffer:n,lines:s,allMixed:o,stripFinalNewline:a,verboseInfo:u,streamInfo:c}),l]);return h},cp=({stdout:e,stderr:t,all:r},[,i,n])=>{const s=i||n;return s?i?n?{stream:r,buffer:s}:{stream:e,buffer:s}:{stream:t,buffer:s}:{stream:r,buffer:s}},lp=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,hp=(e,t)=>{const r=Is(e);_s({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},dp=async(e,t)=>(await Promise.allSettled([e]),t),pp=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:i,lines:n,timeoutDuration:s,cancelSignal:o,gracefulCancel:a,forceKillAfterDelay:u,stripFinalNewline:c,ipc:l,ipcInput:h},context:d,verboseInfo:p,fileDescriptors:f,originalStreams:m,onInternalError:g,controller:D})=>{const y=(async(e,t)=>{const[r,i]=await(async e=>{const[t,r]=await Promise.allSettled([(0,bo.once)(e,"spawn"),(0,bo.once)(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?ih(e):r.value})(e);return t.isForcefullyTerminated??=!1,[r,i]})(e,d),b={originalStreams:m,fileDescriptors:f,subprocess:e,exitPromise:y,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:i,lines:n,stripFinalNewline:s,verboseInfo:o,streamInfo:a})=>e.stdio.map(((e,u)=>up({stream:e,fdNumber:u,encoding:t,buffer:r[u],maxBuffer:i[u],lines:n[u],allMixed:!1,stripFinalNewline:s,verboseInfo:o,streamInfo:a}))))({subprocess:e,encoding:t,buffer:r,maxBuffer:i,lines:n,stripFinalNewline:c,verboseInfo:p,streamInfo:b}),v=(({subprocess:e,encoding:t,buffer:r,maxBuffer:i,lines:n,stripFinalNewline:s,verboseInfo:o,streamInfo:a})=>up({...cp(e,r),fdNumber:"all",encoding:t,maxBuffer:i[1]+i[2],lines:n[1]||n[2],allMixed:lp(e),stripFinalNewline:s,verboseInfo:o,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:i,lines:n,stripFinalNewline:c,verboseInfo:p,streamInfo:b}),E=[],F=(async({subprocess:e,buffer:t,maxBuffer:r,ipc:i,ipcOutput:n,verboseInfo:s})=>{if(!i)return n;const o=(e=>Zn(e,"ipc"))(s),a=Kn(t,"ipc"),u=Kn(r,"ipc");for await(const t of vh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:i,shouldAwait:!1,reference:!0}))a&&(vu(0,n,u),n.push(t)),o&&hp(t,s);return n})({subprocess:e,buffer:r,maxBuffer:i,ipc:l,ipcOutput:E,verboseInfo:p}),C=fp(m,e,b),S=mp(f,b);try{return await Promise.race([Promise.all([{},nh(y),Promise.all(w),v,F,Ba(e,h),...C,...S]),g,gp(e,D),...Ma(e,s,d,D),...vo({subprocess:e,cancelSignal:o,gracefulCancel:a,context:d,controller:D}),..._a({subprocess:e,cancelSignal:o,gracefulCancel:a,forceKillAfterDelay:u,context:d,controller:D})])}catch(e){return d.terminationReason??="other",Promise.all([{error:e},y,Promise.all(w.map((e=>Zd(e)))),Zd(v),dp(F,E),Promise.allSettled(C),Promise.allSettled(S)])}},fp=(e,t,r)=>e.map(((e,i)=>e===t.stdio[i]?void 0:Xd(e,i,r))),mp=(e,t)=>e.flatMap((({stdioItems:e},r)=>e.filter((({value:e,stream:t=e})=>Qa(t,{checkOpen:!1})&&!kn(t))).map((({type:e,value:i,stream:n=i})=>Xd(n,r,t,{isSameDirection:oc.has(e),stopOnExit:"native"===e}))))),gp=async(e,{signal:t})=>{const[r]=await(0,bo.once)(e,"error",{signal:t});throw r},Dp=(e,t,r)=>{const i=e[r];i.has(t)||i.set(t,[]);const n=i.get(t),s=ko();return n.push(s),{resolve:s.resolve.bind(s),promises:n}},yp=async({resolve:e,promises:t},r)=>{e();const[i]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!i},bp=async e=>{if(void 0!==e)try{await wp(e)}catch{}},wp=async e=>{await(0,Bh.finished)(e,{cleanup:!0,readable:!1,writable:!0})},vp=async e=>{await(0,Bh.finished)(e,{cleanup:!0,readable:!0,writable:!1})},Ep=async(e,t)=>{if(await e,t)throw t},Fp=(e,t,r)=>{r&&!op(r)?e.destroy(r):t&&e.destroy()},Cp=({subprocess:e,concurrentStreams:t,encoding:r},{from:i,binary:n=!0,preserveNewlines:s=!0}={})=>{const o=n||Ra.has(r),{subprocessStdout:a,waitReadableDestroy:u}=Sp(e,i,t),{readableEncoding:c,readableObjectMode:l,readableHighWaterMark:h}=xp(a,o),{read:d,onStdoutDataDone:p}=Op({subprocessStdout:a,subprocess:e,binary:o,encoding:r,preserveNewlines:s}),f=new ol.Readable({read:d,destroy:(0,Yi.callbackify)(Tp.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:u})),highWaterMark:h,objectMode:l,encoding:c});return Ap({subprocessStdout:a,onStdoutDataDone:p,readable:f,subprocess:e}),f},Sp=(e,t,r)=>{const i=Bo(e,t);return{subprocessStdout:i,waitReadableDestroy:Dp(r,i,"readableDestroy")}},xp=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},i)=>i?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Hd},Op=({subprocessStdout:e,subprocess:t,binary:r,encoding:i,preserveNewlines:n})=>{const s=ko(),o=$d({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:i,preserveNewlines:n});return{read(){_p(this,o,s)},onStdoutDataDone:s}},_p=async(e,t,r)=>{try{const{value:i,done:n}=await t.next();n?r.resolve():e.push(i)}catch{}},Ap=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:i,subprocessStdin:n})=>{try{await vp(e),await i,await bp(n),await t,r.readable&&r.push(null)}catch(e){await bp(n),Mp(r,e)}},Tp=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},i)=>{await yp(r,t)&&(Mp(e,i),await Ep(t,i))},Mp=(e,t)=>{Fp(e,e.readable,t)},Ip=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:i,waitWritableFinal:n,waitWritableDestroy:s}=kp(e,r,t),o=new ol.Writable({...jp(i,e,n),destroy:(0,Yi.callbackify)($p.bind(void 0,{subprocessStdin:i,subprocess:e,waitWritableFinal:n,waitWritableDestroy:s})),highWaterMark:i.writableHighWaterMark,objectMode:i.writableObjectMode});return Rp(i,o),o},kp=(e,t,r)=>{const i=jo(e,t);return{subprocessStdin:i,waitWritableFinal:Dp(r,i,"writableFinal"),waitWritableDestroy:Dp(r,i,"writableDestroy")}},jp=(e,t,r)=>({write:Bp.bind(void 0,e),final:(0,Yi.callbackify)(Pp.bind(void 0,e,t,r))}),Bp=(e,t,r,i)=>{e.write(t,r)?i():e.once("drain",i)},Pp=async(e,t,r)=>{await yp(r,t)&&(e.writable&&e.end(),await t)},Rp=async(e,t,r)=>{try{await wp(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await vp(e)}catch{}})(r),Np(t,e)}},$p=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:i},n)=>{await yp(r,t),await yp(i,t)&&(Np(e,n),await Ep(t,n))},Np=(e,t)=>{Fp(e,e.writable,t)},Lp=({subprocess:e,concurrentStreams:t,encoding:r},{from:i,to:n,binary:s=!0,preserveNewlines:o=!0}={})=>{const a=s||Ra.has(r),{subprocessStdout:u,waitReadableDestroy:c}=Sp(e,i,t),{subprocessStdin:l,waitWritableFinal:h,waitWritableDestroy:d}=kp(e,n,t),{readableEncoding:p,readableObjectMode:f,readableHighWaterMark:m}=xp(u,a),{read:g,onStdoutDataDone:D}=Op({subprocessStdout:u,subprocess:e,binary:a,encoding:r,preserveNewlines:o}),y=new ol.Duplex({read:g,...jp(l,e,h),destroy:(0,Yi.callbackify)(Up.bind(void 0,{subprocessStdout:u,subprocessStdin:l,subprocess:e,waitReadableDestroy:c,waitWritableFinal:h,waitWritableDestroy:d})),readableHighWaterMark:m,writableHighWaterMark:l.writableHighWaterMark,readableObjectMode:f,writableObjectMode:l.writableObjectMode,encoding:p});return Ap({subprocessStdout:u,onStdoutDataDone:D,readable:y,subprocess:e,subprocessStdin:l}),Rp(l,y,u),y},Up=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:i,waitWritableFinal:n,waitWritableDestroy:s},o)=>{await Promise.all([Tp({subprocessStdout:e,subprocess:r,waitReadableDestroy:i},o),$p({subprocessStdin:t,subprocess:r,waitWritableFinal:n,waitWritableDestroy:s},o)])},Wp=(e,t,{from:r,binary:i=!1,preserveNewlines:n=!1}={})=>{const s=i||Ra.has(t),o=Bo(e,r),a=$d({subprocessStdout:o,subprocess:e,binary:s,shouldEncode:!0,encoding:t,preserveNewlines:n});return Hp(a,o,e)},Hp=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Gp=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=Cp.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=Ip.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=Lp.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Wp.bind(void 0,e,t),e[Symbol.asyncIterator]=Wp.bind(void 0,e,t,{})},zp=(async()=>{})().constructor.prototype,Vp=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(zp,e)])),qp=(e,t,r)=>{const{command:i,escapedCommand:n,startTime:s,verboseInfo:o}=$s(e,t,r),{file:a,commandArguments:u,options:c}=Wa(e,t,r),l=Yp(c),h=((e,t)=>Lc(jh,e,t,!1))(l,o);return{file:a,commandArguments:u,command:i,escapedCommand:n,startTime:s,verboseInfo:o,options:l,fileDescriptors:h}},Yp=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Kp=({file:e,commandArguments:t,options:r,startTime:i,verboseInfo:n,command:s,escapedCommand:o,fileDescriptors:a})=>{let u;try{u=(0,Si.spawn)(e,t,r)}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:i,options:n,startTime:s,verboseInfo:o})=>{Qc(i);const a=new Si.ChildProcess;((e,t)=>{const r=Oh(),i=Oh(),n=Oh(),s=Array.from({length:t.length-3},Oh),o=Oh(),a=[r,i,n,...s];Object.assign(e,{stdin:r,stdout:i,stderr:n,all:o,stdio:a})})(a,i),Object.assign(a,{readable:_h,writable:Ah,duplex:Th});const u=Ou({error:e,command:t,escapedCommand:r,fileDescriptors:i,options:n,startTime:s,isSync:!1});return{subprocess:a,promise:Mh(u,o,n)}})({error:e,command:s,escapedCommand:o,fileDescriptors:a,options:r,startTime:i,verboseInfo:n})}const c=new AbortController;(0,bo.setMaxListeners)(Number.POSITIVE_INFINITY,c.signal);const l=[...u.stdio];((e,t,r)=>{const i=new Map;for(const[n,{stdioItems:s,direction:o}]of Object.entries(t)){for(const{stream:t}of s.filter((({type:e})=>oc.has(e))))ad(e,t,o,n);for(const{stream:t}of s.filter((({type:e})=>!oc.has(e))))cd({subprocess:e,stream:t,direction:o,fdNumber:n,pipeGroups:i,controller:r})}for(const[e,t]of i.entries()){const r=1===t.length?t[0]:Ph(t);rd(r,e)}})(u,a,c),((e,{cleanup:t,detached:r},{signal:i})=>{if(!t||r)return;const n=ii((()=>{e.kill()}));(0,bo.addAbortListener)(i,(()=>{n()}))})(u,r,c);const h={},d=ko();return u.kill=fo.bind(void 0,{kill:u.kill.bind(u),options:r,onInternalError:d,context:h,controller:c}),u.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?Ph([e,t].filter(Boolean)):void 0)(u,r),Gp(u,r),((e,{ipc:t})=>{Object.assign(e,xh(e,!1,t))})(u,r),{subprocess:u,promise:Jp({subprocess:u,options:r,startTime:i,verboseInfo:n,fileDescriptors:a,originalStreams:l,command:s,escapedCommand:o,context:h,onInternalError:d,controller:c})}},Jp=async({subprocess:e,options:t,startTime:r,verboseInfo:i,fileDescriptors:n,originalStreams:s,command:o,escapedCommand:a,context:u,onInternalError:c,controller:l})=>{const[h,[d,p],f,m,g]=await pp({subprocess:e,options:t,context:u,verboseInfo:i,fileDescriptors:n,originalStreams:s,onInternalError:c,controller:l});l.abort(),c.resolve();const D=f.map(((e,r)=>nl(e,t,r))),y=nl(m,t,"all"),b=Zp({errorInfo:h,exitCode:d,signal:p,stdio:D,all:y,ipcOutput:g,context:u,options:t,command:o,escapedCommand:a,startTime:r});return Bu(b,i,t)},Zp=({errorInfo:e,exitCode:t,signal:r,stdio:i,all:n,ipcOutput:s,context:o,options:a,command:u,escapedCommand:c,startTime:l})=>"error"in e?_u({error:e.error,command:u,escapedCommand:c,timedOut:"timeout"===o.terminationReason,isCanceled:"cancel"===o.terminationReason||"gracefulCancel"===o.terminationReason,isGracefullyCanceled:"gracefulCancel"===o.terminationReason,isMaxBuffer:e.error instanceof wu,isForcefullyTerminated:o.isForcefullyTerminated,exitCode:t,signal:r,stdio:i,all:n,ipcOutput:s,options:a,startTime:l,isSync:!1}):xu({command:u,escapedCommand:c,stdio:i,all:n,ipcOutput:s,options:a,startTime:l}),Qp=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map((([t,r])=>[t,Xp(t,e[t],r)])));return{...e,...r}},Xp=(e,t,r)=>ef.has(e)&&un(t)&&un(r)?{...t,...r}:r,ef=new Set(["env",...Yn]),tf=(e,t,r,i)=>{const n=(e,t,i)=>tf(e,t,r,i),s=(...s)=>rf({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:i,createNested:n},...s);return void 0!==i&&i(s,n,t),s},rf=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:i,createNested:n},s,...o)=>{if(un(s))return n(e,Qp(r,s),i);const{file:a,commandArguments:u,options:c,isSync:l}=nf({mapArguments:e,firstArgument:s,nextArguments:o,deepOptions:t,boundOptions:r});return l?((e,t,r)=>{const{file:i,commandArguments:n,command:s,escapedCommand:o,startTime:a,verboseInfo:u,options:c,fileDescriptors:l}=((e,t,r)=>{const{command:i,escapedCommand:n,startTime:s,verboseInfo:o}=$s(e,t,r),a=uh(r),{file:u,commandArguments:c,options:l}=Wa(e,t,a);ch(l);const h=((e,t)=>Lc(il,e,t,!0))(l,o);return{file:u,commandArguments:c,command:i,escapedCommand:n,startTime:s,verboseInfo:o,options:l,fileDescriptors:h}})(e,t,r),h=hh({file:i,commandArguments:n,options:c,command:s,escapedCommand:o,verboseInfo:u,fileDescriptors:l,startTime:a});return Bu(h,u,c)})(a,u,c):((e,t,r,i)=>{const{file:n,commandArguments:s,command:o,escapedCommand:a,startTime:u,verboseInfo:c,options:l,fileDescriptors:h}=qp(e,t,r),{subprocess:d,promise:p}=Kp({file:n,commandArguments:s,options:l,startTime:u,verboseInfo:c,command:o,escapedCommand:a,fileDescriptors:h});return d.pipe=wd.bind(void 0,{source:d,sourcePromise:p,boundOptions:{},createNested:i}),((e,t)=>{for(const[r,i]of Vp){const n=i.value.bind(t);Reflect.defineProperty(e,r,{...i,value:n})}})(d,p),Po.set(d,{options:l,fileDescriptors:h}),d})(a,u,c,n)},nf=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:i,boundOptions:n})=>{const s=(o=t,Array.isArray(o)&&Array.isArray(o.raw)?((e,t)=>{let r=[];for(const[i,n]of e.entries())r=xn({templates:e,expressions:t,tokens:r,index:i,template:n});if(0===r.length)throw new TypeError("Template script must not be empty");const[i,...n]=r;return[i,n,{}]})(t,r):[t,...r]);var o;const[a,u,c]=pn(...s),l=Qp(Qp(i,n),c),{file:h=a,commandArguments:d=u,options:p=l,isSync:f=!1}=e({file:a,commandArguments:u,options:l});return{file:h,commandArguments:d,options:p,isSync:f}},sf=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...i]=of(e);return{file:r,commandArguments:i}},of=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(af)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},af=/ +/g,uf=({options:e})=>({...cf(e),isSync:!0}),cf=e=>({options:{...lf(e),...e}}),lf=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{},hf=tf((()=>({}))),{sendMessage:df,getOneMessage:pf,getEachMessage:ff,getCancelSignal:mf}=(tf((()=>({isSync:!0}))),tf((({file:e,commandArguments:t})=>sf(e,t))),tf((({file:e,commandArguments:t})=>({...sf(e,t),isSync:!0}))),tf((({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}})),tf((({options:e})=>cf(e)),{},{preferLocal:!0},((e,t,r)=>{e.sync=t(uf,r),e.s=e.sync})),(()=>{const e=Jt,t=!0,r=void 0!==Jt.channel;return{...xh(e,t,r),getCancelSignal:va.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}})());var gf=i(5600);function Df({vue:e,react:t}){const r=t&&e||!t&&!e?"base":t?"react":"vue";return{eslintConfig:{extends:`@nice-move/eslint-config-${r}`},devDependencies:{[`@nice-move/eslint-config-${r}`]:sn["eslint-config-base"],eslint:sn.eslint}}}const yf="Add/Reset project dependencies";function bf(){const{dependencies:e={},devDependencies:t={}}=Ii();return{instructions:!1,optionsPerPage:20,message:yf,name:"Dependencies",type:e=>!1===e?null:"multiselect",choices:["tailwindcss","react","vue","typescript","commitlint","eslint","stylelint","prettier","syncpack","garou","ava","playwright","@bring-it/sftp","@bring-it/npm","best-shot"].map((r=>({title:r,value:r,selected:r in e||r in t}))),format:e=>{if(e.length>0)return t=>function(e,t={}){return(new Pr).config({pretty:!0}).source("package.json").onFail().onDone((async(r={})=>{const{devDependencies:i={},dependencies:n={}}=r,{ava:s="ava"in i,commitlint:o="commitlint"in i,eslint:a="eslint"in i,garou:u="garou"in i,prettier:c="prettier"in i,react:l="react"in n,stylelint:h="stylelint"in i,syncpack:d="syncpack"in i,typescript:p="typescript"in i,vue:f="vue"in n,tailwindcss:m="tailwindcss"in n||"tailwindcss"in i,playwright:g,"@bring-it/sftp":D="@bring-it/sftp"in i,"@bring-it/npm":y="@bring-it/npm"in i,"best-shot":b="best-shot"in i}=t,w=a||h||c||u,v=[w?"npm run lint:staged":void 0,p?"npm run lint:type":void 0,s?"npm test":void 0].filter(Boolean).map(((e,t,r)=>t===r-1?e:`${e} || exit 1`));return v.length>0&&await(new Br).onDone((()=>["#!/bin/sh","",...v,""].join("\n"))).output(".githooks/pre-commit"),o&&await(new Br).onDone((()=>["#!/bin/sh","npx --no-install nice-move lint commit",""].join("\n\n"))).output(".githooks/commit-msg"),d&&await(new Br).onDone((()=>["// @ts-check","import defineConfig from '@nice-move/syncpack-config/define.cjs';","export default defineConfig(import.meta.url, {});","// export { default } from '@nice-move/syncpack-config';"].join("\n\n"))).output("syncpack.config.mjs"),p&&await(new Pr).config({pretty:!0}).onDone((()=>({extends:"@nice-move/tsconfig/base.json",include:["./"]}))).output("tsconfig.json"),Gi(...[r,e&&(w||s||o||g||p)?{scripts:{prepare:"nice-move git hooks"}}:void 0,u?{devDependencies:{garou:sn.garou},"nice-move":{"import-groups":["nice-move-preset"]}}:void 0,p?{devDependencies:{typescript:sn.typescript,"@nice-move/tsconfig":sn.tsconfig},scripts:{"lint:type":"tsc --noEmit"}}:void 0,w||o?{devDependencies:{"@nice-move/cli":sn.cli}}:void 0,w?{scripts:{"lint:staged":"nice-move lint staged"}}:void 0,s?{devDependencies:{ava:sn.ava,...a?{"eslint-plugin-ava":sn["eslint-plugin-ava"]}:void 0},scripts:{prepublishOnly:r.private?void 0:v.join(" && ")||void 0,test:"ava --fail-fast",snapshot:"ava --fail-fast -u"}}:void 0,a?Df({react:l,vue:f}):void 0,h?{devDependencies:{"@nice-move/stylelint-config":sn["stylelint-config"],stylelint:sn.stylelint},stylelint:{extends:"@nice-move/stylelint-config"}}:void 0,d?{devDependencies:{"@nice-move/syncpack-config":sn["syncpack-config"],syncpack:sn.syncpack},scripts:{"lint:version":"syncpack lint","version:pin":"syncpack fix-mismatches"}}:void 0,c?{devDependencies:{"@nice-move/prettier-config":sn["prettier-config"],prettier:sn.prettier},prettier:"@nice-move/prettier-config"}:void 0,l?{dependencies:{react:sn.react,"react-dom":sn["react-dom"]},peerDependencies:{"@types/react":sn["@types/react"]}}:void 0,f?{dependencies:{vue:sn.vue}}:void 0,m?{dependencies:{tailwindcss:sn.tailwindcss},devDependencies:{"prettier-plugin-tailwindcss":c?sn["prettier-plugin-tailwindcss"]:void 0}}:void 0,g?{scripts:{"pretest:e2e":"npm link @playwright/test","test:e2e":"playwright test"}}:void 0,D?{devDependencies:{"@bring-it/sftp":sn["@bring-it/sftp"]}}:void 0,y?{devDependencies:{"@bring-it/npm":sn["@bring-it/npm"]}}:void 0,b?{devDependencies:{"best-shot":sn["best-shot"]},"nice-move":{globals:{BEST_SHOT:"readonly"}},scripts:{build:"best-shot prod"}}:void 0].filter(Boolean))})).output().logger(yf).catch(console.warn)}(t,Object.fromEntries(e.map((e=>[e,!0]))))}}}const wf="Initialize as git repository";function vf(){return hf("git",["init"]).then((e=>(console.log(Nr("\u221a"),wf),e)),(e=>{throw console.log($r("\xd7"),wf),e}))}function Ef({gitSupported:e,isRoot:t}){return{message:wf,name:"GitInit",initial:!0,type:r=>!1===r||!e||t?null:"confirm",format(e){if(!0===e)return vf}}}var Ff=i(1416),Cf=i(5982);const Sf=/(?<=^v?|\sv?)(?:(?:0|[1-9]\d{0,9}?)\.){2}(?:0|[1-9]\d{0,9})(?:-(?:--+)?(?:0|[1-9]\d*|\d*[a-z]+\d*)){0,100}(?=$| |\+|\.)(?:(?<=-\S+)(?:\.(?:--?|[\da-z-]*[a-z-]\d*|0|[1-9]\d*)){1,100}?)?(?!\.)(?:\+(?:[\da-z]\.?-?){1,100}?(?!\w))?(?!\+)/gi;async function xf(){const e=await hf("git",["--version"]).then((({stdout:e})=>Boolean(e))),t=e&&await hf("git",["rev-parse","--git-dir"]).then((({stdout:e})=>".git"===e)).catch((()=>!1)),r=!!t&&await hf("git",["status","--short"]).then((({stdout:e})=>e.length>0)),i=0===(0,xi.readdirSync)(process.cwd()).filter((e=>".git"!==e)).length,n=Ii(),s=process.cwd(),o={gitSupported:e,isRoot:t,isDirty:r,isEmpty:i,pkg:n,cwd:s},a=await async function({cwd:e,pkg:{author:t,description:r,license:i,name:n,private:s,version:o,workspaces:a}={}}){return[{format:Ti,initial:(0,Wt.parse)(e).base,message:"package.json \xbb name",name:"name",type:e=>!1===e||n?null:"text",validate:e=>Cf(Ti(e)||"").validForNewPackages},{format:Ti,initial:"0.0.0",message:"package.json \xbb version",name:"version",type:e=>!1===e||o?null:"text",validate:e=>Sf.test(Ti(e)||"")},{format:Ti,message:"package.json \xbb description",name:"description",type:e=>!1===e||r?null:"text"},{active:"MIT",format:e=>e?"MIT":"UNLICENSED",inactive:"UNLICENSED",initial:!0,message:"package.json \xbb license",name:"license",type:e=>!1===e||i?null:"toggle"},{type:e=>!1===e||("string"==typeof t?t:t&&t.name)?null:"text",format:Ff,initial:await Mi(t),message:"package.json \xbb author",name:"author"},{active:"true",inactive:"false",initial:!1,message:"package.json \xbb private",name:"private",format:e=>!1===e?void 0:e,type:e=>!1===e||void 0!==s?null:"toggle"},{active:"recommend",inactive:"false",initial:!1,message:"package.json \xbb workspaces",name:"workspaces",format:e=>e?["packages/*","tools/*"]:void 0,type:(e,t)=>{return!1===e||!1===s||!1===t.private||(r=a&&a.packages?a.packages:a,Array.isArray(r)&&r.length>0)?null:"toggle";var r}}]}(o);return gf([{active:"do it",inactive:"cancel",message:!0===r?"Repository not clean":"Workspace not empty",name:"okay",type:()=>i||!1===r?null:"toggle"},Ef(o),...a,bf()],{onCancel(){throw new Error("cancel")}}).then((({okay:e,...t})=>{if(!1===e)throw new Error("cancel");return Object.entries(t)})).then((e=>{const t=a.map((({name:e})=>e)),r=Object.fromEntries(e.filter((([e])=>t.includes(e))));return{...Object.fromEntries(e.filter((([e])=>!t.includes(e)))),info:r,options:o}}))}process.on("SIGINT",(()=>{})),new class{constructor(e,t){this.root=t;const{bin:r,homepage:i,name:s="cheetor",repository:{url:o=""}={},version:a}="string"==typeof e?JSON.parse((0,n.readFileSync)(new URL(e,t))):e;this.homepage=i,this.repository=o.includes("github.com")?o.replace(/\.git$/,""):"";const u=$t(process.argv.slice(2)).strict().alias("help","h").alias("version","v").hide("help").version(a).hide("version").detectLocale(!1),c=function(e,t){if("string"==typeof e||!e)return t;const r=Object.keys(e);return 1===r.length&&r[0]}(r,s);c&&u.scriptName(c),this.cli=Promise.resolve(u)}config(e){return this.cli=this.cli.then(e),this}command(...e){return this.cli=this.cli.then((t=>t.command(...e))),this}commandFrom(e){return this.cli=this.cli.then((async t=>{const r=await Nt(e,this.root);return t.command(r)})),this}commandSafe(e){return this.cli=this.cli.then((t=>function(e,t){return Nt(e,t).catch((e=>{if("ERR_MODULE_NOT_FOUND"===e.code&&e.message.endsWith(` imported from ${(0,g.fileURLToPath)(import.meta.url)}`))return!1;throw e}))}(e,this.root).then((e=>e&&e.command?t.command(e):t)))),this}commandSmart(e){return this.cli=this.cli.then((async t=>{const r=e();return r&&r.command?t.command(r):t})),this}website(e){return this.site=e,this}middleware(...e){return this.cli=this.cli.then((t=>t.middleware(...e))),this}setup(e){return this.cli.then((e=>function(e,t){const{homepage:r,site:i=r,repository:n}=t,s=i&&i!==n,o=e.getInternalMethods(),a=(u=o.getCommandInstance().handlers,Object.keys(u).some((e=>e&&"$0"!==e)));var u;return 0===o.getUsageInstance().getUsage().length&&(a?e.usage("Usage: $0 <command>"):e.usage("Usage: $0")),a&&e.demandCommand(1,"Won't work without a command"),s&&e.epilogue(`Website: ${i}`),n&&e.epilogue(`Repository: ${n}`),e}(e,this))).then((t=>"function"==typeof e?e(t.parse()):t.parse()))}}("../package.json",import.meta.url).website("https://www.npmjs.com/org/nice-move").setup((()=>{(async function(){const{Dependencies:e,GitInit:t,Install:r,info:i,options:{isRoot:n}={}}=await xf();console.log("-".repeat(32));const s=[t,()=>function(e){return(new Pr).config({pretty:!0}).source(on).onFail().onDone(((t={})=>Gi({engines:{node:sn.lts},publishConfig:e.private||t.private?void 0:{access:"public",registry:"https://registry.npmjs.org/"}},t,e))).onDone((e=>(!0===e.private&&async function(){"zh-CN"===await nn()&&(new Br).source(".npmrc").onFail().onDone(((e="")=>e.trim()&&/registry\s*=\s*["']?https:\/\/mirrors\.tencent\.com\/npm\/["']?/i.test(e)?e:`registry = https://mirrors.tencent.com/npm/\r${e}`)).output().logger("Set registry to China mirror in",Rr(".npmrc")).catch(console.warn)}(),e))).output().logger("Add project info to",Rr(on)).catch(console.warn)}(i),an,Bi,Lr,()=>t||n?ji():void 0,()=>e?e(t||n):void 0,r].filter((e=>"function"==typeof e));for(const e of s){const t=await e();t&&t.catch&&t.catch((e=>{console.warn(e.message)}))}})().catch((e=>{if("cancel"!==e.message)throw e}))}));
|
|
1
|
+
import{__require as e}from"./chunk-D0Fku8VQ.mjs";import{readFileSync as t,readdirSync as n,statSync as r,writeFile as i}from"fs";import{notStrictEqual as a,strictEqual as o}from"assert";import{basename as s,dirname as c,extname as l,join as u,normalize as d,relative as f,resolve as p}from"path";import{format as m,inspect as h}from"util";import{fileURLToPath as g}from"url";const ee={right:S,center:ie},_=0,v=1,y=2,te=3;var ne=class{constructor(e){var t;this.width=e.width,this.wrap=(t=e.wrap)??!0,this.rows=[]}span(...e){let t=this.div(...e);t.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(``),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]==`string`)return this.applyLayoutDSL(e[0]);let t=e.map(e=>typeof e==`string`?this.colFromString(e):e);return this.rows.push(t),t}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]==`string`&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let t=e.split(`
|
|
2
|
+
`).map(e=>e.split(` `)),n=0;return t.forEach(e=>{e.length>1&&C.stringWidth(e[0])>n&&(n=Math.min(Math.floor(this.width*.5),C.stringWidth(e[0])))}),t.forEach(e=>{this.div(...e.map((t,r)=>({text:t.trim(),padding:this.measurePadding(t),width:r===0&&e.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let t=C.stripAnsi(e);return[0,t.match(/\s*$/)[0].length,0,t.match(/^\s*/)[0].length]}toString(){let e=[];return this.rows.forEach(t=>{this.rowToString(t,e)}),e.filter(e=>!e.hidden).map(e=>e.text).join(`
|
|
3
|
+
`)}rowToString(e,t){return this.rasterize(e).forEach((n,r)=>{let i=``;n.forEach((n,a)=>{let{width:o}=e[a],s=this.negatePadding(e[a]),c=n;if(s>C.stringWidth(n)&&(c+=` `.repeat(s-C.stringWidth(n))),e[a].align&&e[a].align!==`left`&&this.wrap){let t=ee[e[a].align];c=t(c,s),C.stringWidth(c)<s&&(c+=` `.repeat((o||0)-C.stringWidth(c)-1))}let l=e[a].padding||[0,0,0,0];l[te]&&(i+=` `.repeat(l[te])),i+=re(e[a],c,`| `),i+=c,i+=re(e[a],c,` |`),l[v]&&(i+=` `.repeat(l[v])),r===0&&t.length>0&&(i=this.renderInline(i,t[t.length-1]))}),t.push({text:i.replace(/ +$/,``),span:e.span})}),t}renderInline(e,t){let n=e.match(/^ */),r=n?n[0].length:0,i=t.text,a=C.stringWidth(i.trimRight());return t.span?this.wrap?r<a?e:(t.hidden=!0,i.trimRight()+` `.repeat(r-a)+e.trimLeft()):(t.hidden=!0,i+e):e}rasterize(e){let t=[],n=this.columnWidths(e),r;return e.forEach((e,i)=>{e.width=n[i],r=this.wrap?C.wrap(e.text,this.negatePadding(e),{hard:!0}).split(`
|
|
4
|
+
`):e.text.split(`
|
|
5
|
+
`),e.border&&(r.unshift(`.`+`-`.repeat(this.negatePadding(e)+2)+`.`),r.push(`'`+`-`.repeat(this.negatePadding(e)+2)+`'`)),e.padding&&(r.unshift(...Array(e.padding[_]||0).fill(``)),r.push(...Array(e.padding[y]||0).fill(``))),r.forEach((e,n)=>{t[n]||t.push([]);let r=t[n];for(let e=0;e<i;e++)r[e]===void 0&&r.push(``);r.push(e)})}),t}negatePadding(e){let t=e.width||0;return e.padding&&(t-=(e.padding[te]||0)+(e.padding[v]||0)),e.border&&(t-=4),t}columnWidths(e){if(!this.wrap)return e.map(e=>e.width||C.stringWidth(e.text));let t=e.length,n=this.width,r=e.map(e=>{if(e.width)return t--,n-=e.width,e.width}),i=t?Math.floor(n/t):0;return r.map((t,n)=>t===void 0?Math.max(i,b(e[n])):t)}};function re(e,t,n){return e.border?/[.']-+[.']/.test(t)?``:t.trim().length===0?` `:n:``}function b(e){let t=e.padding||[],n=1+(t[te]||0)+(t[v]||0);return e.border?n+4:n}function x(){return typeof process==`object`&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function S(e,t){e=e.trim();let n=C.stringWidth(e);return n<t?` `.repeat(t-n)+e:e}function ie(e,t){e=e.trim();let n=C.stringWidth(e);return n>=t?e:` `.repeat(t-n>>1)+e}let C;function ae(e,t){return C=t,new ne({width:e?.width||x(),wrap:e?.wrap})}const oe=RegExp(`\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)`,`g`);function se(e){return e.replace(oe,``)}function ce(e,t){let[n,r]=e.match(oe)||[``,``];e=se(e);let i=``;for(let n=0;n<e.length;n++)n!==0&&n%t===0&&(i+=`
|
|
6
|
+
`),i+=e.charAt(n);return n&&r&&(i=`${n}${i}${r}`),i}function le(e){return ae(e,{stringWidth:e=>[...e].length,stripAnsi:se,wrap:ce})}function ue(e,t){let i=p(`.`,e),a,o=r(i);for(o.isDirectory()||(i=c(i));;){if(a=t(i,n(i)),a)return p(i,a);if(i=c(a=i),a===i)break}}function de(e){let t=e!==e.toLowerCase()&&e!==e.toUpperCase();if(t||(e=e.toLowerCase()),e.indexOf(`-`)===-1&&e.indexOf(`_`)===-1)return e;{let t=``,n=!1,r=e.match(/^-+/);for(let i=r?r[0].length:0;i<e.length;i++){let r=e.charAt(i);n&&(n=!1,r=r.toUpperCase()),i!==0&&(r===`-`||r===`_`)?n=!0:r!==`-`&&r!==`_`&&(t+=r)}return t}}function fe(e,t){let n=e.toLowerCase();t||=`-`;let r=``;for(let i=0;i<e.length;i++){let a=n.charAt(i),o=e.charAt(i);a!==o&&i>0?r+=`${t}${n.charAt(i)}`:r+=o}return r}function pe(e){return e==null?!1:typeof e==`number`||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function me(e){if(Array.isArray(e))return e.map(e=>typeof e==`string`?e:e+``);e=e.trim();let t=0,n=null,r=null,i=null,a=[];for(let o=0;o<e.length;o++){if(n=r,r=e.charAt(o),r===` `&&!i){n!==` `&&t++;continue}r===i?i=null:(r===`'`||r===`"`)&&!i&&(i=r),a[t]||(a[t]=``),a[t]+=r}return a}var w;(function(e){e.BOOLEAN=`boolean`,e.STRING=`string`,e.NUMBER=`number`,e.ARRAY=`array`})(w||={});let T;var he=class{constructor(e){T=e}parse(e,t){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},t),r=me(e),i=typeof e==`string`,a=ge(Object.assign(Object.create(null),n.alias)),o=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":`no-`,"parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),s=Object.assign(Object.create(null),n.default),c=n.configObjects||[],l=n.envPrefix,u=o[`populate--`],d=u?`--`:`_`,f=Object.create(null),p=Object.create(null),m=n.__||T.format,h={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},g=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,ee=RegExp(`^--`+o[`negation-prefix`]+`(.+)`);[].concat(n.array||[]).filter(Boolean).forEach(function(e){let t=typeof e==`object`?e.key:e,n=Object.keys(e).map(function(e){let t={boolean:`bools`,string:`strings`,number:`numbers`};return t[e]}).filter(Boolean).pop();n&&(h[n][t]=!0),h.arrays[t]=!0,h.keys.push(t)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(e){h.bools[e]=!0,h.keys.push(e)}),[].concat(n.string||[]).filter(Boolean).forEach(function(e){h.strings[e]=!0,h.keys.push(e)}),[].concat(n.number||[]).filter(Boolean).forEach(function(e){h.numbers[e]=!0,h.keys.push(e)}),[].concat(n.count||[]).filter(Boolean).forEach(function(e){h.counts[e]=!0,h.keys.push(e)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(e){h.normalize[e]=!0,h.keys.push(e)}),typeof n.narg==`object`&&Object.entries(n.narg).forEach(([e,t])=>{typeof t==`number`&&(h.nargs[e]=t,h.keys.push(e))}),typeof n.coerce==`object`&&Object.entries(n.coerce).forEach(([e,t])=>{typeof t==`function`&&(h.coercions[e]=t,h.keys.push(e))}),n.config!==void 0&&(Array.isArray(n.config)||typeof n.config==`string`?[].concat(n.config).filter(Boolean).forEach(function(e){h.configs[e]=!0}):typeof n.config==`object`&&Object.entries(n.config).forEach(([e,t])=>{(typeof t==`boolean`||typeof t==`function`)&&(h.configs[e]=t)})),Se(n.key,a,n.default,h.arrays),Object.keys(s).forEach(function(e){(h.aliases[e]||[]).forEach(function(t){s[t]=s[e]})});let _=null;k();let v=[],y=Object.assign(Object.create(null),{_:[]}),te={};for(let e=0;e<r.length;e++){let t=r[e],n=t.replace(/^-{3,}/,`---`),i,a,s,c,l,u;if(t!==`--`&&/^-/.test(t)&&D(t))ne(t);else if(n.match(/^---+(=|$)/)){ne(t);continue}else if(t.match(/^--.+=/)||!o[`short-option-groups`]&&t.match(/^-.+=/))c=t.match(/^--?([^=]+)=([\s\S]*)$/),c!==null&&Array.isArray(c)&&c.length>=3&&(E(c[1],h.arrays)?e=b(e,c[1],r,c[2]):E(c[1],h.nargs)===!1?x(c[1],c[2],!0):e=re(e,c[1],r,c[2]));else if(t.match(ee)&&o[`boolean-negation`])c=t.match(ee),c!==null&&Array.isArray(c)&&c.length>=2&&(a=c[1],x(a,E(a,h.arrays)?[!1]:!1));else if(t.match(/^--.+/)||!o[`short-option-groups`]&&t.match(/^-[^-]+/))c=t.match(/^--?(.+)/),c!==null&&Array.isArray(c)&&c.length>=2&&(a=c[1],E(a,h.arrays)?e=b(e,a,r):E(a,h.nargs)===!1?(l=r[e+1],l!==void 0&&(!l.match(/^-/)||l.match(g))&&!E(a,h.bools)&&!E(a,h.counts)||/^(true|false)$/.test(l)?(x(a,l),e++):x(a,De(a))):e=re(e,a,r));else if(t.match(/^-.\..+=/))c=t.match(/^-([^=]+)=([\s\S]*)$/),c!==null&&Array.isArray(c)&&c.length>=3&&x(c[1],c[2]);else if(t.match(/^-.\..+/)&&!t.match(g))l=r[e+1],c=t.match(/^-(.\..+)/),c!==null&&Array.isArray(c)&&c.length>=2&&(a=c[1],l!==void 0&&!l.match(/^-/)&&!E(a,h.bools)&&!E(a,h.counts)?(x(a,l),e++):x(a,De(a)));else if(t.match(/^-[^-]+/)&&!t.match(g)){s=t.slice(1,-1).split(``),i=!1;for(let n=0;n<s.length;n++){if(l=t.slice(n+2),s[n+1]&&s[n+1]===`=`){u=t.slice(n+3),a=s[n],E(a,h.arrays)?e=b(e,a,r,u):E(a,h.nargs)===!1?x(a,u):e=re(e,a,r,u),i=!0;break}if(l===`-`){x(s[n],l);continue}if(/[A-Za-z]/.test(s[n])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(l)&&E(l,h.bools)===!1){x(s[n],l),i=!0;break}if(s[n+1]&&s[n+1].match(/\W/)){x(s[n],l),i=!0;break}else x(s[n],De(s[n]))}a=t.slice(-1)[0],!i&&a!==`-`&&(E(a,h.arrays)?e=b(e,a,r):E(a,h.nargs)===!1?(l=r[e+1],l!==void 0&&(!/^(-|--)[^-]/.test(l)||l.match(g))&&!E(a,h.bools)&&!E(a,h.counts)||/^(true|false)$/.test(l)?(x(a,l),e++):x(a,De(a))):e=re(e,a,r))}else if(t.match(/^-[0-9]$/)&&t.match(g)&&E(t.slice(1),h.bools))a=t.slice(1),x(a,De(a));else if(t===`--`){v=r.slice(e+1);break}else if(o[`halt-at-non-option`]){v=r.slice(e);break}else ne(t)}ce(y,!0),ce(y,!1),ae(y),se(),he(y,h.aliases,s,!0),le(y),o[`set-placeholder-key`]&&ue(y),Object.keys(h.counts).forEach(function(e){be(y,e.split(`.`))||x(e,0)}),u&&v.length&&(y[d]=[]),v.forEach(function(e){y[d].push(e)}),o[`camel-case-expansion`]&&o[`strip-dashed`]&&Object.keys(y).filter(e=>e!==`--`&&e.includes(`-`)).forEach(e=>{delete y[e]}),o[`strip-aliased`]&&[].concat(...Object.keys(a).map(e=>a[e])).forEach(e=>{o[`camel-case-expansion`]&&e.includes(`-`)&&delete y[e.split(`.`).map(e=>de(e)).join(`.`)],delete y[e]});function ne(e){let t=C(`_`,e);(typeof t==`string`||typeof t==`number`)&&y._.push(t)}function re(e,t,n,r){let i,a=E(t,h.nargs);if(a=typeof a!=`number`||isNaN(a)?1:a,a===0)return O(r)||(_=Error(m(`Argument unexpected for: %s`,t))),x(t,De(t)),e;let s=O(r)?0:1;if(o[`nargs-eats-options`])n.length-(e+1)+s<a&&(_=Error(m(`Not enough arguments following: %s`,t))),s=a;else{for(i=e+1;i<n.length&&(!n[i].match(/^-[^0-9]/)||n[i].match(g)||D(n[i]));i++)s++;s<a&&(_=Error(m(`Not enough arguments following: %s`,t)))}let c=Math.min(s,a);for(!O(r)&&c>0&&(x(t,r),c--),i=e+1;i<c+e+1;i++)x(t,n[i]);return e+c}function b(e,t,n,r){let a=[],c=r||n[e+1],l=E(t,h.nargs);if(E(t,h.bools)&&!/^(true|false)$/.test(c))a.push(!0);else if(O(c)||O(r)&&/^-/.test(c)&&!g.test(c)&&!D(c)){if(s[t]!==void 0){let e=s[t];a=Array.isArray(e)?e:[e]}}else{O(r)||a.push(ie(t,r,!0));for(let r=e+1;r<n.length&&!(!o[`greedy-arrays`]&&a.length>0||l&&typeof l==`number`&&a.length>=l||(c=n[r],/^-/.test(c)&&!g.test(c)&&!D(c)));r++)e=r,a.push(ie(t,c,i))}return typeof l==`number`&&(l&&a.length<l||isNaN(l)&&a.length===0)&&(_=Error(m(`Not enough arguments following: %s`,t))),x(t,a),e}function x(e,t,n=i){if(/-/.test(e)&&o[`camel-case-expansion`]){let t=e.split(`.`).map(function(e){return de(e)}).join(`.`);S(e,t)}let r=ie(e,t,n),a=e.split(`.`);if(xe(y,a,r),h.aliases[e]&&h.aliases[e].forEach(function(e){let t=e.split(`.`);xe(y,t,r)}),a.length>1&&o[`dot-notation`]&&(h.aliases[a[0]]||[]).forEach(function(t){let n=t.split(`.`),i=[].concat(a);i.shift(),n=n.concat(i),(h.aliases[e]||[]).includes(n.join(`.`))||xe(y,n,r)}),E(e,h.normalize)&&!E(e,h.arrays)){let n=[e].concat(h.aliases[e]||[]);n.forEach(function(e){Object.defineProperty(te,e,{enumerable:!0,get(){return t},set(e){t=typeof e==`string`?T.normalize(e):e}})})}}function S(e,t){h.aliases[e]&&h.aliases[e].length||(h.aliases[e]=[t],f[t]=!0),h.aliases[t]&&h.aliases[t].length||S(t,e)}function ie(e,t,n){n&&(t=ye(t)),(E(e,h.bools)||E(e,h.counts))&&typeof t==`string`&&(t=t===`true`);let r=Array.isArray(t)?t.map(function(t){return C(e,t)}):C(e,t);return E(e,h.counts)&&(O(r)||typeof r==`boolean`)&&(r=_e()),E(e,h.normalize)&&E(e,h.arrays)&&(r=Array.isArray(t)?t.map(e=>T.normalize(e)):T.normalize(t)),r}function C(e,t){if(!o[`parse-positional-numbers`]&&e===`_`)return t;if(!E(e,h.strings)&&!E(e,h.bools)&&!Array.isArray(t)){let n=pe(t)&&o[`parse-numbers`]&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)));(n||!O(t)&&E(e,h.numbers))&&(t=Number(t))}return t}function ae(e){let t=Object.create(null);he(t,h.aliases,s),Object.keys(h.configs).forEach(function(n){let r=e[n]||t[n];if(r)try{let e=null,t=T.resolve(T.cwd(),r),i=h.configs[n];if(typeof i==`function`){try{e=i(t)}catch(t){e=t}if(e instanceof Error){_=e;return}}else e=T.require(t);oe(e)}catch(t){t.name===`PermissionDenied`?_=t:e[n]&&(_=Error(m(`Invalid JSON config file: %s`,r)))}})}function oe(e,t){Object.keys(e).forEach(function(n){let r=e[n],i=t?t+`.`+n:n;typeof r==`object`&&r&&!Array.isArray(r)&&o[`dot-notation`]?oe(r,i):(!be(y,i.split(`.`))||E(i,h.arrays)&&o[`combine-arrays`])&&x(i,r)})}function se(){c!==void 0&&c.forEach(function(e){oe(e)})}function ce(e,t){if(l===void 0)return;let n=typeof l==`string`?l:``,r=T.env();Object.keys(r).forEach(function(i){if(n===``||i.lastIndexOf(n,0)===0){let a=i.split(`__`).map(function(e,t){return t===0&&(e=e.substring(n.length)),de(e)});(t&&h.configs[a.join(`.`)]||!t)&&!be(e,a)&&x(a.join(`.`),r[i])}})}function le(e){let t,n=new Set;Object.keys(e).forEach(function(r){if(!n.has(r)&&(t=E(r,h.coercions),typeof t==`function`))try{let i=C(r,t(e[r]));[].concat(h.aliases[r]||[],r).forEach(t=>{n.add(t),e[t]=i})}catch(e){_=e}})}function ue(e){return h.keys.forEach(t=>{~t.indexOf(`.`)||e[t]===void 0&&(e[t]=void 0)}),e}function he(e,t,n,r=!1){Object.keys(n).forEach(function(i){be(e,i.split(`.`))||(xe(e,i.split(`.`),n[i]),r&&(p[i]=!0),(t[i]||[]).forEach(function(t){be(e,t.split(`.`))||xe(e,t.split(`.`),n[i])}))})}function be(e,t){let n=e;o[`dot-notation`]||(t=[t.join(`.`)]),t.slice(0,-1).forEach(function(e){n=n[e]||{}});let r=t[t.length-1];return typeof n==`object`?r in n:!1}function xe(e,t,n){let r=e;o[`dot-notation`]||(t=[t.join(`.`)]),t.slice(0,-1).forEach(function(e){e=ve(e),typeof r==`object`&&r[e]===void 0&&(r[e]={}),typeof r[e]!=`object`||Array.isArray(r[e])?(Array.isArray(r[e])?r[e].push({}):r[e]=[r[e],{}],r=r[e][r[e].length-1]):r=r[e]});let i=ve(t[t.length-1]),a=E(t.join(`.`),h.arrays),s=Array.isArray(n),c=o[`duplicate-arguments-array`];!c&&E(i,h.nargs)&&(c=!0,(!O(r[i])&&h.nargs[i]===1||Array.isArray(r[i])&&r[i].length===h.nargs[i])&&(r[i]=void 0)),n===_e()?r[i]=_e(r[i]):Array.isArray(r[i])?c&&a&&s?r[i]=o[`flatten-duplicate-arrays`]?r[i].concat(n):(Array.isArray(r[i][0])?r[i]:[r[i]]).concat([n]):!c&&!!a==!!s?r[i]=n:r[i]=r[i].concat([n]):r[i]===void 0&&a?r[i]=s?n:[n]:c&&!(r[i]===void 0||E(i,h.counts)||E(i,h.bools))?r[i]=[r[i],n]:r[i]=n}function Se(...e){e.forEach(function(e){Object.keys(e||{}).forEach(function(e){h.aliases[e]||(h.aliases[e]=[].concat(a[e]||[]),h.aliases[e].concat(e).forEach(function(t){if(/-/.test(t)&&o[`camel-case-expansion`]){let n=de(t);n!==e&&h.aliases[e].indexOf(n)===-1&&(h.aliases[e].push(n),f[n]=!0)}}),h.aliases[e].concat(e).forEach(function(t){if(t.length>1&&/[A-Z]/.test(t)&&o[`camel-case-expansion`]){let n=fe(t,`-`);n!==e&&h.aliases[e].indexOf(n)===-1&&(h.aliases[e].push(n),f[n]=!0)}}),h.aliases[e].forEach(function(t){h.aliases[t]=[e].concat(h.aliases[e].filter(function(e){return t!==e}))}))})})}function E(e,t){let n=[].concat(h.aliases[e]||[],e),r=Object.keys(t),i=n.find(e=>r.includes(e));return i?t[i]:!1}function Ce(e){let t=Object.keys(h),n=[].concat(t.map(e=>h[e]));return n.some(function(t){return Array.isArray(t)?t.includes(e):t[e]})}function we(e,...t){let n=[].concat(...t);return n.some(function(t){let n=e.match(t);return n&&Ce(n[1])})}function Te(e){if(e.match(g)||!e.match(/^-[^-]+/))return!1;let t=!0,n,r=e.slice(1).split(``);for(let i=0;i<r.length;i++){if(n=e.slice(i+2),!Ce(r[i])){t=!1;break}if(r[i+1]&&r[i+1]===`=`||n===`-`||/[A-Za-z]/.test(r[i])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(n)||r[i+1]&&r[i+1].match(/\W/))break}return t}function D(e){return o[`unknown-options-as-args`]&&Ee(e)}function Ee(e){if(e=e.replace(/^-{3,}/,`--`),e.match(g)||Te(e))return!1;let t=/^-+([^=]+?)=[\s\S]*$/,n=/^-+([^=]+?)$/,r=/^-+([^=]+?)-$/,i=/^-+([^=]+?\d+)$/,a=/^-+([^=]+?)\W+.*$/;return!we(e,t,ee,n,r,i,a)}function De(e){return!E(e,h.bools)&&!E(e,h.counts)&&`${e}`in s?s[e]:Oe(ke(e))}function Oe(e){let t={[w.BOOLEAN]:!0,[w.STRING]:``,[w.NUMBER]:void 0,[w.ARRAY]:[]};return t[e]}function ke(e){let t=w.BOOLEAN;return E(e,h.strings)?t=w.STRING:E(e,h.numbers)?t=w.NUMBER:E(e,h.bools)?t=w.BOOLEAN:E(e,h.arrays)&&(t=w.ARRAY),t}function O(e){return e===void 0}function k(){Object.keys(h.counts).find(e=>E(e,h.arrays)?(_=Error(m(`Invalid configuration: %s, opts.count excludes opts.array.`,e)),!0):E(e,h.nargs)?(_=Error(m(`Invalid configuration: %s, opts.count excludes opts.narg.`,e)),!0):!1)}return{aliases:Object.assign({},h.aliases),argv:Object.assign(te,y),configuration:o,defaulted:Object.assign({},p),error:_,newAliases:Object.assign({},f)}}};function ge(e){let t=[],n=Object.create(null),r=!0;for(Object.keys(e).forEach(function(n){t.push([].concat(e[n],n))});r;){r=!1;for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){let i=t[e].filter(function(e){return t[n].indexOf(e)!==-1});if(i.length){t[e]=t[e].concat(t[n]),t.splice(n,1),r=!0;break}}}return t.forEach(function(e){e=e.filter(function(e,t,n){return n.indexOf(e)===t});let t=e.pop();t!==void 0&&typeof t==`string`&&(n[t]=e)}),n}function _e(e){return e===void 0?1:e+1}function ve(e){return e===`__proto__`?`___proto___`:e}function ye(e){return typeof e==`string`&&(e[0]===`'`||e[0]===`"`)&&e[e.length-1]===e[0]?e.substring(1,e.length-1):e}var be,xe,Se;const E=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,Ce=(xe=(be=process==null?void 0:process.versions)?.node)??(Se=process==null?void 0:process.version)?.slice(1);if(Ce){let e=Number(Ce.match(/^([^.]+)/)[1]);if(e<E)throw Error(`yargs parser supports a minimum Node.js version of ${E}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`)}const we=process?process.env:{},Te=new he({cwd:process.cwd,env:()=>we,format:m,normalize:d,resolve:p,require:n=>{if(e!==void 0)return e(n);if(n.match(/\.json$/))return JSON.parse(t(n,`utf8`));throw Error(`only .json config files are supported in ESM`)}}),D=function(e,t){let n=Te.parse(e.slice(),t);return n.argv};D.detailed=function(e,t){return Te.parse(e.slice(),t)},D.camelCase=de,D.decamelize=fe,D.looksLikeNumber=pe;var Ee=D;function De(){return Oe()?0:1}function Oe(){return ke()&&!process.defaultApp}function ke(){return!!process.versions.electron}function O(){return process.argv[De()]}var k=class e extends Error{constructor(t){super(t||`yargs error`),this.name=`YError`,Error.captureStackTrace&&Error.captureStackTrace(this,e)}},Ae={fs:{readFileSync:t,writeFile:i},format:m,resolve:p,exists:e=>{try{return r(e).isFile()}catch{return!1}}};let A;var je=class{constructor(e){e||={},this.directory=e.directory||`./locales`,this.updateFiles=typeof e.updateFiles==`boolean`?e.updateFiles:!0,this.locale=e.locale||`en`,this.fallbackToLanguage=typeof e.fallbackToLanguage==`boolean`?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!=`string`)return this._taggedLiteral(arguments[0],...arguments);let t=e.shift(),n=function(){};return typeof e[e.length-1]==`function`&&(n=e.pop()),n||=function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]=t,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),A.format.apply(A.format,[this.cache[this.locale][t]||t].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),t=e.shift(),n=e.shift(),r=e.shift(),i=function(){};typeof e[e.length-1]==`function`&&(i=e.pop()),this.cache[this.locale]||this._readLocaleFile();let a=r===1?t:n;if(this.cache[this.locale][t]){let e=this.cache[this.locale][t];a=e[r===1?`one`:`other`]}!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]={one:t,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:i})):i();let o=[a];return~a.indexOf(`%d`)&&o.push(r),A.format.apply(A.format,o.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){for(let t in this.cache[this.locale]||this._readLocaleFile(),e)Object.prototype.hasOwnProperty.call(e,t)&&(this.cache[this.locale][t]=e[t])}_taggedLiteral(e,...t){let n=``;return e.forEach(function(e,r){let i=t[r+1];n+=e,i!==void 0&&(n+=`%s`)}),this.__.apply(this,[n].concat([].slice.call(t,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,t=this.writeQueue[0],n=t.directory,r=t.locale,i=t.cb,a=this._resolveLocaleFile(n,r),o=JSON.stringify(this.cache[r],null,2);A.fs.writeFile(a,o,`utf-8`,function(t){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),i(t)})}_readLocaleFile(){let e={},t=this._resolveLocaleFile(this.directory,this.locale);try{A.fs.readFileSync&&(e=JSON.parse(A.fs.readFileSync(t,`utf-8`)))}catch(n){if(n instanceof SyntaxError&&(n.message=`syntax error in `+t),n.code===`ENOENT`)e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let n=A.resolve(e,`./`,t+`.json`);if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~t.lastIndexOf(`_`)){let r=A.resolve(e,`./`,t.split(`_`)[0]+`.json`);this._fileExistsSync(r)&&(n=r)}return n}_fileExistsSync(e){return A.exists(e)}};function Me(e,t){A=t;let n=new je(e);return{__:n.__.bind(n),__n:n.__n.bind(n),setLocale:n.setLocale.bind(n),getLocale:n.getLocale.bind(n),updateLocale:n.updateLocale.bind(n),locale:n.locale}}const Ne=e=>Me(e,Ae);var Pe=Ne;const Fe=`require is not supported by ESM`,Ie=`loading a directory of commands is not supported yet for ESM`;let Le;try{Le=g(import.meta.url)}catch{Le=process.cwd()}const Re=Le.substring(0,Le.lastIndexOf(`node_modules`));var ze={assert:{notStrictEqual:a,strictEqual:o},cliui:le,findUp:ue,getEnv:e=>process.env[e],inspect:h,getCallerFile:()=>{throw new k(Ie)},getProcessArgvBin:O,mainFilename:Re||process.cwd(),Parser:Ee,path:{basename:s,dirname:c,extname:l,relative:f,resolve:p},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(e,t)=>process.emitWarning(e,t),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:process.stdout.columns===void 0?null:process.stdout.columns},readFileSync:t,require:()=>{throw new k(Fe)},requireDirectory:()=>{throw new k(Ie)},stringWidth:e=>[...e].length,y18n:Pe({directory:p(Le,`../../../locales`),updateFiles:!1})};function j(e,t,n,r){n.assert.notStrictEqual(e,t,r)}function Be(e,t){t.assert.strictEqual(typeof e,`string`)}function Ve(e){return Object.keys(e)}function M(e){return!!e&&!!e.then&&typeof e.then==`function`}function He(e){let t=e.replace(/\s{2,}/g,` `),n=t.split(/\s+(?![^[]*]|[^<]*>)/),r=/\.*[\][<>]/g,i=n.shift();if(!i)throw Error(`No command found in: ${e}`);let a={cmd:i.replace(r,``),demanded:[],optional:[]};return n.forEach((e,t)=>{let i=!1;e=e.replace(/\s/g,``),/\.+[\]>]/.test(e)&&t===n.length-1&&(i=!0),/^\[/.test(e)?a.optional.push({cmd:e.replace(r,``).split(`|`),variadic:i}):a.demanded.push({cmd:e.replace(r,``).split(`|`),variadic:i})}),a}const Ue=[`first`,`second`,`third`,`fourth`,`fifth`,`sixth`];function N(e,t,n){function r(){return typeof e==`object`?[{demanded:[],optional:[]},e,t]:[He(`cmd ${e}`),t,n]}try{let e=0,[t,n,i]=r(),a=[].slice.call(n);for(;a.length&&a[a.length-1]===void 0;)a.pop();let o=i||a.length;if(o<t.demanded.length)throw new k(`Not enough arguments provided. Expected ${t.demanded.length} but received ${a.length}.`);let s=t.demanded.length+t.optional.length;if(o>s)throw new k(`Too many arguments provided. Expected max ${s} but received ${o}.`);t.demanded.forEach(t=>{let n=a.shift(),r=We(n),i=t.cmd.filter(e=>e===r||e===`*`);i.length===0&&Ge(r,t.cmd,e),e+=1}),t.optional.forEach(t=>{if(a.length===0)return;let n=a.shift(),r=We(n),i=t.cmd.filter(e=>e===r||e===`*`);i.length===0&&Ge(r,t.cmd,e),e+=1})}catch(e){console.warn(e.stack)}}function We(e){return Array.isArray(e)?`array`:e===null?`null`:typeof e}function Ge(e,t,n){throw new k(`Invalid ${Ue[n]||`manyith`} argument. Expected ${t.join(` or `)} but received ${e}.`)}var Ke=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,t,n=!0,r=!1){if(N(`<array|function> [boolean] [boolean] [boolean]`,[e,t,n],arguments.length),Array.isArray(e)){for(let r=0;r<e.length;r++){if(typeof e[r]!=`function`)throw Error(`middleware must be a function`);let i=e[r];i.applyBeforeValidation=t,i.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e==`function`){let i=e;i.applyBeforeValidation=t,i.global=n,i.mutates=r,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,t){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(e=>{let r=[...n[t]||[],t];return e.option?!r.includes(e.option):!0}),e.option=t,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function qe(e){return e?e.map(e=>(e.applyBeforeValidation=!1,e)):[]}function Je(e,t,n,r){return n.reduce((e,n)=>{if(n.applyBeforeValidation!==r)return e;if(n.mutates){if(n.applied)return e;n.applied=!0}if(M(e))return e.then(e=>Promise.all([e,n(e,t)])).then(([e,t])=>Object.assign(e,t));{let r=n(e,t);return M(r)?r.then(t=>Object.assign(e,t)):Object.assign(e,r)}},e)}function Ye(e,t,n=e=>{throw e}){try{let n=Xe(e)?e():e;return M(n)?n.then(e=>t(e)):t(n)}catch(e){return n(e)}}function Xe(e){return typeof e==`function`}function Ze(t){if(e===void 0)return null;for(let n=0,r=Object.keys(e.cache),i;n<r.length;n++)if(i=e.cache[r[n]],i.exports===t)return i;return null}const Qe=/(^\*)|(^\$0)/;var $e=class{constructor(e,t,n,r){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=r,this.usage=e,this.globalMiddleware=n,this.validation=t}addDirectory(e,t,n,r){r||={},typeof r.recurse!=`boolean`&&(r.recurse=!1),Array.isArray(r.extensions)||(r.extensions=[`js`]);let i=typeof r.visit==`function`?r.visit:e=>e;r.visit=(e,t,n)=>{let r=i(e,t,n);if(r){if(this.requireCache.has(t))return r;this.requireCache.add(t),this.addHandler(r)}return r},this.shim.requireDirectory({require:t,filename:n},e,r)}addHandler(e,t,n,r,i,a){let o=[],s=qe(i);if(r||=()=>{},Array.isArray(e))if(nt(e))[e,...o]=e;else for(let t of e)this.addHandler(t);else if(at(e)){let t=Array.isArray(e.command)||typeof e.command==`string`?e.command:this.moduleName(e);e.aliases&&(t=[].concat(t,e.aliases)),this.addHandler(t,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(tt(n)){this.addHandler([e].concat(o),t,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e==`string`){let i=He(e);o=o.map(e=>He(e).cmd);let c=!1,l=[i.cmd].concat(o).filter(e=>Qe.test(e)?(c=!0,!1):!0);l.length===0&&c&&l.push(`$0`),c&&(i.cmd=l[0],o=l.slice(1),e=e.replace(Qe,i.cmd)),o.forEach(e=>{this.aliasMap[e]=i.cmd}),t!==!1&&this.usage.command(e,t,c,o,a),this.handlers[i.cmd]={original:e,description:t,handler:r,builder:n||{},middlewares:s,deprecated:a,demanded:i.demanded,optional:i.optional},c&&(this.defaultCommand=this.handlers[i.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,t,n,r,i,a){let o=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,s=t.getInternalMethods().getContext(),c=s.commands.slice(),l=!e;e&&(s.commands.push(e),s.fullCommands.push(o.original));let u=this.applyBuilderUpdateUsageAndParse(l,o,t,n.aliases,c,r,i,a);return M(u)?u.then(e=>this.applyMiddlewareAndGetResult(l,o,e.innerArgv,s,i,e.aliases,t)):this.applyMiddlewareAndGetResult(l,o,u.innerArgv,s,i,u.aliases,t)}applyBuilderUpdateUsageAndParse(e,t,n,r,i,a,o,s){let c=t.builder,l=n;if(rt(c)){n.getInternalMethods().getUsageInstance().freeze();let u=c(n.getInternalMethods().reset(r),s);if(M(u))return u.then(r=>(l=jn(r)?r:n,this.parseAndUpdateUsage(e,t,l,i,a,o)))}else it(c)&&(n.getInternalMethods().getUsageInstance().freeze(),l=n.getInternalMethods().reset(r),Object.keys(t.builder).forEach(e=>{l.option(e,c[e])}));return this.parseAndUpdateUsage(e,t,l,i,a,o)}parseAndUpdateUsage(e,t,n,r,i,a){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(r,t),t.description);let o=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,i,a);return M(o)?o.then(e=>({aliases:n.parsed.aliases,innerArgv:e})):{aliases:n.parsed.aliases,innerArgv:o}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,t){let n=Qe.test(t.original)?t.original.replace(Qe,``).trim():t.original,r=e.filter(e=>!Qe.test(e));return r.push(n),`$0 ${r.join(` `)}`}handleValidationAndGetResult(e,t,n,r,i,a,o,s){if(!a.getInternalMethods().getHasOutput()){let t=a.getInternalMethods().runValidation(i,s,a.parsed.error,e);n=Ye(n,e=>(t(e),e))}if(t.handler&&!a.getInternalMethods().getHasOutput()){a.getInternalMethods().setHasOutput();let r=!!a.getOptions().configuration[`populate--`];a.getInternalMethods().postProcess(n,r,!1,!1),n=Je(n,a,o,!1),n=Ye(n,e=>{let n=t.handler(e);return M(n)?n.then(()=>e):e}),e||a.getInternalMethods().getUsageInstance().cacheHelpMessage(),M(n)&&!a.getInternalMethods().hasParseCallback()&&n.catch(e=>{try{a.getInternalMethods().getUsageInstance().fail(null,e)}catch{}})}return e||(r.commands.pop(),r.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,t,n,r,i,a,o){let s={};if(i)return n;o.getInternalMethods().getHasOutput()||(s=this.populatePositionals(t,n,r,o));let c=this.globalMiddleware.getMiddleware().slice(0).concat(t.middlewares),l=Je(n,o,c,!0);return M(l)?l.then(n=>this.handleValidationAndGetResult(e,t,n,r,a,o,c,s)):this.handleValidationAndGetResult(e,t,l,r,a,o,c,s)}populatePositionals(e,t,n,r){t._=t._.slice(n.commands.length);let i=e.demanded.slice(0),a=e.optional.slice(0),o={};for(this.validation.positionalCount(i.length,t._.length);i.length;){let e=i.shift();this.populatePositional(e,t,o)}for(;a.length;){let e=a.shift();this.populatePositional(e,t,o)}return t._=n.commands.concat(t._.map(e=>``+e)),this.postProcessPositionals(t,o,this.cmdToParseOptions(e.original),r),o}populatePositional(e,t,n){let r=e.cmd[0];e.variadic?n[r]=t._.splice(0).map(String):t._.length&&(n[r]=[String(t._.shift())])}cmdToParseOptions(e){let t={array:[],default:{},alias:{},demand:{}},n=He(e);return n.demanded.forEach(e=>{let[n,...r]=e.cmd;e.variadic&&(t.array.push(n),t.default[n]=[]),t.alias[n]=r,t.demand[n]=!0}),n.optional.forEach(e=>{let[n,...r]=e.cmd;e.variadic&&(t.array.push(n),t.default[n]=[]),t.alias[n]=r}),t}postProcessPositionals(e,t,n,r){let i=Object.assign({},r.getOptions());i.default=Object.assign(n.default,i.default);for(let e of Object.keys(n.alias))i.alias[e]=(i.alias[e]||[]).concat(n.alias[e]);i.array=i.array.concat(n.array),i.config={};let a=[];if(Object.keys(t).forEach(e=>{t[e].map(t=>{i.configuration[`unknown-options-as-args`]&&(i.key[e]=!0),a.push(`--${e}`),a.push(t)})}),!a.length)return;let o=Object.assign({},i.configuration,{"populate--":!1}),s=this.shim.Parser.detailed(a,Object.assign({},i,{configuration:o}));if(s.error)r.getInternalMethods().getUsageInstance().fail(s.error.message,s.error);else{let n=Object.keys(t);Object.keys(t).forEach(e=>{n.push(...s.aliases[e])}),Object.keys(s.argv).forEach(i=>{n.includes(i)&&(t[i]||(t[i]=s.argv[i]),!this.isInConfigs(r,i)&&!this.isDefaulted(r,i)&&Object.prototype.hasOwnProperty.call(e,i)&&Object.prototype.hasOwnProperty.call(s.argv,i)&&(Array.isArray(e[i])||Array.isArray(s.argv[i]))?e[i]=[].concat(e[i],s.argv[i]):e[i]=s.argv[i])})}}isDefaulted(e,t){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,t)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(t))}isInConfigs(e,t){let{configObjects:n}=e.getOptions();return n.some(e=>Object.prototype.hasOwnProperty.call(e,t))||n.some(e=>Object.prototype.hasOwnProperty.call(e,this.shim.Parser.camelCase(t)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let t=Qe.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,`$0 `);e.getInternalMethods().getUsageInstance().usage(t,this.defaultCommand.description)}let t=this.defaultCommand.builder;if(rt(t))return t(e,!0);tt(t)||Object.keys(t).forEach(n=>{e.option(n,t[n])})}moduleName(e){let t=Ze(e);if(!t)throw Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(t.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:t,desc:n}){for(let r of[e,t,n]){if(typeof r==`string`||r===!1)return r;j(r,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();j(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function et(e,t,n,r){return new $e(e,t,n,r)}function tt(e){return typeof e==`object`&&!!e.builder&&typeof e.handler==`function`}function nt(e){return e.every(e=>typeof e==`string`)}function rt(e){return typeof e==`function`}function it(e){return typeof e==`object`}function at(e){return typeof e==`object`&&!Array.isArray(e)}function ot(e={},t=()=>!0){let n={};return Ve(e).forEach(r=>{t(r,e[r])&&(n[r]=e[r])}),n}function st(e){typeof process>`u`||[process.stdout,process.stderr].forEach(t=>{let n=t;n._handle&&n.isTTY&&typeof n._handle.setBlocking==`function`&&n._handle.setBlocking(e)})}function ct(e){return typeof e==`boolean`}function lt(e,t){let n=t.y18n.__,r={},i=[];r.failFn=function(e){i.push(e)};let a=null,o=null,s=!0;r.showHelpOnFail=function(t=!0,n){let[i,c]=typeof t==`string`?[!0,t]:[t,n];return e.getInternalMethods().isGlobalContext()&&(o=c),a=c,s=i,r};let c=!1;r.fail=function(t,n){let l=e.getInternalMethods().getLoggerInstance();if(i.length)for(let e=i.length-1;e>=0;--e){let a=i[e];if(ct(a)){if(n)throw n;if(t)throw Error(t)}else a(t,n,r)}else{if(e.getExitProcess()&&st(!0),!c){c=!0,s&&(e.showHelp(`error`),l.error()),(t||n)&&l.error(t||n);let r=a||o;r&&((t||n)&&l.error(``),l.error(r))}if(n||=new k(t),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,n);throw n}};let l=[],u=!1;r.usage=(e,t)=>e===null?(u=!0,l=[],r):(u=!1,l.push([e,t||``]),r),r.getUsage=()=>l,r.getUsageDisabled=()=>u,r.getPositionalGroupName=()=>n(`Positionals:`);let d=[];r.example=(e,t)=>{d.push([e,t||``])};let f=[];r.command=function(e,t,n,r,i=!1){n&&(f=f.map(e=>(e[2]=!1,e))),f.push([e,t||``,n,r,i])},r.getCommands=()=>f;let p={};r.describe=function(e,t){Array.isArray(e)?e.forEach(e=>{r.describe(e,t)}):typeof e==`object`?Object.keys(e).forEach(t=>{r.describe(t,e[t])}):p[e]=t},r.getDescriptions=()=>p;let m=[];r.epilog=e=>{m.push(e)};let h=!1,g;r.wrap=e=>{h=!0,g=e},r.getWrap=()=>t.getEnv(`YARGS_DISABLE_WRAP`)?null:(h||(g=b(),h=!0),g);let ee=`__yargsString__:`;r.deferY18nLookup=e=>ee+e,r.help=function(){if(y)return y;v();let i=e.customScriptName?e.$0:t.path.basename(e.$0),a=e.getDemandedOptions(),o=e.getDemandedCommands(),s=e.getDeprecatedOptions(),c=e.getGroups(),h=e.getOptions(),g=[];g=g.concat(Object.keys(p)),g=g.concat(Object.keys(a)),g=g.concat(Object.keys(o)),g=g.concat(Object.keys(h.default)),g=g.filter(ne),g=Object.keys(g.reduce((e,t)=>(t!==`_`&&(e[t]=!0),e),{}));let b=r.getWrap(),x=t.cliui({width:b,wrap:!!b});if(!u){if(l.length)l.forEach(e=>{x.div({text:`${e[0].replace(/\$0/g,i)}`}),e[1]&&x.div({text:`${e[1]}`,padding:[1,0,0,0]})}),x.div();else if(f.length){let e=null;e=o._?`${i} <${n(`command`)}>\n`:`${i} [${n(`command`)}]\n`,x.div(`${e}`)}}if(f.length>1||f.length===1&&!f[0][2]){x.div(n(`Commands:`));let t=e.getInternalMethods().getContext(),r=t.commands.length?`${t.commands.join(` `)} `:``;e.getInternalMethods().getParserConfiguration()[`sort-commands`]===!0&&(f=f.sort((e,t)=>e[0].localeCompare(t[0])));let a=i?`${i} `:``;f.forEach(e=>{let t=`${a}${r}${e[0].replace(/^\$0 ?/,``)}`;x.span({text:t,padding:[0,2,0,2],width:_(f,b,`${i}${r}`)+4},{text:e[1]});let o=[];e[2]&&o.push(`[${n(`default`)}]`),e[3]&&e[3].length&&o.push(`[${n(`aliases:`)} ${e[3].join(`, `)}]`),e[4]&&(typeof e[4]==`string`?o.push(`[${n(`deprecated: %s`,e[4])}]`):o.push(`[${n(`deprecated`)}]`)),o.length?x.div({text:o.join(` `),padding:[0,0,0,2],align:`right`}):x.div()}),x.div()}let S=(Object.keys(h.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);g=g.filter(t=>!e.parsed.newAliases[t]&&S.every(e=>(h.alias[e]||[]).indexOf(t)===-1));let ie=n(`Options:`);c[ie]||(c[ie]=[]),te(g,h.alias,c,ie);let C=e=>/^--/.test(pt(e)),ae=Object.keys(c).filter(e=>c[e].length>0).map(e=>{let t=c[e].filter(ne).map(e=>{if(S.includes(e))return e;for(let t=0,n;(n=S[t])!==void 0;t++)if((h.alias[n]||[]).includes(e))return n;return e});return{groupName:e,normalizedKeys:t}}).filter(({normalizedKeys:e})=>e.length>0).map(({groupName:e,normalizedKeys:t})=>{let n=t.reduce((t,n)=>(t[n]=[n].concat(h.alias[n]||[]).map(t=>e===r.getPositionalGroupName()?t:(/^[0-9]$/.test(t)?h.boolean.includes(n)?`-`:`--`:t.length>1?`--`:`-`)+t).sort((e,t)=>C(e)===C(t)?0:C(e)?1:-1).join(`, `),t),{});return{groupName:e,normalizedKeys:t,switches:n}}),oe=ae.filter(({groupName:e})=>e!==r.getPositionalGroupName()).some(({normalizedKeys:e,switches:t})=>!e.every(e=>C(t[e])));if(oe&&ae.filter(({groupName:e})=>e!==r.getPositionalGroupName()).forEach(({normalizedKeys:e,switches:t})=>{e.forEach(e=>{C(t[e])&&(t[e]=dt(t[e],4))})}),ae.forEach(({groupName:t,normalizedKeys:i,switches:o})=>{x.div(t),i.forEach(t=>{let i=o[t],c=p[t]||``,l=null;c.includes(ee)&&(c=n(c.substring(ee.length))),h.boolean.includes(t)&&(l=`[${n(`boolean`)}]`),h.count.includes(t)&&(l=`[${n(`count`)}]`),h.string.includes(t)&&(l=`[${n(`string`)}]`),h.normalize.includes(t)&&(l=`[${n(`string`)}]`),h.array.includes(t)&&(l=`[${n(`array`)}]`),h.number.includes(t)&&(l=`[${n(`number`)}]`);let u=e=>typeof e==`string`?`[${n(`deprecated: %s`,e)}]`:`[${n(`deprecated`)}]`,d=[t in s?u(s[t]):null,l,t in a?`[${n(`required`)}]`:null,h.choices&&h.choices[t]?`[${n(`choices:`)} ${r.stringifiedValues(h.choices[t])}]`:null,re(h.default[t],h.defaultDescription[t])].filter(Boolean).join(` `);x.span({text:pt(i),padding:[0,2,0,2+ft(i)],width:_(o,b)+4},c);let f=e.getInternalMethods().getUsageConfiguration()[`hide-types`]===!0;d&&!f?x.div({text:d,padding:[0,0,0,2],align:`right`}):x.div()}),x.div()}),d.length&&(x.div(n(`Examples:`)),d.forEach(e=>{e[0]=e[0].replace(/\$0/g,i)}),d.forEach(e=>{e[1]===``?x.div({text:e[0],padding:[0,2,0,2]}):x.div({text:e[0],padding:[0,2,0,2],width:_(d,b)+4},{text:e[1]})}),x.div()),m.length>0){let e=m.map(e=>e.replace(/\$0/g,i)).join(`
|
|
7
|
+
`);x.div(`${e}\n`)}return x.toString().replace(/\s*$/,``)};function _(e,n,r){let i=0;return Array.isArray(e)||(e=Object.values(e).map(e=>[e])),e.forEach(e=>{i=Math.max(t.stringWidth(r?`${r} ${pt(e[0])}`:pt(e[0]))+ft(e[0]),i)}),n&&(i=Math.min(i,parseInt((n*.5).toString(),10))),i}function v(){let t=e.getDemandedOptions(),n=e.getOptions();(Object.keys(n.alias)||[]).forEach(i=>{n.alias[i].forEach(a=>{p[a]&&r.describe(i,p[a]),a in t&&e.demandOption(i,t[a]),n.boolean.includes(a)&&e.boolean(i),n.count.includes(a)&&e.count(i),n.string.includes(a)&&e.string(i),n.normalize.includes(a)&&e.normalize(i),n.array.includes(a)&&e.array(i),n.number.includes(a)&&e.number(i)})})}let y;r.cacheHelpMessage=function(){y=this.help()},r.clearCachedHelpMessage=function(){y=void 0},r.hasCachedHelpMessage=function(){return!!y};function te(e,t,n,r){let i=[],a=null;return Object.keys(n).forEach(e=>{i=i.concat(n[e])}),e.forEach(e=>{a=[e].concat(t[e]),a.some(e=>i.indexOf(e)!==-1)||n[r].push(e)}),i}function ne(t){return e.getOptions().hiddenOptions.indexOf(t)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}r.showHelp=t=>{let n=e.getInternalMethods().getLoggerInstance();t||=`error`;let i=typeof t==`function`?t:n[t];i(r.help())},r.functionDescription=e=>{let r=e.name?t.Parser.decamelize(e.name,`-`):n(`generated-value`);return[`(`,r,`)`].join(``)},r.stringifiedValues=function(e,t){let n=``,r=t||`, `,i=[].concat(e);return!e||!i.length||i.forEach(e=>{n.length&&(n+=r),n+=JSON.stringify(e)}),n};function re(e,t){let r=`[${n(`default:`)} `;if(e===void 0&&!t)return null;if(t)r+=t;else switch(typeof e){case`string`:r+=`"${e}"`;break;case`object`:r+=JSON.stringify(e);break;default:r+=e}return`${r}]`}function b(){let e=80;return t.process.stdColumns?Math.min(e,t.process.stdColumns):e}let x=null;r.version=e=>{x=e},r.showVersion=t=>{let n=e.getInternalMethods().getLoggerInstance();t||=`error`;let r=typeof t==`function`?t:n[t];r(x)},r.reset=function(e){return a=null,c=!1,l=[],u=!1,m=[],d=[],f=[],p=ot(p,t=>!e[t]),r};let S=[];return r.freeze=function(){S.push({failMessage:a,failureOutput:c,usages:l,usageDisabled:u,epilogs:m,examples:d,commands:f,descriptions:p})},r.unfreeze=function(e=!1){let t=S.pop();t&&(e?(p={...t.descriptions,...p},f=[...t.commands,...f],l=[...t.usages,...l],d=[...t.examples,...d],m=[...t.epilogs,...m]):{failMessage:a,failureOutput:c,usages:l,usageDisabled:u,epilogs:m,examples:d,commands:f,descriptions:p}=t)},r}function ut(e){return typeof e==`object`}function dt(e,t){return ut(e)?{text:e.text,indentation:e.indentation+t}:{text:e,indentation:t}}function ft(e){return ut(e)?e.indentation:0}function pt(e){return ut(e)?e.text:e}const mt=`###-begin-{{app_name}}-completions-###
|
|
8
|
+
#
|
|
9
|
+
# yargs command completion script
|
|
10
|
+
#
|
|
11
|
+
# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
|
|
12
|
+
# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
|
|
13
|
+
#
|
|
14
|
+
_{{app_name}}_yargs_completions()
|
|
15
|
+
{
|
|
16
|
+
local cur_word args type_list
|
|
17
|
+
|
|
18
|
+
cur_word="\${COMP_WORDS[COMP_CWORD]}"
|
|
19
|
+
args=("\${COMP_WORDS[@]}")
|
|
20
|
+
|
|
21
|
+
# ask yargs to generate completions.
|
|
22
|
+
type_list=$({{app_path}} --get-yargs-completions "\${args[@]}")
|
|
23
|
+
|
|
24
|
+
COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) )
|
|
25
|
+
|
|
26
|
+
# if no match was found, fall back to filename completion
|
|
27
|
+
if [ \${#COMPREPLY[@]} -eq 0 ]; then
|
|
28
|
+
COMPREPLY=()
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
return 0
|
|
32
|
+
}
|
|
33
|
+
complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
|
|
34
|
+
###-end-{{app_name}}-completions-###
|
|
35
|
+
`,ht=`#compdef {{app_name}}
|
|
36
|
+
###-begin-{{app_name}}-completions-###
|
|
37
|
+
#
|
|
38
|
+
# yargs command completion script
|
|
39
|
+
#
|
|
40
|
+
# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc
|
|
41
|
+
# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.
|
|
42
|
+
#
|
|
43
|
+
_{{app_name}}_yargs_completions()
|
|
44
|
+
{
|
|
45
|
+
local reply
|
|
46
|
+
local si=$IFS
|
|
47
|
+
IFS=$'
|
|
48
|
+
' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}"))
|
|
49
|
+
IFS=$si
|
|
50
|
+
_describe 'values' reply
|
|
51
|
+
}
|
|
52
|
+
compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
53
|
+
###-end-{{app_name}}-completions-###
|
|
54
|
+
`;var gt=class{constructor(e,t,n,r){var i,a,o;this.yargs=e,this.usage=t,this.command=n,this.shim=r,this.completionKey=`get-yargs-completions`,this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(o=(i=this.shim.getEnv(`SHELL`))?.includes(`zsh`)||(a=this.shim.getEnv(`ZSH_NAME`))?.includes(`zsh`))??!1}defaultCompletion(e,t,n,r){let i=this.command.getCommandHandlers();for(let t=0,n=e.length;t<n;++t)if(i[e[t]]&&i[e[t]].builder){let n=i[e[t]].builder;if(rt(n)){this.indexAfterLastReset=t+1;let e=this.yargs.getInternalMethods().reset();return n(e,!0),e.argv}}let a=[];this.commandCompletions(a,e,n),this.optionCompletions(a,e,t,n),this.choicesFromOptionsCompletions(a,e,t,n),this.choicesFromPositionalsCompletions(a,e,t,n),r(null,a)}commandCompletions(e,t,n){let r=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&r[r.length-1]!==n&&!this.previousArgHasChoices(t)&&this.usage.getCommands().forEach(n=>{let r=He(n[0]).cmd;if(t.indexOf(r)===-1)if(!this.zshShell)e.push(r);else{let t=n[1]||``;e.push(r.replace(/:/g,`\\:`)+`:`+t)}})}optionCompletions(e,t,n,r){if((r.match(/^-/)||r===``&&e.length===0)&&!this.previousArgHasChoices(t)){let n=this.yargs.getOptions(),i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(n.key).forEach(a=>{let o=!!n.configuration[`boolean-negation`]&&n.boolean.includes(a),s=i.includes(a);!s&&!n.hiddenOptions.includes(a)&&!this.argsContainKey(t,a,o)&&this.completeOptionKey(a,e,r,o&&!!n.default[a])})}}choicesFromOptionsCompletions(e,t,n,r){if(this.previousArgHasChoices(t)){let n=this.getPreviousArgChoices(t);n&&n.length>0&&e.push(...n.map(e=>e.replace(/:/g,`\\:`)))}}choicesFromPositionalsCompletions(e,t,n,r){if(r===``&&e.length>0&&this.previousArgHasChoices(t))return;let i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],a=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),o=i[n._.length-a-1];if(!o)return;let s=this.yargs.getOptions().choices[o]||[];for(let t of s)t.startsWith(r)&&e.push(t.replace(/:/g,`\\:`))}getPreviousArgChoices(e){if(e.length<1)return;let t=e[e.length-1],n=``;if(!t.startsWith(`-`)&&e.length>1&&(n=t,t=e[e.length-2]),!t.startsWith(`-`))return;let r=t.replace(/^-+/,``),i=this.yargs.getOptions(),a=[r,...this.yargs.getAliases()[r]||[]],o;for(let e of a)if(Object.prototype.hasOwnProperty.call(i.key,e)&&Array.isArray(i.choices[e])){o=i.choices[e];break}if(o)return o.filter(e=>!n||e.startsWith(n))}previousArgHasChoices(e){let t=this.getPreviousArgChoices(e);return t!==void 0&&t.length>0}argsContainKey(e,t,n){let r=t=>e.indexOf((/^[^0-9]$/.test(t)?`-`:`--`)+t)!==-1;if(r(t)||n&&r(`no-${t}`))return!0;if(this.aliases){for(let e of this.aliases[t])if(r(e))return!0}return!1}completeOptionKey(e,t,n,r){var i,a,o,s;let c=e;if(this.zshShell){let t=this.usage.getDescriptions(),n=(a=(i=this===null||this===void 0?void 0:this.aliases)?.[e])?.find(e=>{let n=t[e];return typeof n==`string`&&n.length>0}),r=n?t[n]:void 0,l=(s=(o=t[e])??r)??``;c=`${e.replace(/:/g,`\\:`)}:${l.replace(`__yargsString__:`,``).replace(/(\r\n|\n|\r)/gm,` `)}`}let l=e=>/^--/.test(e),u=e=>/^[^0-9]$/.test(e),d=!l(n)&&u(e)?`-`:`--`;t.push(d+c),r&&t.push(d+`no-`+c)}customCompletion(e,t,n,r){if(j(this.customCompletionFunction,null,this.shim),vt(this.customCompletionFunction)){let e=this.customCompletionFunction(n,t);return M(e)?e.then(e=>{this.shim.process.nextTick(()=>{r(null,e)})}).catch(e=>{this.shim.process.nextTick(()=>{r(e,void 0)})}):r(null,e)}else if(yt(this.customCompletionFunction))return this.customCompletionFunction(n,t,(i=r)=>this.defaultCompletion(e,t,n,i),e=>{r(null,e)});else return this.customCompletionFunction(n,t,e=>{r(null,e)})}getCompletion(e,t){let n=e.length?e[e.length-1]:``,r=this.yargs.parse(e,!0),i=this.customCompletionFunction?r=>this.customCompletion(e,r,n,t):r=>this.defaultCompletion(e,r,n,t);return M(r)?r.then(i):i(r)}generateCompletionScript(e,t){let n=this.zshShell?ht:mt,r=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,r),n=n.replace(/{{completion_command}}/g,t),n.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}};function _t(e,t,n,r){return new gt(e,t,n,r)}function vt(e){return e.length<3}function yt(e){return e.length>3}function bt(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let n=[],r;for(r=0;r<=t.length;r++)n[r]=[r];let i;for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)===e.charAt(i-1)?n[r][i]=n[r-1][i-1]:r>1&&i>1&&t.charAt(r-2)===e.charAt(i-1)&&t.charAt(r-1)===e.charAt(i-2)?n[r][i]=n[r-2][i-2]+1:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}const xt=[`$0`,`--`,`_`];function St(e,t,n){let r=n.y18n.__,i=n.y18n.__n,a={};a.nonOptionCount=function(n){let r=e.getDemandedCommands(),a=n._.length+(n[`--`]?n[`--`].length:0),o=a-e.getInternalMethods().getContext().commands.length;r._&&(o<r._.min||o>r._.max)&&(o<r._.min?r._.minMsg===void 0?t.fail(i(`Not enough non-option arguments: got %s, need at least %s`,`Not enough non-option arguments: got %s, need at least %s`,o,o.toString(),r._.min.toString())):t.fail(r._.minMsg?r._.minMsg.replace(/\$0/g,o.toString()).replace(/\$1/,r._.min.toString()):null):o>r._.max&&(r._.maxMsg===void 0?t.fail(i(`Too many non-option arguments: got %s, maximum of %s`,`Too many non-option arguments: got %s, maximum of %s`,o,o.toString(),r._.max.toString())):t.fail(r._.maxMsg?r._.maxMsg.replace(/\$0/g,o.toString()).replace(/\$1/,r._.max.toString()):null)))},a.positionalCount=function(e,n){n<e&&t.fail(i(`Not enough non-option arguments: got %s, need at least %s`,`Not enough non-option arguments: got %s, need at least %s`,n,n+``,e+``))},a.requiredArguments=function(e,n){let r=null;for(let t of Object.keys(n))(!Object.prototype.hasOwnProperty.call(e,t)||e[t]===void 0)&&(r||={},r[t]=n[t]);if(r){let e=[];for(let t of Object.keys(r)){let n=r[t];n&&e.indexOf(n)<0&&e.push(n)}let n=e.length?`\n${e.join(`
|
|
55
|
+
`)}`:``;t.fail(i(`Missing required argument: %s`,`Missing required arguments: %s`,Object.keys(r).length,Object.keys(r).join(`, `)+n))}},a.unknownArguments=function(n,r,o,s,c=!0){var l;let u=e.getInternalMethods().getCommandInstance().getCommands(),d=[],f=e.getInternalMethods().getContext();if(Object.keys(n).forEach(t=>{!xt.includes(t)&&!Object.prototype.hasOwnProperty.call(o,t)&&!Object.prototype.hasOwnProperty.call(e.getInternalMethods().getParseContext(),t)&&!a.isValidAndSomeAliasIsNotNew(t,r)&&d.push(t)}),c&&(f.commands.length>0||u.length>0||s)&&n._.slice(f.commands.length).forEach(e=>{u.includes(``+e)||d.push(``+e)}),c){let t=e.getDemandedCommands(),r=(l=t._)?.max||0,i=f.commands.length+r;i<n._.length&&n._.slice(i).forEach(e=>{e=String(e),!f.commands.includes(e)&&!d.includes(e)&&d.push(e)})}d.length&&t.fail(i(`Unknown argument: %s`,`Unknown arguments: %s`,d.length,d.map(e=>e.trim()?e:`"${e}"`).join(`, `)))},a.unknownCommands=function(n){let r=e.getInternalMethods().getCommandInstance().getCommands(),a=[],o=e.getInternalMethods().getContext();return(o.commands.length>0||r.length>0)&&n._.slice(o.commands.length).forEach(e=>{r.includes(``+e)||a.push(``+e)}),a.length>0?(t.fail(i(`Unknown command: %s`,`Unknown commands: %s`,a.length,a.join(`, `))),!0):!1},a.isValidAndSomeAliasIsNotNew=function(t,n){if(!Object.prototype.hasOwnProperty.call(n,t))return!1;let r=e.parsed.newAliases;return[t,...n[t]].some(e=>!Object.prototype.hasOwnProperty.call(r,e)||!r[t])},a.limitedChoices=function(n){let i=e.getOptions(),a={};if(!Object.keys(i.choices).length)return;Object.keys(n).forEach(e=>{xt.indexOf(e)===-1&&Object.prototype.hasOwnProperty.call(i.choices,e)&&[].concat(n[e]).forEach(t=>{i.choices[e].indexOf(t)===-1&&t!==void 0&&(a[e]=(a[e]||[]).concat(t))})});let o=Object.keys(a);if(!o.length)return;let s=r(`Invalid values:`);o.forEach(e=>{s+=`\n ${r(`Argument: %s, Given: %s, Choices: %s`,e,t.stringifiedValues(a[e]),t.stringifiedValues(i.choices[e]))}`}),t.fail(s)};let o={};a.implies=function(t,r){N(`<string|object> [array|number|string]`,[t,r],arguments.length),typeof t==`object`?Object.keys(t).forEach(e=>{a.implies(e,t[e])}):(e.global(t),o[t]||(o[t]=[]),Array.isArray(r)?r.forEach(e=>a.implies(t,e)):(j(r,void 0,n),o[t].push(r)))},a.getImplied=function(){return o};function s(e,t){let n=Number(t);return t=isNaN(n)?t:n,typeof t==`number`?t=e._.length>=t:t.match(/^--no-.+/)?(t=t.match(/^--no-(.+)/)[1],t=!Object.prototype.hasOwnProperty.call(e,t)):t=Object.prototype.hasOwnProperty.call(e,t),t}a.implications=function(e){let n=[];if(Object.keys(o).forEach(t=>{let r=t;(o[t]||[]).forEach(t=>{let i=r,a=t;i=s(e,i),t=s(e,t),i&&!t&&n.push(` ${r} -> ${a}`)})}),n.length){let e=`${r(`Implications failed:`)}\n`;n.forEach(t=>{e+=t}),t.fail(e)}};let c={};a.conflicts=function(t,n){N(`<string|object> [array|string]`,[t,n],arguments.length),typeof t==`object`?Object.keys(t).forEach(e=>{a.conflicts(e,t[e])}):(e.global(t),c[t]||(c[t]=[]),Array.isArray(n)?n.forEach(e=>a.conflicts(t,e)):c[t].push(n))},a.getConflicting=()=>c,a.conflicting=function(i){Object.keys(i).forEach(e=>{c[e]&&c[e].forEach(n=>{n&&i[e]!==void 0&&i[n]!==void 0&&t.fail(r(`Arguments %s and %s are mutually exclusive`,e,n))})}),e.getInternalMethods().getParserConfiguration()[`strip-dashed`]&&Object.keys(c).forEach(e=>{c[e].forEach(a=>{a&&i[n.Parser.camelCase(e)]!==void 0&&i[n.Parser.camelCase(a)]!==void 0&&t.fail(r(`Arguments %s and %s are mutually exclusive`,e,a))})})},a.recommendCommands=function(e,n){let i=3;n=n.sort((e,t)=>t.length-e.length);let a=null,o=1/0;for(let t=0,r;(r=n[t])!==void 0;t++){let t=bt(e,r);t<=i&&t<o&&(o=t,a=r)}a&&t.fail(r(`Did you mean %s?`,a))},a.reset=function(e){return o=ot(o,t=>!e[t]),c=ot(c,t=>!e[t]),a};let l=[];return a.freeze=function(){l.push({implied:o,conflicting:c})},a.unfreeze=function(){let e=l.pop();j(e,void 0,n),{implied:o,conflicting:c}=e},a}let Ct=[],wt;function Tt(t,n,r,i){wt=i;let a={};if(Object.prototype.hasOwnProperty.call(t,`extends`)){if(typeof t.extends!=`string`)return a;let i=/\.json|\..*rc$/.test(t.extends),o=null;if(i)o=Dt(n,t.extends);else try{o=e.resolve(t.extends)}catch{return t}Et(o),Ct.push(o),a=i?JSON.parse(wt.readFileSync(o,`utf8`)):e(t.extends),delete t.extends,a=Tt(a,wt.path.dirname(o),r,wt)}return Ct=[],r?Ot(a,t):Object.assign({},a,t)}function Et(e){if(Ct.indexOf(e)>-1)throw new k(`Circular extended configurations: '${e}'.`)}function Dt(e,t){return wt.path.resolve(e,t)}function Ot(e,t){let n={};function r(e){return e&&typeof e==`object`&&!Array.isArray(e)}Object.assign(n,e);for(let i of Object.keys(t))r(t[i])&&r(n[i])?n[i]=Ot(e[i],t[i]):n[i]=t[i];return n}var P=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},F=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},I,kt,At,L,R,jt,z,Mt,Nt,B,Pt,V,H,U,W,Ft,It,G,K,Lt,Rt,q,zt,Bt,Vt,J,Ht,Y,Ut,Wt,Gt,X,Kt,Z,Q;function qt(e){return(t=[],n=e.process.cwd(),r)=>{let i=new An(t,n,r,e);return Object.defineProperty(i,`argv`,{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}const Jt=Symbol(`copyDoubleDash`),Yt=Symbol(`copyDoubleDash`),Xt=Symbol(`deleteFromParserHintObject`),Zt=Symbol(`emitWarning`),Qt=Symbol(`freeze`),$t=Symbol(`getDollarZero`),en=Symbol(`getParserConfiguration`),tn=Symbol(`getUsageConfiguration`),nn=Symbol(`guessLocale`),rn=Symbol(`guessVersion`),an=Symbol(`parsePositionalNumbers`),on=Symbol(`pkgUp`),$=Symbol(`populateParserHintArray`),sn=Symbol(`populateParserHintSingleValueDictionary`),cn=Symbol(`populateParserHintArrayDictionary`),ln=Symbol(`populateParserHintDictionary`),un=Symbol(`sanitizeKey`),dn=Symbol(`setKey`),fn=Symbol(`unfreeze`),pn=Symbol(`validateAsync`),mn=Symbol(`getCommandInstance`),hn=Symbol(`getContext`),gn=Symbol(`getHasOutput`),_n=Symbol(`getLoggerInstance`),vn=Symbol(`getParseContext`),yn=Symbol(`getUsageInstance`),bn=Symbol(`getValidationInstance`),xn=Symbol(`hasParseCallback`),Sn=Symbol(`isGlobalContext`),Cn=Symbol(`postProcess`),wn=Symbol(`rebase`),Tn=Symbol(`reset`),En=Symbol(`runYargsParserAndExecuteCommands`),Dn=Symbol(`runValidation`),On=Symbol(`setHasOutput`),kn=Symbol(`kTrackManuallySetKeys`);var An=class{constructor(e=[],t,n,r){this.customScriptName=!1,this.parsed=!1,I.set(this,void 0),kt.set(this,void 0),At.set(this,{commands:[],fullCommands:[]}),L.set(this,null),R.set(this,null),jt.set(this,`show-hidden`),z.set(this,null),Mt.set(this,!0),Nt.set(this,{}),B.set(this,!0),Pt.set(this,[]),V.set(this,void 0),H.set(this,{}),U.set(this,!1),W.set(this,null),Ft.set(this,!0),It.set(this,void 0),G.set(this,``),K.set(this,void 0),Lt.set(this,void 0),Rt.set(this,{}),q.set(this,null),zt.set(this,null),Bt.set(this,{}),Vt.set(this,{}),J.set(this,void 0),Ht.set(this,!1),Y.set(this,void 0),Ut.set(this,!1),Wt.set(this,!1),Gt.set(this,!1),X.set(this,void 0),Kt.set(this,{}),Z.set(this,null),Q.set(this,void 0),P(this,Y,r,`f`),P(this,J,e,`f`),P(this,kt,t,`f`),P(this,Lt,n,`f`),P(this,V,new Ke(this),`f`),this.$0=this[$t](),this[Tn](),P(this,I,F(this,I,`f`),`f`),P(this,X,F(this,X,`f`),`f`),P(this,Q,F(this,Q,`f`),`f`),P(this,K,F(this,K,`f`),`f`),F(this,K,`f`).showHiddenOpt=F(this,jt,`f`),P(this,It,this[Yt](),`f`)}addHelpOpt(e,t){let n=`help`;return N(`[string|boolean] [string]`,[e,t],arguments.length),F(this,W,`f`)&&(this[Xt](F(this,W,`f`)),P(this,W,null,`f`)),e===!1&&t===void 0?this:(P(this,W,typeof e==`string`?e:n,`f`),this.boolean(F(this,W,`f`)),this.describe(F(this,W,`f`),t||F(this,X,`f`).deferY18nLookup(`Show help`)),this)}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if(N(`[string|boolean] [string]`,[e,t],arguments.length),e===!1&&t===void 0)return this;let n=typeof e==`string`?e:F(this,jt,`f`);return this.boolean(n),this.describe(n,t||F(this,X,`f`).deferY18nLookup(`Show hidden options`)),F(this,K,`f`).showHiddenOpt=n,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return N(`<object|string|array> [string|array]`,[e,t],arguments.length),this[cn](this.alias.bind(this),`alias`,e,t),this}array(e){return N(`<array|string>`,[e],arguments.length),this[$](`array`,e),this[kn](e),this}boolean(e){return N(`<array|string>`,[e],arguments.length),this[$](`boolean`,e),this[kn](e),this}check(e,t){return N(`<function> [boolean]`,[e,t],arguments.length),this.middleware((t,n)=>Ye(()=>e(t,n.getOptions()),n=>(n?(typeof n==`string`||n instanceof Error)&&F(this,X,`f`).fail(n.toString(),n):F(this,X,`f`).fail(F(this,Y,`f`).y18n.__(`Argument check failed: %s`,e.toString())),t),e=>(F(this,X,`f`).fail(e.message?e.message:e.toString(),e),t)),!1,t),this}choices(e,t){return N(`<object|string|array> [string|array]`,[e,t],arguments.length),this[cn](this.choices.bind(this),`choices`,e,t),this}coerce(e,t){if(N(`<object|string|array> [function]`,[e,t],arguments.length),Array.isArray(e)){if(!t)throw new k(`coerce callback must be provided`);for(let n of e)this.coerce(n,t);return this}else if(typeof e==`object`){for(let t of Object.keys(e))this.coerce(t,e[t]);return this}if(!t)throw new k(`coerce callback must be provided`);return F(this,K,`f`).key[e]=!0,F(this,V,`f`).addCoerceMiddleware((n,r)=>{let i,a=Object.prototype.hasOwnProperty.call(n,e);return a?Ye(()=>(i=r.getAliases(),t(n[e])),t=>{n[e]=t;let a=r.getInternalMethods().getParserConfiguration()[`strip-aliased`];if(i[e]&&a!==!0)for(let r of i[e])n[r]=t;return n},e=>{throw new k(e.message)}):n},e),this}conflicts(e,t){return N(`<string|object> [string|array]`,[e,t],arguments.length),F(this,Q,`f`).conflicts(e,t),this}config(e=`config`,t,n){return N(`[object|string] [string|function] [function]`,[e,t,n],arguments.length),typeof e==`object`&&!Array.isArray(e)?(e=Tt(e,F(this,kt,`f`),this[en]()[`deep-merge-config`]||!1,F(this,Y,`f`)),F(this,K,`f`).configObjects=(F(this,K,`f`).configObjects||[]).concat(e),this):(typeof t==`function`&&(n=t,t=void 0),this.describe(e,t||F(this,X,`f`).deferY18nLookup(`Path to JSON config file`)),(Array.isArray(e)?e:[e]).forEach(e=>{F(this,K,`f`).config[e]=n||!0}),this)}completion(e,t,n){return N(`[string] [string|boolean|function] [function]`,[e,t,n],arguments.length),typeof t==`function`&&(n=t,t=void 0),P(this,R,e||F(this,R,`f`)||`completion`,`f`),!t&&t!==!1&&(t=`generate completion script`),this.command(F(this,R,`f`),t),n&&F(this,L,`f`).registerFunction(n),this}command(e,t,n,r,i,a){return N(`<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]`,[e,t,n,r,i,a],arguments.length),F(this,I,`f`).addHandler(e,t,n,r,i,a),this}commands(e,t,n,r,i,a){return this.command(e,t,n,r,i,a)}commandDir(e,t){N(`<string> [object]`,[e,t],arguments.length);let n=F(this,Lt,`f`)||F(this,Y,`f`).require;return F(this,I,`f`).addDirectory(e,n,F(this,Y,`f`).getCallerFile(),t),this}count(e){return N(`<array|string>`,[e],arguments.length),this[$](`count`,e),this[kn](e),this}default(e,t,n){return N(`<object|string|array> [*] [string]`,[e,t,n],arguments.length),n&&(Be(e,F(this,Y,`f`)),F(this,K,`f`).defaultDescription[e]=n),typeof t==`function`&&(Be(e,F(this,Y,`f`)),F(this,K,`f`).defaultDescription[e]||(F(this,K,`f`).defaultDescription[e]=F(this,X,`f`).functionDescription(t)),t=t.call()),this[sn](this.default.bind(this),`default`,e,t),this}defaults(e,t,n){return this.default(e,t,n)}demandCommand(e=1,t,n,r){return N(`[number] [number|string] [string|null|undefined] [string|null|undefined]`,[e,t,n,r],arguments.length),typeof t!=`number`&&(n=t,t=1/0),this.global(`_`,!1),F(this,K,`f`).demandedCommands._={min:e,max:t,minMsg:n,maxMsg:r},this}demand(e,t,n){return Array.isArray(t)?(t.forEach(e=>{j(n,!0,F(this,Y,`f`)),this.demandOption(e,n)}),t=1/0):typeof t!=`number`&&(n=t,t=1/0),typeof e==`number`?(j(n,!0,F(this,Y,`f`)),this.demandCommand(e,t,n,n)):Array.isArray(e)?e.forEach(e=>{j(n,!0,F(this,Y,`f`)),this.demandOption(e,n)}):typeof n==`string`?this.demandOption(e,n):(n===!0||n===void 0)&&this.demandOption(e),this}demandOption(e,t){return N(`<object|string|array> [string]`,[e,t],arguments.length),this[sn](this.demandOption.bind(this),`demandedOptions`,e,t),this}deprecateOption(e,t){return N(`<string> [string|boolean]`,[e,t],arguments.length),F(this,K,`f`).deprecatedOptions[e]=t,this}describe(e,t){return N(`<object|string|array> [string]`,[e,t],arguments.length),this[dn](e,!0),F(this,X,`f`).describe(e,t),this}detectLocale(e){return N(`<boolean>`,[e],arguments.length),P(this,Mt,e,`f`),this}env(e){return N(`[string|boolean]`,[e],arguments.length),e===!1?delete F(this,K,`f`).envPrefix:F(this,K,`f`).envPrefix=e||``,this}epilogue(e){return N(`<string>`,[e],arguments.length),F(this,X,`f`).epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return N(`<string|array> [string]`,[e,t],arguments.length),Array.isArray(e)?e.forEach(e=>this.example(...e)):F(this,X,`f`).example(e,t),this}exit(e,t){P(this,U,!0,`f`),P(this,z,t,`f`),F(this,B,`f`)&&F(this,Y,`f`).process.exit(e)}exitProcess(e=!0){return N(`[boolean]`,[e],arguments.length),P(this,B,e,`f`),this}fail(e){if(N(`<function|boolean>`,[e],arguments.length),typeof e==`boolean`&&e!==!1)throw new k(`Invalid first argument. Expected function or boolean 'false'`);return F(this,X,`f`).failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return N(`<array> [function]`,[e,t],arguments.length),t?F(this,L,`f`).getCompletion(e,t):new Promise((t,n)=>{F(this,L,`f`).getCompletion(e,(e,r)=>{e?n(e):t(r)})})}getDemandedOptions(){return N([],0),F(this,K,`f`).demandedOptions}getDemandedCommands(){return N([],0),F(this,K,`f`).demandedCommands}getDeprecatedOptions(){return N([],0),F(this,K,`f`).deprecatedOptions}getDetectLocale(){return F(this,Mt,`f`)}getExitProcess(){return F(this,B,`f`)}getGroups(){return Object.assign({},F(this,H,`f`),F(this,Vt,`f`))}getHelp(){if(P(this,U,!0,`f`),!F(this,X,`f`).hasCachedHelpMessage()){if(!this.parsed){let e=this[En](F(this,J,`f`),void 0,void 0,0,!0);if(M(e))return e.then(()=>F(this,X,`f`).help())}let e=F(this,I,`f`).runDefaultBuilderOn(this);if(M(e))return e.then(()=>F(this,X,`f`).help())}return Promise.resolve(F(this,X,`f`).help())}getOptions(){return F(this,K,`f`)}getStrict(){return F(this,Ut,`f`)}getStrictCommands(){return F(this,Wt,`f`)}getStrictOptions(){return F(this,Gt,`f`)}global(e,t){return N(`<string|array> [boolean]`,[e,t],arguments.length),e=[].concat(e),t===!1?e.forEach(e=>{F(this,K,`f`).local.includes(e)||F(this,K,`f`).local.push(e)}):F(this,K,`f`).local=F(this,K,`f`).local.filter(t=>e.indexOf(t)===-1),this}group(e,t){N(`<string|array> <string>`,[e,t],arguments.length);let n=F(this,Vt,`f`)[t]||F(this,H,`f`)[t];F(this,Vt,`f`)[t]&&delete F(this,Vt,`f`)[t];let r={};return F(this,H,`f`)[t]=(n||[]).concat(e).filter(e=>r[e]?!1:r[e]=!0),this}hide(e){return N(`<string>`,[e],arguments.length),F(this,K,`f`).hiddenOptions.push(e),this}implies(e,t){return N(`<string|object> [number|string|array]`,[e,t],arguments.length),F(this,Q,`f`).implies(e,t),this}locale(e){return N(`[string]`,[e],arguments.length),e===void 0?(this[nn](),F(this,Y,`f`).y18n.getLocale()):(P(this,Mt,!1,`f`),F(this,Y,`f`).y18n.setLocale(e),this)}middleware(e,t,n){return F(this,V,`f`).addMiddleware(e,!!t,n)}nargs(e,t){return N(`<string|object|array> [number]`,[e,t],arguments.length),this[sn](this.nargs.bind(this),`narg`,e,t),this}normalize(e){return N(`<array|string>`,[e],arguments.length),this[$](`normalize`,e),this}number(e){return N(`<array|string>`,[e],arguments.length),this[$](`number`,e),this[kn](e),this}option(e,t){if(N(`<string|object> [object]`,[e,t],arguments.length),typeof e==`object`)Object.keys(e).forEach(t=>{this.options(t,e[t])});else{typeof t!=`object`&&(t={}),this[kn](e),F(this,Z,`f`)&&(e===`version`||t?.alias===`version`)&&this[Zt]([`"version" is a reserved word.`,`Please do one of the following:`,'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)",`- Use a different option key`,`https://yargs.js.org/docs/#api-reference-version`].join(`
|
|
56
|
+
`),void 0,`versionWarning`),F(this,K,`f`).key[e]=!0,t.alias&&this.alias(e,t.alias);let n=t.deprecate||t.deprecated;n&&this.deprecateOption(e,n);let r=t.demand||t.required||t.require;r&&this.demand(e,r),t.demandOption&&this.demandOption(e,typeof t.demandOption==`string`?t.demandOption:void 0),t.conflicts&&this.conflicts(e,t.conflicts),`default`in t&&this.default(e,t.default),t.implies!==void 0&&this.implies(e,t.implies),t.nargs!==void 0&&this.nargs(e,t.nargs),t.config&&this.config(e,t.configParser),t.normalize&&this.normalize(e),t.choices&&this.choices(e,t.choices),t.coerce&&this.coerce(e,t.coerce),t.group&&this.group(e,t.group),(t.boolean||t.type===`boolean`)&&(this.boolean(e),t.alias&&this.boolean(t.alias)),(t.array||t.type===`array`)&&(this.array(e),t.alias&&this.array(t.alias)),(t.number||t.type===`number`)&&(this.number(e),t.alias&&this.number(t.alias)),(t.string||t.type===`string`)&&(this.string(e),t.alias&&this.string(t.alias)),(t.count||t.type===`count`)&&this.count(e),typeof t.global==`boolean`&&this.global(e,t.global),t.defaultDescription&&(F(this,K,`f`).defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);let i=t.describe||t.description||t.desc,a=F(this,X,`f`).getDescriptions();(!Object.prototype.hasOwnProperty.call(a,e)||typeof i==`string`)&&this.describe(e,i),t.hidden&&this.hide(e),t.requiresArg&&this.requiresArg(e)}return this}options(e,t){return this.option(e,t)}parse(e,t,n){N(`[string|array] [function|boolean|object] [function]`,[e,t,n],arguments.length),this[Qt](),e===void 0&&(e=F(this,J,`f`)),typeof t==`object`&&(P(this,zt,t,`f`),t=n),typeof t==`function`&&(P(this,q,t,`f`),t=!1),t||P(this,J,e,`f`),F(this,q,`f`)&&P(this,B,!1,`f`);let r=this[En](e,!!t),i=this.parsed;return F(this,L,`f`).setParsed(this.parsed),M(r)?r.then(e=>(F(this,q,`f`)&&F(this,q,`f`).call(this,F(this,z,`f`),e,F(this,G,`f`)),e)).catch(e=>{throw F(this,q,`f`)&&F(this,q,`f`)(e,this.parsed.argv,F(this,G,`f`)),e}).finally(()=>{this[fn](),this.parsed=i}):(F(this,q,`f`)&&F(this,q,`f`).call(this,F(this,z,`f`),r,F(this,G,`f`)),this[fn](),this.parsed=i,r)}parseAsync(e,t,n){let r=this.parse(e,t,n);return M(r)?r:Promise.resolve(r)}parseSync(e,t,n){let r=this.parse(e,t,n);if(M(r))throw new k(`.parseSync() must not be used with asynchronous builders, handlers, or middleware`);return r}parserConfiguration(e){return N(`<object>`,[e],arguments.length),P(this,Rt,e,`f`),this}pkgConf(e,t){N(`<string> [string]`,[e,t],arguments.length);let n=null,r=this[on](t||F(this,kt,`f`));return r[e]&&typeof r[e]==`object`&&(n=Tt(r[e],t||F(this,kt,`f`),this[en]()[`deep-merge-config`]||!1,F(this,Y,`f`)),F(this,K,`f`).configObjects=(F(this,K,`f`).configObjects||[]).concat(n)),this}positional(e,t){N(`<string> <object>`,[e,t],arguments.length);let n=[`default`,`defaultDescription`,`implies`,`normalize`,`choices`,`conflicts`,`coerce`,`type`,`describe`,`desc`,`description`,`alias`];t=ot(t,(e,t)=>e===`type`&&![`string`,`number`,`boolean`].includes(t)?!1:n.includes(e));let r=F(this,At,`f`).fullCommands[F(this,At,`f`).fullCommands.length-1],i=r?F(this,I,`f`).cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return Ve(i).forEach(n=>{let r=i[n];Array.isArray(r)?r.indexOf(e)!==-1&&(t[n]=!0):r[e]&&!(n in t)&&(t[n]=r[e])}),this.group(e,F(this,X,`f`).getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return N(`[boolean]`,[e],arguments.length),P(this,Ht,e,`f`),this}required(e,t,n){return this.demand(e,t,n)}require(e,t,n){return this.demand(e,t,n)}requiresArg(e){return N(`<array|string|object> [number]`,[e],arguments.length),typeof e==`string`&&F(this,K,`f`).narg[e]||this[sn](this.requiresArg.bind(this),`narg`,e,NaN),this}showCompletionScript(e,t){return N(`[string] [string]`,[e,t],arguments.length),e||=this.$0,F(this,It,`f`).log(F(this,L,`f`).generateCompletionScript(e,t||F(this,R,`f`)||`completion`)),this}showHelp(e){if(N(`[string|function]`,[e],arguments.length),P(this,U,!0,`f`),!F(this,X,`f`).hasCachedHelpMessage()){if(!this.parsed){let t=this[En](F(this,J,`f`),void 0,void 0,0,!0);if(M(t))return t.then(()=>{F(this,X,`f`).showHelp(e)}),this}let t=F(this,I,`f`).runDefaultBuilderOn(this);if(M(t))return t.then(()=>{F(this,X,`f`).showHelp(e)}),this}return F(this,X,`f`).showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return N(`[boolean|string] [string]`,[e,t],arguments.length),F(this,X,`f`).showHelpOnFail(e,t),this}showVersion(e){return N(`[string|function]`,[e],arguments.length),F(this,X,`f`).showVersion(e),this}skipValidation(e){return N(`<array|string>`,[e],arguments.length),this[$](`skipValidation`,e),this}strict(e){return N(`[boolean]`,[e],arguments.length),P(this,Ut,e!==!1,`f`),this}strictCommands(e){return N(`[boolean]`,[e],arguments.length),P(this,Wt,e!==!1,`f`),this}strictOptions(e){return N(`[boolean]`,[e],arguments.length),P(this,Gt,e!==!1,`f`),this}string(e){return N(`<array|string>`,[e],arguments.length),this[$](`string`,e),this[kn](e),this}terminalWidth(){return N([],0),F(this,Y,`f`).process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return N(`<object>`,[e],arguments.length),P(this,Mt,!1,`f`),F(this,Y,`f`).y18n.updateLocale(e),this}usage(e,t,n,r){if(N(`<string|null|undefined> [string|boolean] [function|object] [function]`,[e,t,n,r],arguments.length),t!==void 0){if(j(e,null,F(this,Y,`f`)),(e||``).match(/^\$0( |$)/))return this.command(e,t,n,r);throw new k(`.usage() description must start with $0 if being used as alias for .command()`)}else return F(this,X,`f`).usage(e),this}usageConfiguration(e){return N(`<object>`,[e],arguments.length),P(this,Kt,e,`f`),this}version(e,t,n){let r=`version`;if(N(`[boolean|string] [string] [string]`,[e,t,n],arguments.length),F(this,Z,`f`)&&(this[Xt](F(this,Z,`f`)),F(this,X,`f`).version(void 0),P(this,Z,null,`f`)),arguments.length===0)n=this[rn](),e=r;else if(arguments.length===1){if(e===!1)return this;n=e,e=r}else arguments.length===2&&(n=t,t=void 0);return P(this,Z,typeof e==`string`?e:r,`f`),t||=F(this,X,`f`).deferY18nLookup(`Show version number`),F(this,X,`f`).version(n||void 0),this.boolean(F(this,Z,`f`)),this.describe(F(this,Z,`f`),t),this}wrap(e){return N(`<number|null|undefined>`,[e],arguments.length),F(this,X,`f`).wrap(e),this}[(I=new WeakMap,kt=new WeakMap,At=new WeakMap,L=new WeakMap,R=new WeakMap,jt=new WeakMap,z=new WeakMap,Mt=new WeakMap,Nt=new WeakMap,B=new WeakMap,Pt=new WeakMap,V=new WeakMap,H=new WeakMap,U=new WeakMap,W=new WeakMap,Ft=new WeakMap,It=new WeakMap,G=new WeakMap,K=new WeakMap,Lt=new WeakMap,Rt=new WeakMap,q=new WeakMap,zt=new WeakMap,Bt=new WeakMap,Vt=new WeakMap,J=new WeakMap,Ht=new WeakMap,Y=new WeakMap,Ut=new WeakMap,Wt=new WeakMap,Gt=new WeakMap,X=new WeakMap,Kt=new WeakMap,Z=new WeakMap,Q=new WeakMap,Jt)](e){if(!e._||!e[`--`])return e;e._.push.apply(e._,e[`--`]);try{delete e[`--`]}catch{}return e}[Yt](){return{log:(...e)=>{this[xn]()||console.log(...e),P(this,U,!0,`f`),F(this,G,`f`).length&&P(this,G,F(this,G,`f`)+`
|
|
57
|
+
`,`f`),P(this,G,F(this,G,`f`)+e.join(` `),`f`)},error:(...e)=>{this[xn]()||console.error(...e),P(this,U,!0,`f`),F(this,G,`f`).length&&P(this,G,F(this,G,`f`)+`
|
|
58
|
+
`,`f`),P(this,G,F(this,G,`f`)+e.join(` `),`f`)}}}[Xt](e){Ve(F(this,K,`f`)).forEach(t=>{if((e=>e===`configObjects`)(t))return;let n=F(this,K,`f`)[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n==`object`&&delete n[e]}),delete F(this,X,`f`).getDescriptions()[e]}[Zt](e,t,n){F(this,Nt,`f`)[n]||(F(this,Y,`f`).process.emitWarning(e,t),F(this,Nt,`f`)[n]=!0)}[Qt](){F(this,Pt,`f`).push({options:F(this,K,`f`),configObjects:F(this,K,`f`).configObjects.slice(0),exitProcess:F(this,B,`f`),groups:F(this,H,`f`),strict:F(this,Ut,`f`),strictCommands:F(this,Wt,`f`),strictOptions:F(this,Gt,`f`),completionCommand:F(this,R,`f`),output:F(this,G,`f`),exitError:F(this,z,`f`),hasOutput:F(this,U,`f`),parsed:this.parsed,parseFn:F(this,q,`f`),parseContext:F(this,zt,`f`)}),F(this,X,`f`).freeze(),F(this,Q,`f`).freeze(),F(this,I,`f`).freeze(),F(this,V,`f`).freeze()}[$t](){let e=``,t;return t=/\b(node|iojs|electron)(\.exe)?$/.test(F(this,Y,`f`).process.argv()[0])?F(this,Y,`f`).process.argv().slice(1,2):F(this,Y,`f`).process.argv().slice(0,1),e=t.map(e=>{let t=this[wn](F(this,kt,`f`),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e}).join(` `).trim(),F(this,Y,`f`).getEnv(`_`)&&F(this,Y,`f`).getProcessArgvBin()===F(this,Y,`f`).getEnv(`_`)&&(e=F(this,Y,`f`).getEnv(`_`).replace(`${F(this,Y,`f`).path.dirname(F(this,Y,`f`).process.execPath())}/`,``)),e}[en](){return F(this,Rt,`f`)}[tn](){return F(this,Kt,`f`)}[nn](){if(!F(this,Mt,`f`))return;let e=F(this,Y,`f`).getEnv(`LC_ALL`)||F(this,Y,`f`).getEnv(`LC_MESSAGES`)||F(this,Y,`f`).getEnv(`LANG`)||F(this,Y,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(e.replace(/[.:].*/,``))}[rn](){let e=this[on]();return e.version||`unknown`}[an](e){let t=e[`--`]?e[`--`]:e._;for(let e=0,n;(n=t[e])!==void 0;e++)F(this,Y,`f`).Parser.looksLikeNumber(n)&&Number.isSafeInteger(Math.floor(parseFloat(`${n}`)))&&(t[e]=Number(n));return e}[on](e){let t=e||`*`;if(F(this,Bt,`f`)[t])return F(this,Bt,`f`)[t];let n={};try{let t=e||F(this,Y,`f`).mainFilename;!e&&F(this,Y,`f`).path.extname(t)&&(t=F(this,Y,`f`).path.dirname(t));let r=F(this,Y,`f`).findUp(t,(e,t)=>{if(t.includes(`package.json`))return`package.json`});j(r,void 0,F(this,Y,`f`)),n=JSON.parse(F(this,Y,`f`).readFileSync(r,`utf8`))}catch{}return F(this,Bt,`f`)[t]=n||{},F(this,Bt,`f`)[t]}[$](e,t){t=[].concat(t),t.forEach(t=>{t=this[un](t),F(this,K,`f`)[e].push(t)})}[sn](e,t,n,r){this[ln](e,t,n,r,(e,t,n)=>{F(this,K,`f`)[e][t]=n})}[cn](e,t,n,r){this[ln](e,t,n,r,(e,t,n)=>{F(this,K,`f`)[e][t]=(F(this,K,`f`)[e][t]||[]).concat(n)})}[ln](e,t,n,r,i){if(Array.isArray(n))n.forEach(t=>{e(t,r)});else if((e=>typeof e==`object`)(n))for(let t of Ve(n))e(t,n[t]);else i(t,this[un](n),r)}[un](e){return e===`__proto__`?`___proto___`:e}[dn](e,t){return this[sn](this[dn].bind(this),`key`,e,t),this}[fn](){var e,t,n,r,i,a,o,s,c,l,u,d;let f=F(this,Pt,`f`).pop();j(f,void 0,F(this,Y,`f`));let p;e=this,t=this,n=this,r=this,i=this,a=this,o=this,s=this,c=this,l=this,u=this,d=this,{options:{set value(t){P(e,K,t,`f`)}}.value,configObjects:p,exitProcess:{set value(e){P(t,B,e,`f`)}}.value,groups:{set value(e){P(n,H,e,`f`)}}.value,output:{set value(e){P(r,G,e,`f`)}}.value,exitError:{set value(e){P(i,z,e,`f`)}}.value,hasOutput:{set value(e){P(a,U,e,`f`)}}.value,parsed:this.parsed,strict:{set value(e){P(o,Ut,e,`f`)}}.value,strictCommands:{set value(e){P(s,Wt,e,`f`)}}.value,strictOptions:{set value(e){P(c,Gt,e,`f`)}}.value,completionCommand:{set value(e){P(l,R,e,`f`)}}.value,parseFn:{set value(e){P(u,q,e,`f`)}}.value,parseContext:{set value(e){P(d,zt,e,`f`)}}.value}=f,F(this,K,`f`).configObjects=p,F(this,X,`f`).unfreeze(),F(this,Q,`f`).unfreeze(),F(this,I,`f`).unfreeze(),F(this,V,`f`).unfreeze()}[pn](e,t){return Ye(t,t=>(e(t),t))}getInternalMethods(){return{getCommandInstance:this[mn].bind(this),getContext:this[hn].bind(this),getHasOutput:this[gn].bind(this),getLoggerInstance:this[_n].bind(this),getParseContext:this[vn].bind(this),getParserConfiguration:this[en].bind(this),getUsageConfiguration:this[tn].bind(this),getUsageInstance:this[yn].bind(this),getValidationInstance:this[bn].bind(this),hasParseCallback:this[xn].bind(this),isGlobalContext:this[Sn].bind(this),postProcess:this[Cn].bind(this),reset:this[Tn].bind(this),runValidation:this[Dn].bind(this),runYargsParserAndExecuteCommands:this[En].bind(this),setHasOutput:this[On].bind(this)}}[mn](){return F(this,I,`f`)}[hn](){return F(this,At,`f`)}[gn](){return F(this,U,`f`)}[_n](){return F(this,It,`f`)}[vn](){return F(this,zt,`f`)||{}}[yn](){return F(this,X,`f`)}[bn](){return F(this,Q,`f`)}[xn](){return!!F(this,q,`f`)}[Sn](){return F(this,Ft,`f`)}[Cn](e,t,n,r){if(n||M(e))return e;t||(e=this[Jt](e));let i=this[en]()[`parse-positional-numbers`]||this[en]()[`parse-positional-numbers`]===void 0;return i&&(e=this[an](e)),r&&(e=Je(e,this,F(this,V,`f`).getMiddleware(),!1)),e}[Tn](e={}){P(this,K,F(this,K,`f`)||{},`f`);let t={};t.local=F(this,K,`f`).local||[],t.configObjects=F(this,K,`f`).configObjects||[];let n={};t.local.forEach(t=>{n[t]=!0,(e[t]||[]).forEach(e=>{n[e]=!0})}),Object.assign(F(this,Vt,`f`),Object.keys(F(this,H,`f`)).reduce((e,t)=>{let r=F(this,H,`f`)[t].filter(e=>!(e in n));return r.length>0&&(e[t]=r),e},{})),P(this,H,{},`f`);let r=[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`],i=[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`];return r.forEach(e=>{t[e]=(F(this,K,`f`)[e]||[]).filter(e=>!n[e])}),i.forEach(e=>{t[e]=ot(F(this,K,`f`)[e],e=>!n[e])}),t.envPrefix=F(this,K,`f`).envPrefix,P(this,K,t,`f`),P(this,X,F(this,X,`f`)?F(this,X,`f`).reset(n):lt(this,F(this,Y,`f`)),`f`),P(this,Q,F(this,Q,`f`)?F(this,Q,`f`).reset(n):St(this,F(this,X,`f`),F(this,Y,`f`)),`f`),P(this,I,F(this,I,`f`)?F(this,I,`f`).reset():et(F(this,X,`f`),F(this,Q,`f`),F(this,V,`f`),F(this,Y,`f`)),`f`),F(this,L,`f`)||P(this,L,_t(this,F(this,X,`f`),F(this,I,`f`),F(this,Y,`f`)),`f`),F(this,V,`f`).reset(),P(this,R,null,`f`),P(this,G,``,`f`),P(this,z,null,`f`),P(this,U,!1,`f`),this.parsed=!1,this}[wn](e,t){return F(this,Y,`f`).path.relative(e,t)}[En](e,t,n,r=0,i=!1){let a=!!n||i;e||=F(this,J,`f`),F(this,K,`f`).__=F(this,Y,`f`).y18n.__,F(this,K,`f`).configuration=this[en]();let o=!!F(this,K,`f`).configuration[`populate--`],s=Object.assign({},F(this,K,`f`).configuration,{"populate--":!0}),c=F(this,Y,`f`).Parser.detailed(e,Object.assign({},F(this,K,`f`),{configuration:{"parse-positional-numbers":!1,...s}})),l=Object.assign(c.argv,F(this,zt,`f`)),u,d=c.aliases,f=!1,p=!1;Object.keys(l).forEach(e=>{e===F(this,W,`f`)&&l[e]?f=!0:e===F(this,Z,`f`)&&l[e]&&(p=!0)}),l.$0=this.$0,this.parsed=c,r===0&&F(this,X,`f`).clearCachedHelpMessage();try{if(this[nn](),t)return this[Cn](l,o,!!n,!1);if(F(this,W,`f`)){let e=[F(this,W,`f`)].concat(d[F(this,W,`f`)]||[]).filter(e=>e.length>1);e.includes(``+l._[l._.length-1])&&(l._.pop(),f=!0)}P(this,Ft,!1,`f`);let s=F(this,I,`f`).getCommands(),m=F(this,L,`f`).completionKey in l,h=f||m||i;if(l._.length){if(s.length){let e;for(let t=r||0,a;l._[t]!==void 0;t++)if(a=String(l._[t]),s.includes(a)&&a!==F(this,R,`f`)){let e=F(this,I,`f`).runCommand(a,this,c,t+1,i,f||p||i);return this[Cn](e,o,!!n,!1)}else if(!e&&a!==F(this,R,`f`)){e=a;break}!F(this,I,`f`).hasDefaultCommand()&&F(this,Ht,`f`)&&e&&!h&&F(this,Q,`f`).recommendCommands(e,s)}F(this,R,`f`)&&l._.includes(F(this,R,`f`))&&!m&&(F(this,B,`f`)&&st(!0),this.showCompletionScript(),this.exit(0))}if(F(this,I,`f`).hasDefaultCommand()&&!h){let e=F(this,I,`f`).runCommand(null,this,c,0,i,f||p||i);return this[Cn](e,o,!!n,!1)}if(m){F(this,B,`f`)&&st(!0),e=[].concat(e);let t=e.slice(e.indexOf(`--${F(this,L,`f`).completionKey}`)+1);return F(this,L,`f`).getCompletion(t,(e,t)=>{if(e)throw new k(e.message);(t||[]).forEach(e=>{F(this,It,`f`).log(e)}),this.exit(0)}),this[Cn](l,!o,!!n,!1)}if(F(this,U,`f`)||(f?(F(this,B,`f`)&&st(!0),a=!0,this.showHelp(`log`),this.exit(0)):p&&(F(this,B,`f`)&&st(!0),a=!0,F(this,X,`f`).showVersion(`log`),this.exit(0))),!a&&F(this,K,`f`).skipValidation.length>0&&(a=Object.keys(l).some(e=>F(this,K,`f`).skipValidation.indexOf(e)>=0&&l[e]===!0)),!a){if(c.error)throw new k(c.error.message);if(!m){let e=this[Dn](d,{},c.error);n||(u=Je(l,this,F(this,V,`f`).getMiddleware(),!0)),u=this[pn](e,u??l),M(u)&&!n&&(u=u.then(()=>Je(l,this,F(this,V,`f`).getMiddleware(),!1)))}}}catch(e){if(e instanceof k)F(this,X,`f`).fail(e.message,e);else throw e}return this[Cn](u??l,o,!!n,!0)}[Dn](e,t,n,r){let i={...this.getDemandedOptions()};return a=>{if(n)throw new k(n.message);F(this,Q,`f`).nonOptionCount(a),F(this,Q,`f`).requiredArguments(a,i);let o=!1;F(this,Wt,`f`)&&(o=F(this,Q,`f`).unknownCommands(a)),F(this,Ut,`f`)&&!o?F(this,Q,`f`).unknownArguments(a,e,t,!!r):F(this,Gt,`f`)&&F(this,Q,`f`).unknownArguments(a,e,{},!1,!1),F(this,Q,`f`).limitedChoices(a),F(this,Q,`f`).implications(a),F(this,Q,`f`).conflicting(a)}}[On](){P(this,U,!0,`f`)}[kn](e){if(typeof e==`string`)F(this,K,`f`).key[e]=!0;else for(let t of e)F(this,K,`f`).key[t]=!0}};function jn(e){return!!e&&typeof e.getInternalMethods==`function`}const Mn=qt(ze);var Nn=Mn;function Pn(e,t){let n=e.startsWith(`.`)?u(t,e):e;return import(n)}function Fn(e,t){return Pn(e,t).catch(e=>{if(e.code===`ERR_MODULE_NOT_FOUND`&&e.message.endsWith(` imported from ${g(import.meta.url)}`))return!1;throw e})}function In(e){return Object.keys(e).some(e=>e&&e!==`$0`)}function Ln(e,t){let{homepage:n,site:r=n,repository:i}=t,a=r&&r!==i,o=e.getInternalMethods(),s=In(o.getCommandInstance().handlers);return o.getUsageInstance().getUsage().length===0&&(s?e.usage(`Usage: $0 <command>`):e.usage(`Usage: $0`)),s&&e.demandCommand(1,`Won't work without a command`),a&&e.epilogue(`Website: ${r}`),i&&e.epilogue(`Repository: ${i}`),e}function Rn(e,t){if(typeof e==`string`||!e)return t;let n=Object.keys(e);return n.length===1?n[0]:!1}var zn=class{constructor(e,n){this.root=n;let{bin:r,homepage:i,name:a=`cheetor`,repository:{url:o=``}={},version:s}=typeof e==`string`?JSON.parse(t(new URL(e,n))):e;this.homepage=i,this.repository=o.includes(`github.com`)?o.replace(/\.git$/,``):``;let c=Nn(process.argv.slice(2)).strict().alias(`help`,`h`).alias(`version`,`v`).hide(`help`).version(s).hide(`version`).detectLocale(!1),l=Rn(r,a);l&&c.scriptName(l),this.cli=Promise.resolve(c)}config(e){return this.cli=this.cli.then(e),this}command(...e){return this.cli=this.cli.then(t=>t.command(...e)),this}commandFrom(e){return this.cli=this.cli.then(async t=>{let n=await Pn(e,this.root);return t.command(n)}),this}commandSafe(e){return this.cli=this.cli.then(t=>Fn(e,this.root).then(e=>e&&e.command?t.command(e):t)),this}commandSmart(e){return this.cli=this.cli.then(async t=>{let n=e();return n&&n.command?t.command(n):t}),this}website(e){return this.site=e,this}middleware(...e){return this.cli=this.cli.then(t=>t.middleware(...e)),this}setup(e){return this.cli.then(e=>Ln(e,this)).then(t=>typeof e==`function`?e(t.parse()):t.parse())}};process.on(`SIGINT`,()=>{}),new zn(`../package.json`,import.meta.url).website(`https://www.npmjs.com/org/nice-move`).setup(()=>{import(`./lib-CE3Cn25u.mjs`).then(({init:e})=>{e()}).catch(e=>{if(e.message!==`cancel`)throw e})});
|