@nice-move/cli 0.7.2 → 0.8.2

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 ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire as e}from"module";var t,n,r,i,s={8995:(e,t,n)=>{const r=n(32081),i=n(19015),s=n(95350);function o(e,t,n){const o=i(e,t,n),a=r.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,n){const o=i(e,t,n),a=r.spawnSync(o.command,o.args,o.options);return a.error=a.error||s.verifyENOENTSync(a.status,o),a},e.exports._parse=i,e.exports._enoent=s},95350:e=>{const t="win32"===process.platform;function n(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 r(e,r){return t&&1===e&&!r.file?n(r.original,"spawn"):null}e.exports={hookChildProcess:function(e,n){if(!t)return;const i=e.emit;e.emit=function(t,s){if("exit"===t){const t=r(s,n);if(t)return i.call(e,"error",t)}return i.apply(e,arguments)}},verifyENOENT:r,verifyENOENTSync:function(e,r){return t&&1===e&&!r.file?n(r.original,"spawnSync"):null},notFoundError:n}},19015:(e,t,n)=>{const r=n(71017),i=n(65358),s=n(16214),o=n(63106),a="win32"===process.platform,c=/\.(?:com|exe)$/i,l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function u(e){if(!a)return e;const t=function(e){e.file=i(e);const t=e.file&&o(e.file);return t?(e.args.unshift(e.file),e.command=t,i(e)):e.file}(e),n=!c.test(t);if(e.options.forceShell||n){const n=l.test(t);e.command=r.normalize(e.command),e.command=s.command(e.command),e.args=e.args.map((e=>s.argument(e,n)));const i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}e.exports=function(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null);const r={command:e,args:t=t?t.slice(0):[],options:n=Object.assign({},n),file:void 0,original:{command:e,args:t}};return n.shell?r:u(r)}},16214:e=>{const t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e=e.replace(t,"^$1")},e.exports.argument=function(e,n){return e=(e=`"${e=(e=(e=`${e}`).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(t,"^$1"),n&&(e=e.replace(t,"^$1")),e}},63106:(e,t,n)=>{const r=n(57147),i=n(14256);e.exports=function(e){const t=Buffer.alloc(150);let n;try{n=r.openSync(e,"r"),r.readSync(n,t,0,150,0),r.closeSync(n)}catch(e){}return i(t.toString())}},65358:(e,t,n)=>{const r=n(71017),i=n(1468),s=n(26569);function o(e,t){const n=e.options.env||process.env,o=process.cwd(),a=null!=e.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch(e){}let l;try{l=i.sync(e.command,{path:n[s({env:n})],pathExt:t?r.delimiter:void 0})}catch(e){}finally{c&&process.chdir(o)}return l&&(l=r.resolve(a?e.options.cwd:"",l)),l}e.exports=function(e){return o(e)||o(e,!0)}},1468:(e,t,n)=>{const r="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,i=n(71017),s=r?";":":",o=n(5909),a=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),c=(e,t)=>{const n=t.colon||s,i=e.match(/\//)||r&&e.match(/\\/)?[""]:[...r?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],o=r?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=r?o.split(n):[""];return r&&-1!==e.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:o}},l=(e,t,n)=>{"function"==typeof t&&(n=t,t={}),t||(t={});const{pathEnv:r,pathExt:s,pathExtExe:l}=c(e,t),u=[],d=n=>new Promise(((s,o)=>{if(n===r.length)return t.all&&u.length?s(u):o(a(e));const c=r[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=i.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;s(h(f,n,0))})),h=(e,n,r)=>new Promise(((i,a)=>{if(r===s.length)return i(d(n+1));const c=s[r];o(e+c,{pathExt:l},((s,o)=>{if(!s&&o){if(!t.all)return i(e+c);u.push(e+c)}return i(h(e,n,r+1))}))}));return n?d(0).then((e=>n(null,e)),n):d(0)};e.exports=l,l.sync=(e,t)=>{t=t||{};const{pathEnv:n,pathExt:r,pathExtExe:s}=c(e,t),l=[];for(let a=0;a<n.length;a++){const c=n[a],u=/^".*"$/.test(c)?c.slice(1,-1):c,d=i.join(u,e),h=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<r.length;e++){const n=h+r[e];try{if(o.sync(n,{pathExt:s})){if(!t.all)return n;l.push(n)}}catch(e){}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw a(e)}},18797:(e,t,n)=>{var r=n(29928),i=function(){},s=function(e,t,n){if("function"==typeof t)return s(e,null,t);t||(t={}),n=r(n||i);var o=e._writableState,a=e._readableState,c=t.readable||!1!==t.readable&&e.readable,l=t.writable||!1!==t.writable&&e.writable,u=!1,d=function(){e.writable||h()},h=function(){l=!1,c||n.call(e)},f=function(){c=!1,l||n.call(e)},p=function(t){n.call(e,t?new Error("exited with error code: "+t):null)},m=function(t){n.call(e,t)},g=function(){process.nextTick(y)},y=function(){if(!u)return(!c||a&&a.ended&&!a.destroyed)&&(!l||o&&o.ended&&!o.destroyed)?void 0:n.call(e,new Error("premature close"))},b=function(){e.req.on("finish",h)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?l&&!o&&(e.on("end",d),e.on("close",d)):(e.on("complete",h),e.on("abort",g),e.req?b():e.on("request",b)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",p),e.on("end",f),e.on("finish",h),!1!==t.error&&e.on("error",m),e.on("close",g),function(){u=!0,e.removeListener("complete",h),e.removeListener("abort",g),e.removeListener("request",b),e.req&&e.req.removeListener("finish",h),e.removeListener("end",d),e.removeListener("close",d),e.removeListener("finish",h),e.removeListener("exit",p),e.removeListener("end",f),e.removeListener("error",m),e.removeListener("close",g)}};e.exports=s},23799:(e,t,n)=>{const r=n(71017),i=n(32081),s=n(8995),o=n(36178),a=n(9002),c=n(83937),l=n(97860),u=n(10407),{spawnedKill:d,spawnedCancel:h,setupTimeout:f,setExitHandler:p}=n(5454),{handleInput:m,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=n(53036),{mergePromise:v,getSpawnedPromise:w}=n(24578),{joinCommand:x,parseCommand:O}=n(82899),S=(e,t,n={})=>{const i=s._parse(e,t,n);return e=i.command,t=i.args,(n={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(n=i.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n}).env=(({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:i})=>{const s=t?{...process.env,...e}:e;return n?a.env({env:s,cwd:r,execPath:i}):s})(n),n.stdio=u(n),"win32"===process.platform&&"cmd"===r.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:n,parsed:i}},E=(e,t,n)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===n?void 0:"",j=(e,t,n)=>{const r=S(e,t,n),o=x(e,t);let a;try{a=i.spawn(r.file,r.args,r.options)}catch(e){const t=new i.ChildProcess,n=Promise.reject(l({error:e,stdout:"",stderr:"",all:"",command:o,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return v(t,n)}const u=w(a),b=f(a,r.options,u),O=p(a,r.options,b),j={isCanceled:!1};a.kill=d.bind(null,a.kill.bind(a)),a.cancel=h.bind(null,a,j);const C=c((async()=>{const[{error:e,exitCode:t,signal:n,timedOut:i},s,c,u]=await g(a,r.options,O),d=E(r.options,s),h=E(r.options,c),f=E(r.options,u);if(e||0!==t||null!==n){const s=l({error:e,exitCode:t,signal:n,stdout:d,stderr:h,all:f,command:o,parsed:r,timedOut:i,isCanceled:j.isCanceled,killed:a.killed});if(!r.options.reject)return s;throw s}return{command:o,exitCode:0,stdout:d,stderr:h,all:f,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return s._enoent.hookChildProcess(a,r.parsed),m(a,r.options.input),a.all=y(a,r.options),v(a,C)};e.exports=j,e.exports.sync=(e,t,n)=>{const r=S(e,t,n),s=x(e,t);let o;b(r.options);try{o=i.spawnSync(r.file,r.args,r.options)}catch(e){throw l({error:e,stdout:"",stderr:"",all:"",command:s,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}const a=E(r.options,o.stdout,o.error),c=E(r.options,o.stderr,o.error);if(o.error||0!==o.status||null!==o.signal){const e=l({stdout:a,stderr:c,error:o.error,signal:o.signal,exitCode:o.status,command:s,parsed:r,timedOut:o.error&&"ETIMEDOUT"===o.error.code,isCanceled:!1,killed:null!==o.signal});if(!r.options.reject)return e;throw e}return{command:s,exitCode:0,stdout:a,stderr:c,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},e.exports.command=(e,t)=>{const[n,...r]=O(e);return j(n,r,t)},e.exports.commandSync=(e,t)=>{const[n,...r]=O(e);return j.sync(n,r,t)},e.exports.node=(e,t,n={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(n=t,t=[]);const r=u.node(n),i=process.execArgv.filter((e=>!e.startsWith("--inspect"))),{nodePath:s=process.execPath,nodeOptions:o=i}=n;return j(s,[...o,e,...Array.isArray(t)?t:[]],{...n,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})}},82899:e=>{const t=/ +/g;e.exports={joinCommand:(e,t=[])=>Array.isArray(t)?[e,...t].join(" "):e,parseCommand:e=>{const n=[];for(const r of e.trim().split(t)){const e=n[n.length-1];e&&e.endsWith("\\")?n[n.length-1]=`${e.slice(0,-1)} ${r}`:n.push(r)}return n}}},97860:(e,t,n)=>{const{signalsByName:r}=n(83954);e.exports=({stdout:e,stderr:t,all:n,error:i,signal:s,exitCode:o,command:a,timedOut:c,isCanceled:l,killed:u,parsed:{options:{timeout:d}}})=>{o=null===o?void 0:o;const h=void 0===(s=null===s?void 0:s)?void 0:r[s].description,f=(({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:i,exitCode:s,isCanceled:o})=>e?`timed out after ${t} milliseconds`:o?"was canceled":void 0!==n?`failed with ${n}`:void 0!==r?`was killed with ${r} (${i})`:void 0!==s?`failed with exit code ${s}`:"failed")({timedOut:c,timeout:d,errorCode:i&&i.code,signal:s,signalDescription:h,exitCode:o,isCanceled:l}),p=`Command ${f}: ${a}`,m="[object Error]"===Object.prototype.toString.call(i),g=m?`${p}\n${i.message}`:p,y=[g,t,e].filter(Boolean).join("\n");return m?(i.originalMessage=i.message,i.message=y):i=new Error(y),i.shortMessage=g,i.command=a,i.exitCode=o,i.signal=s,i.signalDescription=h,i.stdout=e,i.stderr=t,void 0!==n&&(i.all=n),"bufferedData"in i&&delete i.bufferedData,i.failed=!0,i.timedOut=Boolean(c),i.isCanceled=l,i.killed=u&&!c,i}},5454:(e,t,n)=>{const r=n(22037),i=n(90260),s=(e,t,n,r)=>{if(!o(t,n,r))return;const i=c(n),s=setTimeout((()=>{e("SIGKILL")}),i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},n)=>a(e)&&!1!==t&&n,a=e=>e===r.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};e.exports={spawnedKill:(e,t="SIGTERM",n={})=>{const r=e(t);return s(e,t,n,r),r},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(0===t||void 0===t)return r;if(!Number.isFinite(t)||t<0)throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);let i;const s=new Promise(((r,s)=>{i=setTimeout((()=>{((e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,n,s)}),t)})),o=r.finally((()=>{clearTimeout(i)}));return Promise.race([s,o])},setExitHandler:async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;const s=i((()=>{e.kill()}));return r.finally((()=>{s()}))}}},24578:e=>{const t=(async()=>{})().constructor.prototype,n=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(t,e)]));e.exports={mergePromise:(e,t)=>{for(const[r,i]of n){const n="function"==typeof t?(...e)=>Reflect.apply(i.value,t(),e):i.value.bind(t);Reflect.defineProperty(e,r,{...i,value:n})}return e},getSpawnedPromise:e=>new Promise(((t,n)=>{e.on("exit",((e,n)=>{t({exitCode:e,signal:n})})),e.on("error",(e=>{n(e)})),e.stdin&&e.stdin.on("error",(e=>{n(e)}))}))}},10407:e=>{const t=["stdin","stdout","stderr"],n=e=>{if(!e)return;const{stdio:n}=e;if(void 0===n)return t.map((t=>e[t]));if((e=>t.some((t=>void 0!==e[t])))(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${t.map((e=>`\`${e}\``)).join(", ")}`);if("string"==typeof n)return n;if(!Array.isArray(n))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof n}\``);const r=Math.max(n.length,t.length);return Array.from({length:r},((e,t)=>n[t]))};e.exports=n,e.exports.node=e=>{const t=n(e);return"ipc"===t?"ipc":void 0===t||"string"==typeof t?[t,t,t,"ipc"]:t.includes("ipc")?t:[...t,"ipc"]}},53036:(e,t,n)=>{const r=n(58607),i=n(22935),s=n(90873),o=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},a=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(e&&n)return t?i(e,{encoding:t,maxBuffer:r}):i.buffer(e,{maxBuffer:r})};e.exports={handleInput:(e,t)=>{void 0!==t&&void 0!==e.stdin&&(r(t)?t.pipe(e.stdin):e.stdin.end(t))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=s();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:n},{encoding:r,buffer:i,maxBuffer:s},c)=>{const l=a(e,{encoding:r,buffer:i,maxBuffer:s}),u=a(t,{encoding:r,buffer:i,maxBuffer:s}),d=a(n,{encoding:r,buffer:i,maxBuffer:2*s});try{return await Promise.all([c,l,u,d])}catch(r){return Promise.all([{error:r,signal:r.signal,timedOut:r.timedOut},o(e,l),o(t,u),o(n,d)])}},validateInputSync:({input:e})=>{if(r(e))throw new TypeError("The `input` option cannot be a stream in sync mode")}}},54337:(e,t,n)=>{const{PassThrough:r}=n(12781);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:n}=e;const i="buffer"===n;let s=!1;t?s=!(n||i):n=n||"utf8",i&&(n=null);const o=new r({objectMode:s});n&&o.setEncoding(n);let a=0;const c=[];return o.on("data",(e=>{c.push(e),s?a=c.length:a+=e.length})),o.getBufferedValue=()=>t?c:i?Buffer.concat(c,a):c.join(""),o.getBufferedLength=()=>a,o}},22935:(e,t,n)=>{const{constants:r}=n(14300),i=n(3171),s=n(54337);class o extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function a(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t={maxBuffer:1/0,...t};const{maxBuffer:n}=t;let a;return await new Promise(((c,l)=>{const u=e=>{e&&a.getBufferedLength()<=r.MAX_LENGTH&&(e.bufferedData=a.getBufferedValue()),l(e)};a=i(e,s(t),(e=>{e?u(e):c()})),a.on("data",(()=>{a.getBufferedLength()>n&&u(new o)}))})),a.getBufferedValue()}e.exports=a,e.exports.default=a,e.exports.buffer=(e,t)=>a(e,{...t,encoding:"buffer"}),e.exports.array=(e,t)=>a(e,{...t,array:!0}),e.exports.MaxBufferError=o},55793:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SIGNALS=void 0;t.SIGNALS=[{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"}]},83954:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.signalsByNumber=t.signalsByName=void 0;var r=n(22037),i=n(49030),s=n(15260);const o=function(e,{name:t,number:n,description:r,supported:i,action:s,forced:o,standard:a}){return{...e,[t]:{name:t,number:n,description:r,supported:i,action:s,forced:o,standard:a}}},a=(0,i.getSignals)().reduce(o,{});t.signalsByName=a;const c=function(e,t){const n=l(e,t);if(void 0===n)return{};const{name:r,description:i,supported:s,action:o,forced:a,standard:c}=n;return{[e]:{name:r,number:e,description:i,supported:s,action:o,forced:a,standard:c}}},l=function(e,t){const n=t.find((({name:t})=>r.constants.signals[t]===e));return void 0!==n?n:t.find((t=>t.number===e))},u=function(){const e=(0,i.getSignals)(),t=s.SIGRTMAX+1,n=Array.from({length:t},((t,n)=>c(n,e)));return Object.assign({},...n)}();t.signalsByNumber=u},15260:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SIGRTMAX=t.getRealtimeSignals=void 0;t.getRealtimeSignals=function(){const e=i-r+1;return Array.from({length:e},n)};const n=function(e,t){return{name:`SIGRT${t+1}`,number:r+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},r=34,i=64;t.SIGRTMAX=i},49030:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSignals=void 0;var r=n(22037),i=n(55793),s=n(15260);t.getSignals=function(){const e=(0,s.getRealtimeSignals)();return[...i.SIGNALS,...e].map(o)};const o=function({name:e,number:t,description:n,action:i,forced:s=!1,standard:o}){const{signals:{[e]:a}}=r.constants,c=void 0!==a;return{name:e,number:c?a:t,description:n,supported:c,action:i,forced:s,standard:o}}},5019:(e,t,n)=>{var r=n(67549),i=n(54725);function s(e){if("string"!=typeof e)throw new TypeError("isAbsolute expects a string.");return i()?s.win32(e):s.posix(e)}e.exports=s,s.posix=function(e){return"/"===e.charAt(0)},s.win32=function(e){return!(!/[a-z]/i.test(e.charAt(0))||":"!==e.charAt(1)||"\\"!==e.charAt(2))||("\\\\"===e.slice(0,2)||!r(e))}},77918:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(23799)),s=r(n(71017)),o=r(n(5019)),a=process.cwd();t.default=function(e){void 0===e&&(e=a);var t=o.default(e)?e:s.default.join(a,e);try{return i.default.commandSync("git rev-parse --is-inside-work-tree",{cwd:t}),!0}catch(e){return!1}},e.exports=t.default},67549:(e,t,n)=>{var r=n(64e3);e.exports=function(e){if("string"!=typeof e)throw new TypeError("expected filepath to be a string");return!r(e)&&!/^([a-z]:)?[\\\/]/i.test(e)}},58607:e=>{const t=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;t.writable=e=>t(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,t.readable=e=>t(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,t.duplex=e=>t.writable(e)&&t.readable(e),t.transform=e=>t.duplex(e)&&"function"==typeof e._transform,e.exports=t},64e3:(e,t,n)=>{var r=n(72191)();e.exports=function(e){if("string"!=typeof e)throw new TypeError("expected a string");return r.test(e)}},54725:(e,t)=>{!function(n){t&&"object"==typeof t?e.exports=n():"function"==typeof define&&define.amd?define([],n):"undefined"!=typeof window?window.isWindows=n():"undefined"!=typeof global?global.isWindows=n():"undefined"!=typeof self?self.isWindows=n():this.isWindows=n()}((function(){return function(){return process&&("win32"===process.platform||/^(msys|cygwin)$/.test(process.env.OSTYPE))}}))},5909:(e,t,n)=>{var r;n(57147);function i(e,t,n){if("function"==typeof t&&(n=t,t={}),!n){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(n,r){i(e,t||{},(function(e,t){e?r(e):n(t)}))}))}r(e,t||{},(function(e,r){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)}))}r="win32"===process.platform||global.TESTING_WINDOWS?n(90837):n(74703),e.exports=i,i.sync=function(e,t){try{return r.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},74703:(e,t,n)=>{e.exports=i,i.sync=function(e,t){return s(r.statSync(e),t)};var r=n(57147);function i(e,t,n){r.stat(e,(function(e,r){n(e,!e&&s(r,t))}))}function s(e,t){return e.isFile()&&function(e,t){var n=e.mode,r=e.uid,i=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),c=parseInt("010",8),l=parseInt("001",8),u=a|c;return n&l||n&c&&i===o||n&a&&r===s||n&u&&0===s}(e,t)}},90837:(e,t,n)=>{e.exports=s,s.sync=function(e,t){return i(r.statSync(e),e,t)};var r=n(57147);function i(e,t,n){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var n=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!n)return!0;if(-1!==(n=n.split(";")).indexOf(""))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}(t,n)}function s(e,t,n){r.stat(e,(function(r,s){n(r,!r&&i(s,e,t))}))}},90873:(e,t,n)=>{const{PassThrough:r}=n(12781);e.exports=function(){var e=[],t=new r({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=i,t.on("unpipe",s),Array.prototype.slice.call(arguments).forEach(n),t;function n(r){return Array.isArray(r)?(r.forEach(n),this):(e.push(r),r.once("end",s.bind(null,r)),r.once("error",t.emit.bind(t,"error")),r.pipe(t,{end:!1}),this)}function i(){return 0==e.length}function s(n){!(e=e.filter((function(e){return e!==n}))).length&&t.readable&&t.end()}}},9002:(e,t,n)=>{const r=n(71017),i=n(26569),s=e=>{let t;e={cwd:process.cwd(),path:process.env[i()],execPath:process.execPath,...e};let n=r.resolve(e.cwd);const s=[];for(;t!==n;)s.push(r.join(n,"node_modules/.bin")),t=n,n=r.resolve(n,"..");const o=r.resolve(e.cwd,e.execPath,"..");return s.push(o),s.concat(e.path).join(r.delimiter)};e.exports=s,e.exports.default=s,e.exports.env=t=>{const n={...(t={env:process.env,...t}).env},r=i({env:n});return t.path=n[r],n[r]=e.exports(t),n}},29928:(e,t,n)=>{var r=n(68892);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function s(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}e.exports=r(i),e.exports.strict=r(s),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return s(this)},configurable:!0})}))},83937:(e,t,n)=>{const r=n(26587),i=new WeakMap,s=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let n,s=0;const o=e.displayName||e.name||"<anonymous>",a=function(...r){if(i.set(a,++s),1===s)n=e.apply(this,r),e=null;else if(!0===t.throw)throw new Error(`Function \`${o}\` can only be called once`);return n};return r(a,e),i.set(a,s),a};e.exports=s,e.exports.default=s,e.exports.callCount=e=>{if(!i.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return i.get(e)}},26587:e=>{const t=(e,t)=>{for(const n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};e.exports=t,e.exports.default=t},26569: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},3171:(e,t,n)=>{var r=n(29928),i=n(18797),s=n(57147),o=function(){},a=/^v?\.0/.test(process.version),c=function(e){return"function"==typeof e},l=function(e,t,n,l){l=r(l);var u=!1;e.on("close",(function(){u=!0})),i(e,{readable:t,writable:n},(function(e){if(e)return l(e);u=!0,l()}));var d=!1;return function(t){if(!u&&!d)return d=!0,function(e){return!!a&&!!s&&(e instanceof(s.ReadStream||o)||e instanceof(s.WriteStream||o))&&c(e.close)}(e)?e.close(o):function(e){return e.setHeader&&c(e.abort)}(e)?e.abort():c(e.destroy)?e.destroy():void l(t||new Error("stream was destroyed"))}},u=function(e){e()},d=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),n=c(t[t.length-1]||o)&&t.pop()||o;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r=t.map((function(i,s){var o=s<t.length-1;return l(i,o,s>0,(function(t){e||(e=t),t&&r.forEach(u),o||(r.forEach(u),n(e))}))}));return t.reduce(d)}},14256:(e,t,n)=>{const r=n(83882);e.exports=(e="")=>{const t=e.match(r);if(!t)return null;const[n,i]=t[0].replace(/#! ?/,"").split(" "),s=n.split("/").pop();return"env"===s?i:i?`${s} ${i}`:s}},83882:e=>{e.exports=/^#!(.*)/},90260:(e,t,n)=>{var r=global.process;const i=function(e){return 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};if(i(r)){var s,o=n(39491),a=n(83261),c=/^win/i.test(r.platform),l=n(82361);"function"!=typeof l&&(l=l.EventEmitter),r.__signal_exit_emitter__?s=r.__signal_exit_emitter__:((s=r.__signal_exit_emitter__=new l).count=0,s.emitted={}),s.infinite||(s.setMaxListeners(1/0),s.infinite=!0),e.exports=function(e,t){if(!i(global.process))return function(){};o.equal(typeof e,"function","a callback must be provided for exit handler"),!1===f&&p();var n="exit";t&&t.alwaysLast&&(n="afterexit");return s.on(n,e),function(){s.removeListener(n,e),0===s.listeners("exit").length&&0===s.listeners("afterexit").length&&u()}};var u=function(){f&&i(global.process)&&(f=!1,a.forEach((function(e){try{r.removeListener(e,h[e])}catch(e){}})),r.emit=y,r.reallyExit=m,s.count-=1)};e.exports.unload=u;var d=function(e,t,n){s.emitted[e]||(s.emitted[e]=!0,s.emit(e,t,n))},h={};a.forEach((function(e){h[e]=function(){i(global.process)&&(r.listeners(e).length===s.count&&(u(),d("exit",null,e),d("afterexit",null,e),c&&"SIGHUP"===e&&(e="SIGINT"),r.kill(r.pid,e)))}})),e.exports.signals=function(){return a};var f=!1,p=function(){!f&&i(global.process)&&(f=!0,s.count+=1,a=a.filter((function(e){try{return r.on(e,h[e]),!0}catch(e){return!1}})),r.emit=b,r.reallyExit=g)};e.exports.load=p;var m=r.reallyExit,g=function(e){i(global.process)&&(r.exitCode=e||0,d("exit",r.exitCode,null),d("afterexit",r.exitCode,null),m.call(r,r.exitCode))},y=r.emit,b=function(e,t){if("exit"===e&&i(global.process)){void 0!==t&&(r.exitCode=t);var n=y.apply(this,arguments);return d("exit",r.exitCode,null),d("afterexit",r.exitCode,null),n}return y.apply(this,arguments)}}else e.exports=function(){return function(){}}},83261:e=>{e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")},36178:e=>{e.exports=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),n="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===n&&(e=e.slice(0,e.length-1)),e}},72191:e=>{e.exports=function(){return/^[\\\/]{2,}[^\\\/]+[\\\/]+[^\\\/]+/}},68892:e=>{e.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}}},55105:(e,t,n)=>{const{PassThrough:r}=n(12781);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:n}=e;const i="buffer"===n;let s=!1;t?s=!(n||i):n=n||"utf8",i&&(n=null);const o=new r({objectMode:s});n&&o.setEncoding(n);let a=0;const c=[];return o.on("data",(e=>{c.push(e),s?a=c.length:a+=e.length})),o.getBufferedValue=()=>t?c:i?Buffer.concat(c,a):c.join(""),o.getBufferedLength=()=>a,o}},10031:(e,t,n)=>{const{constants:r}=n(14300),i=n(12781),{promisify:s}=n(73837),o=n(55105),a=s(i.pipeline);class c extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:n}=t,i=o(t);return await new Promise(((t,s)=>{const o=e=>{e&&i.getBufferedLength()<=r.MAX_LENGTH&&(e.bufferedData=i.getBufferedValue()),s(e)};(async()=>{try{await a(e,i),t()}catch(e){o(e)}})(),i.on("data",(()=>{i.getBufferedLength()>n&&o(new c)}))})),i.getBufferedValue()}e.exports=l,e.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),e.exports.array=(e,t)=>l(e,{...t,array:!0}),e.exports.MaxBufferError=c},39491:t=>{t.exports=e(import.meta.url)("assert")},14300:t=>{t.exports=e(import.meta.url)("buffer")},32081:t=>{t.exports=e(import.meta.url)("child_process")},82361:t=>{t.exports=e(import.meta.url)("events")},57147:t=>{t.exports=e(import.meta.url)("fs")},22037:t=>{t.exports=e(import.meta.url)("os")},71017:t=>{t.exports=e(import.meta.url)("path")},12781:t=>{t.exports=e(import.meta.url)("stream")},76224:t=>{t.exports=e(import.meta.url)("tty")},73837:t=>{t.exports=e(import.meta.url)("util")}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return s[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=s,n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var i=Object.create(null);a.r(i);var s={};t=t||[null,n({}),n([]),n(n)];for(var o=2&r&&e;"object"==typeof o&&!~t.indexOf(o);o=n(o))Object.getOwnPropertyNames(o).forEach((t=>s[t]=()=>e[t]));return s.default=()=>e,a.d(i,s),i},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>e+".mjs",a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r={442:0},i=e=>{var t,n,{ids:i,modules:s,runtime:o}=e,c=0;for(t in s)a.o(s,t)&&(a.m[t]=s[t]);for(o&&o(a);c<i.length;c++)n=i[c],a.o(r,n)&&r[n]&&r[n][0](),r[i[c]]=0},a.f.j=(e,t)=>{var n=a.o(r,e)?r[e]:void 0;if(0!==n)if(n)t.push(n[1]);else{var s=import("./"+a.u(e)).then(i,(t=>{throw 0!==r[e]&&(r[e]=void 0),t}));s=Promise.race([s,new Promise((t=>n=r[e]=[t]))]),t.push(n[1]=s)}},(()=>{var t={};a.r(t),a.d(t,{builder:()=>Yn,command:()=>qn,description:()=>Vn,gitSupport:()=>Kn});var n={};a.r(n),a.d(n,{builder:()=>rr,command:()=>nr});var r=a(57147),i=a(39491);const s={right:function(e,t){e=e.trim();const n=l.stringWidth(e);if(n<t)return" ".repeat(t-n)+e;return e},center:function(e,t){e=e.trim();const n=l.stringWidth(e);if(n>=t)return e;return" ".repeat(t-n>>1)+e}};class o{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 n=0;return t.forEach((e=>{e.length>1&&l.stringWidth(e[0])>n&&(n=Math.min(Math.floor(.5*this.width),l.stringWidth(e[0])))})),t.forEach((e=>{this.div(...e.map(((t,r)=>({text:t.trim(),padding:this.measurePadding(t),width:0===r&&e.length>1?n:void 0}))))})),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){const t=l.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(((n,r)=>{let i="";n.forEach(((n,o)=>{const{width:a}=e[o],u=this.negatePadding(e[o]);let d=n;if(u>l.stringWidth(n)&&(d+=" ".repeat(u-l.stringWidth(n))),e[o].align&&"left"!==e[o].align&&this.wrap){d=(0,s[e[o].align])(d,u),l.stringWidth(d)<u&&(d+=" ".repeat((a||0)-l.stringWidth(d)-1))}const h=e[o].padding||[0,0,0,0];h[3]&&(i+=" ".repeat(h[3])),i+=c(e[o],d,"| "),i+=d,i+=c(e[o],d," |"),h[1]&&(i+=" ".repeat(h[1])),0===r&&t.length>0&&(i=this.renderInline(i,t[t.length-1]))})),t.push({text:i.replace(/ +$/,""),span:e.span})})),t}renderInline(e,t){const n=e.match(/^ */),r=n?n[0].length:0,i=t.text,s=l.stringWidth(i.trimRight());return t.span?this.wrap?r<s?e:(t.hidden=!0,i.trimRight()+" ".repeat(r-s)+e.trimLeft()):(t.hidden=!0,i+e):e}rasterize(e){const t=[],n=this.columnWidths(e);let r;return e.forEach(((e,i)=>{e.width=n[i],r=this.wrap?l.wrap(e.text,this.negatePadding(e),{hard:!0}).split("\n"):e.text.split("\n"),e.border&&(r.unshift("."+"-".repeat(this.negatePadding(e)+2)+"."),r.push("'"+"-".repeat(this.negatePadding(e)+2)+"'")),e.padding&&(r.unshift(...new Array(e.padding[0]||0).fill("")),r.push(...new Array(e.padding[2]||0).fill(""))),r.forEach(((e,n)=>{t[n]||t.push([]);const r=t[n];for(let e=0;e<i;e++)void 0===r[e]&&r.push("");r.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||l.stringWidth(e.text)));let t=e.length,n=this.width;const 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)=>void 0===t?Math.max(i,function(e){const t=e.padding||[],n=1+(t[3]||0)+(t[1]||0);if(e.border)return n+4;return n}(e[n])):t))}}function c(e,t,n){return e.border?/[.']-+[.']/.test(t)?"":0!==t.trim().length?n:" ":""}let l;const u=new RegExp("\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function d(e){return e.replace(u,"")}function h(e,t){const[n,r]=e.match(u)||["",""];e=d(e);let i="";for(let n=0;n<e.length;n++)0!==n&&n%t==0&&(i+="\n"),i+=e.charAt(n);return n&&r&&(i=`${n}${i}${r}`),i}var f=a(71017);var p=a(73837);const m=e(import.meta.url)("url");function g(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),-1===e.indexOf("-")&&-1===e.indexOf("_"))return e;{let t="",n=!1;const 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()),0===i||"-"!==r&&"_"!==r?"-"!==r&&"_"!==r&&(t+=r):n=!0}return t}}function y(e,t){const n=e.toLowerCase();t=t||"-";let r="";for(let i=0;i<e.length;i++){const s=n.charAt(i),o=e.charAt(i);r+=s!==o&&i>0?`${t}${n.charAt(i)}`:o}return r}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)))}var v;let w;!function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"}(v||(v={}));function x(e){return void 0!==e?e+1:1}function O(e){return"__proto__"===e?"___proto___":e}const S=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12;if(process&&process.version){if(Number(process.version.match(/v([^.]+)/)[1])<S)throw Error(`yargs parser supports a minimum Node.js version of ${S}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`)}const E=process?process.env:{},j=new class{constructor(e){w=e}parse(e,t){const 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=function(e){if(Array.isArray(e))return e.map((e=>"string"!=typeof e?e+"":e));e=e.trim();let t=0,n=null,r=null,i=null;const s=[];for(let o=0;o<e.length;o++)n=r,r=e.charAt(o)," "!==r||i?(r===i?i=null:"'"!==r&&'"'!==r||i||(i=r),s[t]||(s[t]=""),s[t]+=r):" "!==n&&t++;return s}(e),i="string"==typeof e,s=function(e){const t=[],n=Object.create(null);let r=!0;Object.keys(e).forEach((function(n){t.push([].concat(e[n],n))}));for(;r;){r=!1;for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){if(t[e].filter((function(e){return-1!==t[n].indexOf(e)})).length){t[e]=t[e].concat(t[n]),t.splice(n,1),r=!0;break}}}return t.forEach((function(e){const t=(e=e.filter((function(e,t,n){return n.indexOf(e)===t}))).pop();void 0!==t&&"string"==typeof t&&(n[t]=e)})),n}(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),a=Object.assign(Object.create(null),n.default),c=n.configObjects||[],l=n.envPrefix,u=o["populate--"],d=u?"--":"_",h=Object.create(null),f=Object.create(null),p=n.__||w.format,m={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:[]},S=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,E=new RegExp("^--"+o["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach((function(e){const t="object"==typeof e?e.key:e,n=Object.keys(e).map((function(e){return{boolean:"bools",string:"strings",number:"numbers"}[e]})).filter(Boolean).pop();n&&(m[n][t]=!0),m.arrays[t]=!0,m.keys.push(t)})),[].concat(n.boolean||[]).filter(Boolean).forEach((function(e){m.bools[e]=!0,m.keys.push(e)})),[].concat(n.string||[]).filter(Boolean).forEach((function(e){m.strings[e]=!0,m.keys.push(e)})),[].concat(n.number||[]).filter(Boolean).forEach((function(e){m.numbers[e]=!0,m.keys.push(e)})),[].concat(n.count||[]).filter(Boolean).forEach((function(e){m.counts[e]=!0,m.keys.push(e)})),[].concat(n.normalize||[]).filter(Boolean).forEach((function(e){m.normalize[e]=!0,m.keys.push(e)})),"object"==typeof n.narg&&Object.entries(n.narg).forEach((([e,t])=>{"number"==typeof t&&(m.nargs[e]=t,m.keys.push(e))})),"object"==typeof n.coerce&&Object.entries(n.coerce).forEach((([e,t])=>{"function"==typeof t&&(m.coercions[e]=t,m.keys.push(e))})),void 0!==n.config&&(Array.isArray(n.config)||"string"==typeof n.config?[].concat(n.config).filter(Boolean).forEach((function(e){m.configs[e]=!0})):"object"==typeof n.config&&Object.entries(n.config).forEach((([e,t])=>{"boolean"!=typeof t&&"function"!=typeof t||(m.configs[e]=t)}))),function(...e){e.forEach((function(e){Object.keys(e||{}).forEach((function(e){m.aliases[e]||(m.aliases[e]=[].concat(s[e]||[]),m.aliases[e].concat(e).forEach((function(t){if(/-/.test(t)&&o["camel-case-expansion"]){const n=g(t);n!==e&&-1===m.aliases[e].indexOf(n)&&(m.aliases[e].push(n),h[n]=!0)}})),m.aliases[e].concat(e).forEach((function(t){if(t.length>1&&/[A-Z]/.test(t)&&o["camel-case-expansion"]){const n=y(t,"-");n!==e&&-1===m.aliases[e].indexOf(n)&&(m.aliases[e].push(n),h[n]=!0)}})),m.aliases[e].forEach((function(t){m.aliases[t]=[e].concat(m.aliases[e].filter((function(e){return t!==e})))})))}))}))}(n.key,s,n.default,m.arrays),Object.keys(a).forEach((function(e){(m.aliases[e]||[]).forEach((function(t){a[t]=a[e]}))}));let j=null;Object.keys(m.counts).find((e=>B(e,m.arrays)?(j=Error(p("Invalid configuration: %s, opts.count excludes opts.array.",e)),!0):!!B(e,m.nargs)&&(j=Error(p("Invalid configuration: %s, opts.count excludes opts.narg.",e)),!0)));let C=[];const A=Object.assign(Object.create(null),{_:[]}),_={};for(let e=0;e<r.length;e++){const t=r[e],n=t.replace(/^-{3,}/,"---");let i,s,a,c,l,u;if("--"!==t&&W(t))k(t);else{if(n.match(/---+(=|$)/)){k(t);continue}if(t.match(/^--.+=/)||!o["short-option-groups"]&&t.match(/^-.+=/))c=t.match(/^--?([^=]+)=([\s\S]*)$/),null!==c&&Array.isArray(c)&&c.length>=3&&(B(c[1],m.arrays)?e=I(e,c[1],r,c[2]):!1!==B(c[1],m.nargs)?e=P(e,c[1],r,c[2]):$(c[1],c[2],!0));else if(t.match(E)&&o["boolean-negation"])c=t.match(E),null!==c&&Array.isArray(c)&&c.length>=2&&(s=c[1],$(s,!!B(s,m.arrays)&&[!1]));else if(t.match(/^--.+/)||!o["short-option-groups"]&&t.match(/^-[^-]+/))c=t.match(/^--?(.+)/),null!==c&&Array.isArray(c)&&c.length>=2&&(s=c[1],B(s,m.arrays)?e=I(e,s,r):!1!==B(s,m.nargs)?e=P(e,s,r):(l=r[e+1],void 0===l||l.match(/^-/)&&!l.match(S)||B(s,m.bools)||B(s,m.counts)?/^(true|false)$/.test(l)?($(s,l),e++):$(s,H(s)):($(s,l),e++)));else if(t.match(/^-.\..+=/))c=t.match(/^-([^=]+)=([\s\S]*)$/),null!==c&&Array.isArray(c)&&c.length>=3&&$(c[1],c[2]);else if(t.match(/^-.\..+/)&&!t.match(S))l=r[e+1],c=t.match(/^-(.\..+)/),null!==c&&Array.isArray(c)&&c.length>=2&&(s=c[1],void 0===l||l.match(/^-/)||B(s,m.bools)||B(s,m.counts)?$(s,H(s)):($(s,l),e++));else if(t.match(/^-[^-]+/)&&!t.match(S)){a=t.slice(1,-1).split(""),i=!1;for(let n=0;n<a.length;n++){if(l=t.slice(n+2),a[n+1]&&"="===a[n+1]){u=t.slice(n+3),s=a[n],B(s,m.arrays)?e=I(e,s,r,u):!1!==B(s,m.nargs)?e=P(e,s,r,u):$(s,u),i=!0;break}if("-"!==l){if(/[A-Za-z]/.test(a[n])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(l)&&!1===B(l,m.bools)){$(a[n],l),i=!0;break}if(a[n+1]&&a[n+1].match(/\W/)){$(a[n],l),i=!0;break}$(a[n],H(a[n]))}else $(a[n],l)}s=t.slice(-1)[0],i||"-"===s||(B(s,m.arrays)?e=I(e,s,r):!1!==B(s,m.nargs)?e=P(e,s,r):(l=r[e+1],void 0===l||/^(-|--)[^-]/.test(l)&&!l.match(S)||B(s,m.bools)||B(s,m.counts)?/^(true|false)$/.test(l)?($(s,l),e++):$(s,H(s)):($(s,l),e++)))}else if(t.match(/^-[0-9]$/)&&t.match(S)&&B(t.slice(1),m.bools))s=t.slice(1),$(s,H(s));else{if("--"===t){C=r.slice(e+1);break}if(o["halt-at-non-option"]){C=r.slice(e);break}k(t)}}}function k(e){const t=L("_",e);"string"!=typeof t&&"number"!=typeof t||A._.push(t)}function P(e,t,n,r){let i,s=B(t,m.nargs);if(s="number"!=typeof s||isNaN(s)?1:s,0===s)return z(r)||(j=Error(p("Argument unexpected for: %s",t))),$(t,H(t)),e;let a=z(r)?0:1;if(o["nargs-eats-options"])n.length-(e+1)+a<s&&(j=Error(p("Not enough arguments following: %s",t))),a=s;else{for(i=e+1;i<n.length&&(!n[i].match(/^-[^0-9]/)||n[i].match(S)||W(n[i]));i++)a++;a<s&&(j=Error(p("Not enough arguments following: %s",t)))}let c=Math.min(a,s);for(!z(r)&&c>0&&($(t,r),c--),i=e+1;i<c+e+1;i++)$(t,n[i]);return e+c}function I(e,t,n,r){let s=[],c=r||n[e+1];const l=B(t,m.nargs);if(B(t,m.bools)&&!/^(true|false)$/.test(c))s.push(!0);else if(z(c)||z(r)&&/^-/.test(c)&&!S.test(c)&&!W(c)){if(void 0!==a[t]){const e=a[t];s=Array.isArray(e)?e:[e]}}else{z(r)||s.push(T(t,r,!0));for(let r=e+1;r<n.length&&!(!o["greedy-arrays"]&&s.length>0||l&&"number"==typeof l&&s.length>=l)&&(c=n[r],!/^-/.test(c)||S.test(c)||W(c));r++)e=r,s.push(T(t,c,i))}return"number"==typeof l&&(l&&s.length<l||isNaN(l)&&0===s.length)&&(j=Error(p("Not enough arguments following: %s",t))),$(t,s),e}function $(e,t,n=i){if(/-/.test(e)&&o["camel-case-expansion"]){const t=e.split(".").map((function(e){return g(e)})).join(".");M(e,t)}const r=T(e,t,n),s=e.split(".");if(F(A,s,r),m.aliases[e]&&m.aliases[e].forEach((function(e){const t=e.split(".");F(A,t,r)})),s.length>1&&o["dot-notation"]&&(m.aliases[s[0]]||[]).forEach((function(t){let n=t.split(".");const i=[].concat(s);i.shift(),n=n.concat(i),(m.aliases[e]||[]).includes(n.join("."))||F(A,n,r)})),B(e,m.normalize)&&!B(e,m.arrays)){[e].concat(m.aliases[e]||[]).forEach((function(e){Object.defineProperty(_,e,{enumerable:!0,get:()=>t,set(e){t="string"==typeof e?w.normalize(e):e}})}))}}function M(e,t){m.aliases[e]&&m.aliases[e].length||(m.aliases[e]=[t],h[t]=!0),m.aliases[t]&&m.aliases[t].length||M(t,e)}function T(e,t,n){n&&(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)),(B(e,m.bools)||B(e,m.counts))&&"string"==typeof t&&(t="true"===t);let r=Array.isArray(t)?t.map((function(t){return L(e,t)})):L(e,t);return B(e,m.counts)&&(z(r)||"boolean"==typeof r)&&(r=x()),B(e,m.normalize)&&B(e,m.arrays)&&(r=Array.isArray(t)?t.map((e=>w.normalize(e))):w.normalize(t)),r}function L(e,t){if(!o["parse-positional-numbers"]&&"_"===e)return t;if(!B(e,m.strings)&&!B(e,m.bools)&&!Array.isArray(t)){(b(t)&&o["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)))||!z(t)&&B(e,m.numbers))&&(t=Number(t))}return t}function G(e,t){Object.keys(e).forEach((function(n){const r=e[n],i=t?t+"."+n:n;"object"==typeof r&&null!==r&&!Array.isArray(r)&&o["dot-notation"]?G(r,i):(!D(A,i.split("."))||B(i,m.arrays)&&o["combine-arrays"])&&$(i,r)}))}function N(e,t){if(void 0===l)return;const n="string"==typeof l?l:"",r=w.env();Object.keys(r).forEach((function(i){if(""===n||0===i.lastIndexOf(n,0)){const s=i.split("__").map((function(e,t){return 0===t&&(e=e.substring(n.length)),g(e)}));(t&&m.configs[s.join(".")]||!t)&&!D(e,s)&&$(s.join("."),r[i])}}))}function R(e,t,n,r=!1){Object.keys(n).forEach((function(i){D(e,i.split("."))||(F(e,i.split("."),n[i]),r&&(f[i]=!0),(t[i]||[]).forEach((function(t){D(e,t.split("."))||F(e,t.split("."),n[i])})))}))}function D(e,t){let n=e;o["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach((function(e){n=n[e]||{}}));const r=t[t.length-1];return"object"==typeof n&&r in n}function F(e,t,n){let r=e;o["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach((function(e){e=O(e),"object"==typeof r&&void 0===r[e]&&(r[e]={}),"object"!=typeof r[e]||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]}));const i=O(t[t.length-1]),s=B(t.join("."),m.arrays),a=Array.isArray(n);let c=o["duplicate-arguments-array"];!c&&B(i,m.nargs)&&(c=!0,(!z(r[i])&&1===m.nargs[i]||Array.isArray(r[i])&&r[i].length===m.nargs[i])&&(r[i]=void 0)),n===x()?r[i]=x(r[i]):Array.isArray(r[i])?c&&s&&a?r[i]=o["flatten-duplicate-arrays"]?r[i].concat(n):(Array.isArray(r[i][0])?r[i]:[r[i]]).concat([n]):c||Boolean(s)!==Boolean(a)?r[i]=r[i].concat([n]):r[i]=n:void 0===r[i]&&s?r[i]=a?n:[n]:!c||void 0===r[i]||B(i,m.counts)||B(i,m.bools)?r[i]=n:r[i]=[r[i],n]}function B(e,t){const n=[].concat(m.aliases[e]||[],e),r=Object.keys(t),i=n.find((e=>r.includes(e)));return!!i&&t[i]}function U(e){const t=Object.keys(m);return[].concat(t.map((e=>m[e]))).some((function(t){return Array.isArray(t)?t.includes(e):t[e]}))}function W(e){return o["unknown-options-as-args"]&&function(e){if((e=e.replace(/^-{3,}/,"--")).match(S))return!1;if(function(e){if(e.match(S)||!e.match(/^-[^-]+/))return!1;let t,n=!0;const r=e.slice(1).split("");for(let i=0;i<r.length;i++){if(t=e.slice(i+2),!U(r[i])){n=!1;break}if(r[i+1]&&"="===r[i+1]||"-"===t||/[A-Za-z]/.test(r[i])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(t)||r[i+1]&&r[i+1].match(/\W/))break}return n}(e))return!1;return!function(e,...t){return[].concat(...t).some((function(t){const n=e.match(t);return n&&U(n[1])}))}(e,/^-+([^=]+?)=[\s\S]*$/,E,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}(e)}function H(e){return B(e,m.bools)||B(e,m.counts)||!(`${e}`in a)?(t=function(e){let t=v.BOOLEAN;return B(e,m.strings)?t=v.STRING:B(e,m.numbers)?t=v.NUMBER:B(e,m.bools)?t=v.BOOLEAN:B(e,m.arrays)&&(t=v.ARRAY),t}(e),{[v.BOOLEAN]:!0,[v.STRING]:"",[v.NUMBER]:void 0,[v.ARRAY]:[]}[t]):a[e];var t}function z(e){return void 0===e}return N(A,!0),N(A,!1),function(e){const t=Object.create(null);R(t,m.aliases,a),Object.keys(m.configs).forEach((function(n){const r=e[n]||t[n];if(r)try{let e=null;const t=w.resolve(w.cwd(),r),i=m.configs[n];if("function"==typeof i){try{e=i(t)}catch(t){e=t}if(e instanceof Error)return void(j=e)}else e=w.require(t);G(e)}catch(t){"PermissionDenied"===t.name?j=t:e[n]&&(j=Error(p("Invalid JSON config file: %s",r)))}}))}(A),void 0!==c&&c.forEach((function(e){G(e)})),R(A,m.aliases,a,!0),function(e){let t;const n=new Set;Object.keys(e).forEach((function(r){if(!n.has(r)&&(t=B(r,m.coercions),"function"==typeof t))try{const i=L(r,t(e[r]));[].concat(m.aliases[r]||[],r).forEach((t=>{n.add(t),e[t]=i}))}catch(e){j=e}}))}(A),o["set-placeholder-key"]&&function(e){m.keys.forEach((t=>{~t.indexOf(".")||void 0===e[t]&&(e[t]=void 0)}))}(A),Object.keys(m.counts).forEach((function(e){D(A,e.split("."))||$(e,0)})),u&&C.length&&(A[d]=[]),C.forEach((function(e){A[d].push(e)})),o["camel-case-expansion"]&&o["strip-dashed"]&&Object.keys(A).filter((e=>"--"!==e&&e.includes("-"))).forEach((e=>{delete A[e]})),o["strip-aliased"]&&[].concat(...Object.keys(s).map((e=>s[e]))).forEach((e=>{o["camel-case-expansion"]&&e.includes("-")&&delete A[e.split(".").map((e=>g(e))).join(".")],delete A[e]})),{aliases:Object.assign({},m.aliases),argv:Object.assign(_,A),configuration:o,defaulted:Object.assign({},f),error:j,newAliases:Object.assign({},h)}}}({cwd:process.cwd,env:()=>E,format:p.format,normalize:f.normalize,resolve:f.resolve,require:e=>{if("undefined"!=typeof require)return require(e);if(e.match(/\.json$/))return JSON.parse((0,r.readFileSync)(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),C=function(e,t){return j.parse(e.slice(),t).argv};C.detailed=function(e,t){return j.parse(e.slice(),t)},C.camelCase=g,C.decamelize=y,C.looksLikeNumber=b;const A=C;function _(){return process.versions.electron&&!process.defaultApp?0:1}class k extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,k)}}const P={fs:{readFileSync:r.readFileSync,writeFile:r.writeFile},format:p.format,resolve:f.resolve,exists:e=>{try{return(0,r.statSync)(e).isFile()}catch(e){return!1}}};let I;class ${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 n=function(){};return"function"==typeof e[e.length-1]&&(n=e.pop()),n=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(),I.format.apply(I.format,[this.cache[this.locale][t]||t].concat(e))}__n(){const e=Array.prototype.slice.call(arguments),t=e.shift(),n=e.shift(),r=e.shift();let i=function(){};"function"==typeof e[e.length-1]&&(i=e.pop()),this.cache[this.locale]||this._readLocaleFile();let s=1===r?t:n;if(this.cache[this.locale][t]){s=this.cache[this.locale][t][1===r?"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();const o=[s];return~s.indexOf("%d")&&o.push(r),I.format.apply(I.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 n="";return e.forEach((function(e,r){const i=t[r+1];n+=e,void 0!==i&&(n+="%s")})),this.__.apply(this,[n].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],n=t.directory,r=t.locale,i=t.cb,s=this._resolveLocaleFile(n,r),o=JSON.stringify(this.cache[r],null,2);I.fs.writeFile(s,o,"utf-8",(function(t){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),i(t)}))}_readLocaleFile(){let e={};const t=this._resolveLocaleFile(this.directory,this.locale);try{I.fs.readFileSync&&(e=JSON.parse(I.fs.readFileSync(t,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+t),"ENOENT"!==n.code)throw n;e={}}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let n=I.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~t.lastIndexOf("_")){const r=I.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(r)&&(n=r)}return n}_fileExistsSync(e){return I.exists(e)}}const M=e=>function(e,t){I=t;const n=new $(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}}(e,P),T="loading a directory of commands is not supported yet for ESM";let L;try{L=(0,m.fileURLToPath)(import.meta.url)}catch(e){L=process.cwd()}const G=L.substring(0,L.lastIndexOf("node_modules")),N={assert:{notStrictEqual:i.notStrictEqual,strictEqual:i.strictEqual},cliui:function(e){return function(e,t){return l=t,new o({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:d,wrap:h})},findUp:function(e,t){let n,i=(0,f.resolve)(".",e);for((0,r.statSync)(i).isDirectory()||(i=(0,f.dirname)(i));;){if(n=t(i,(0,r.readdirSync)(i)),n)return(0,f.resolve)(i,n);if(i=(0,f.dirname)(n=i),n===i)break}},getEnv:e=>process.env[e],inspect:p.inspect,getCallerFile:()=>{throw new k(T)},getProcessArgvBin:function(){return process.argv[_()]},mainFilename:G||process.cwd(),Parser:A,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:r.readFileSync,require:()=>{throw new k("require is not supported by ESM")},requireDirectory:()=>{throw new k(T)},stringWidth:e=>[...e].length,y18n:M({directory:(0,f.resolve)(L,"../../../locales"),updateFiles:!1})};function R(e,t,n,r){n.assert.notStrictEqual(e,t,r)}function D(e,t){t.assert.strictEqual(typeof e,"string")}function F(e){return Object.keys(e)}function B(e){return!!e&&!!e.then&&"function"==typeof e.then}function U(e){const t=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,r=t.shift();if(!r)throw new Error(`No command found in: ${e}`);const i={cmd:r.replace(n,""),demanded:[],optional:[]};return t.forEach(((e,r)=>{let s=!1;e=e.replace(/\s/g,""),/\.+[\]>]/.test(e)&&r===t.length-1&&(s=!0),/^\[/.test(e)?i.optional.push({cmd:e.replace(n,"").split("|"),variadic:s}):i.demanded.push({cmd:e.replace(n,"").split("|"),variadic:s})})),i}const W=["first","second","third","fourth","fifth","sixth"];function H(e,t,n){try{let r=0;const[i,s,o]="object"==typeof e?[{demanded:[],optional:[]},e,t]:[U(`cmd ${e}`),t,n],a=[].slice.call(s);for(;a.length&&void 0===a[a.length-1];)a.pop();const c=o||a.length;if(c<i.demanded.length)throw new k(`Not enough arguments provided. Expected ${i.demanded.length} but received ${a.length}.`);const l=i.demanded.length+i.optional.length;if(c>l)throw new k(`Too many arguments provided. Expected max ${l} but received ${c}.`);i.demanded.forEach((e=>{const t=z(a.shift());0===e.cmd.filter((e=>e===t||"*"===e)).length&&q(t,e.cmd,r),r+=1})),i.optional.forEach((e=>{if(0===a.length)return;const t=z(a.shift());0===e.cmd.filter((e=>e===t||"*"===e)).length&&q(t,e.cmd,r),r+=1}))}catch(e){console.warn(e.stack)}}function z(e){return Array.isArray(e)?"array":null===e?"null":typeof e}function q(e,t,n){throw new k(`Invalid ${W[n]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}class V{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,t,n=!0,r=!1){if(H("<array|function> [boolean] [boolean] [boolean]",[e,t,n],arguments.length),Array.isArray(e)){for(let r=0;r<e.length;r++){if("function"!=typeof e[r])throw Error("middleware must be a function");const i=e[r];i.applyBeforeValidation=t,i.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if("function"==typeof e){const i=e;i.applyBeforeValidation=t,i.global=n,i.mutates=r,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,t){const n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter((e=>{const r=[...n[t]||[],t];return!e.option||!r.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 K(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(B(e))return e.then((e=>Promise.all([e,n(e,t)]))).then((([e,t])=>Object.assign(e,t)));{const r=n(e,t);return B(r)?r.then((t=>Object.assign(e,t))):Object.assign(e,r)}}),e)}function Y(e,t,n=(e=>{throw e})){try{const n="function"==typeof e?e():e;return B(n)?n.then((e=>t(e))):t(n)}catch(e){return n(e)}}const X=/(^\*)|(^\$0)/;class J{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){"boolean"!=typeof(r=r||{}).recurse&&(r.recurse=!1),Array.isArray(r.extensions)||(r.extensions=["js"]);const i="function"==typeof r.visit?r.visit:e=>e;r.visit=(e,t,n)=>{const 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,s){let o=[];const a=function(e){return e?e.map((e=>(e.applyBeforeValidation=!1,e))):[]}(i);if(r=r||(()=>{}),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(Q(n))return void this.addHandler([e].concat(o),t,n.builder,n.handler,n.middlewares,n.deprecated)}if("string"==typeof e){const i=U(e);o=o.map((e=>U(e).cmd));let c=!1;const l=[i.cmd].concat(o).filter((e=>!X.test(e)||(c=!0,!1)));0===l.length&&c&&l.push("$0"),c&&(i.cmd=l[0],o=l.slice(1),e=e.replace(X,i.cmd)),o.forEach((e=>{this.aliasMap[e]=i.cmd})),!1!==t&&this.usage.command(e,t,c,o,s),this.handlers[i.cmd]={original:e,description:t,handler:r,builder:n||{},middlewares:a,deprecated:s,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,s){const o=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,a=t.getInternalMethods().getContext(),c=a.commands.slice(),l=!e;e&&(a.commands.push(e),a.fullCommands.push(o.original));const u=this.applyBuilderUpdateUsageAndParse(l,o,t,n.aliases,c,r,i,s);return B(u)?u.then((e=>this.applyMiddlewareAndGetResult(l,o,e.innerArgv,a,i,e.aliases,t))):this.applyMiddlewareAndGetResult(l,o,u.innerArgv,a,i,u.aliases,t)}applyBuilderUpdateUsageAndParse(e,t,n,r,i,s,o,a){const c=t.builder;let l=n;if(Z(c)){const u=c(n.getInternalMethods().reset(r),a);if(B(u))return u.then((r=>{var a;return l=(a=r)&&"function"==typeof a.getInternalMethods?r:n,this.parseAndUpdateUsage(e,t,l,i,s,o)}))}else(function(e){return"object"==typeof e})(c)&&(l=n.getInternalMethods().reset(r),Object.keys(t.builder).forEach((e=>{l.option(e,c[e])})));return this.parseAndUpdateUsage(e,t,l,i,s,o)}parseAndUpdateUsage(e,t,n,r,i,s){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(r,t),t.description);const o=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,i,s);return B(o)?o.then((e=>({aliases:n.parsed.aliases,innerArgv:e}))):{aliases:n.parsed.aliases,innerArgv:o}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&0===e.getInternalMethods().getUsageInstance().getUsage().length}usageFromParentCommandsCommandHandler(e,t){const n=X.test(t.original)?t.original.replace(X,"").trim():t.original,r=e.filter((e=>!X.test(e)));return r.push(n),`$0 ${r.join(" ")}`}handleValidationAndGetResult(e,t,n,r,i,s,o,a){if(!s.getInternalMethods().getHasOutput()){const t=s.getInternalMethods().runValidation(i,a,s.parsed.error,e);n=Y(n,(e=>(t(e),e)))}if(t.handler&&!s.getInternalMethods().getHasOutput()){s.getInternalMethods().setHasOutput();const r=!!s.getOptions().configuration["populate--"];s.getInternalMethods().postProcess(n,r,!1,!1),n=Y(n=K(n,s,o,!1),(e=>{const n=t.handler(e);return B(n)?n.then((()=>e)):e})),e||s.getInternalMethods().getUsageInstance().cacheHelpMessage(),B(n)&&!s.getInternalMethods().hasParseCallback()&&n.catch((e=>{try{s.getInternalMethods().getUsageInstance().fail(null,e)}catch(e){}}))}return e||(r.commands.pop(),r.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,t,n,r,i,s,o){let a={};if(i)return n;o.getInternalMethods().getHasOutput()||(a=this.populatePositionals(t,n,r,o));const c=this.globalMiddleware.getMiddleware().slice(0).concat(t.middlewares),l=K(n,o,c,!0);return B(l)?l.then((n=>this.handleValidationAndGetResult(e,t,n,r,s,o,c,a))):this.handleValidationAndGetResult(e,t,l,r,s,o,c,a)}populatePositionals(e,t,n,r){t._=t._.slice(n.commands.length);const i=e.demanded.slice(0),s=e.optional.slice(0),o={};for(this.validation.positionalCount(i.length,t._.length);i.length;){const e=i.shift();this.populatePositional(e,t,o)}for(;s.length;){const e=s.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){const r=e.cmd[0];e.variadic?n[r]=t._.splice(0).map(String):t._.length&&(n[r]=[String(t._.shift())])}cmdToParseOptions(e){const t={array:[],default:{},alias:{},demand:{}},n=U(e);return n.demanded.forEach((e=>{const[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=>{const[n,...r]=e.cmd;e.variadic&&(t.array.push(n),t.default[n]=[]),t.alias[n]=r})),t}postProcessPositionals(e,t,n,r){const i=Object.assign({},r.getOptions());i.default=Object.assign(n.default,i.default);for(const 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={};const s=[];if(Object.keys(t).forEach((e=>{t[e].map((t=>{i.configuration["unknown-options-as-args"]&&(i.key[e]=!0),s.push(`--${e}`),s.push(t)}))})),!s.length)return;const o=Object.assign({},i.configuration,{"populate--":!1}),a=this.shim.Parser.detailed(s,Object.assign({},i,{configuration:o}));if(a.error)r.getInternalMethods().getUsageInstance().fail(a.error.message,a.error);else{const n=Object.keys(t);Object.keys(t).forEach((e=>{n.push(...a.aliases[e])})),Object.keys(a.argv).forEach((i=>{n.includes(i)&&(t[i]||(t[i]=a.argv[i]),!this.isInConfigs(r,i)&&!this.isDefaulted(r,i)&&Object.prototype.hasOwnProperty.call(e,i)&&Object.prototype.hasOwnProperty.call(a.argv,i)&&(Array.isArray(e[i])||Array.isArray(a.argv[i]))?e[i]=[].concat(e[i],a.argv[i]):e[i]=a.argv[i])}))}}isDefaulted(e,t){const{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,t)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(t))}isInConfigs(e,t){const{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)){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(Z(t))return t(e,!0);Q(t)||Object.keys(t).forEach((n=>{e.option(n,t[n])}))}moduleName(e){const t=function(e){if("undefined"==typeof require)return null;for(let t,n=0,r=Object.keys(require.cache);n<r.length;n++)if(t=require.cache[r[n]],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:n}){for(const r of[e,t,n]){if("string"==typeof r||!1===r)return r;R(r,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){const e=this.frozens.pop();R(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 Q(e){return"object"==typeof e&&!!e.builder&&"function"==typeof e.handler}function Z(e){return"function"==typeof e}function ee(e={},t=(()=>!0)){const n={};return F(e).forEach((r=>{t(r,e[r])&&(n[r]=e[r])})),n}function te(e){"undefined"!=typeof process&&[process.stdout,process.stderr].forEach((t=>{const n=t;n._handle&&n.isTTY&&"function"==typeof n._handle.setBlocking&&n._handle.setBlocking(e)}))}function ne(e){return"boolean"==typeof e}function re(e,t){const n=t.y18n.__,r={},i=[];r.failFn=function(e){i.push(e)};let s=null,o=null,a=!0;r.showHelpOnFail=function(t=!0,n){const[i,c]="string"==typeof t?[!0,t]:[t,n];return e.getInternalMethods().isGlobalContext()&&(o=c),s=c,a=i,r};let c=!1;r.fail=function(t,n){const l=e.getInternalMethods().getLoggerInstance();if(!i.length){if(e.getExitProcess()&&te(!0),!c){c=!0,a&&(e.showHelp("error"),l.error()),(t||n)&&l.error(t||n);const r=s||o;r&&((t||n)&&l.error(""),l.error(r))}if(n=n||new k(t),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,n);throw n}for(let e=i.length-1;e>=0;--e){const s=i[e];if(ne(s)){if(n)throw n;if(t)throw Error(t)}else s(t,n,r)}};let l=[],u=!1;r.usage=(e,t)=>null===e?(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 h=[];r.command=function(e,t,n,r,i=!1){n&&(h=h.map((e=>(e[2]=!1,e)))),h.push([e,t||"",n,r,i])},r.getCommands=()=>h;let f={};r.describe=function(e,t){Array.isArray(e)?e.forEach((e=>{r.describe(e,t)})):"object"==typeof e?Object.keys(e).forEach((t=>{r.describe(t,e[t])})):f[e]=t},r.getDescriptions=()=>f;let p=[];r.epilog=e=>{p.push(e)};let m,g=!1;function y(){return g||(m=function(){const e=80;return t.process.stdColumns?Math.min(e,t.process.stdColumns):e}(),g=!0),m}r.wrap=e=>{g=!0,m=e};const b="__yargsString__:";function v(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} ${oe(e[0])}`:oe(e[0]))+se(e[0]),i)})),n&&(i=Math.min(i,parseInt((.5*n).toString(),10))),i}let w;function x(t){return e.getOptions().hiddenOptions.indexOf(t)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}function O(e,t){let r=`[${n("default:")} `;if(void 0===e&&!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}]`}r.deferY18nLookup=e=>b+e,r.help=function(){if(w)return w;!function(){const t=e.getDemandedOptions(),n=e.getOptions();(Object.keys(n.alias)||[]).forEach((i=>{n.alias[i].forEach((s=>{f[s]&&r.describe(i,f[s]),s in t&&e.demandOption(i,t[s]),n.boolean.includes(s)&&e.boolean(i),n.count.includes(s)&&e.count(i),n.string.includes(s)&&e.string(i),n.normalize.includes(s)&&e.normalize(i),n.array.includes(s)&&e.array(i),n.number.includes(s)&&e.number(i)}))}))}();const i=e.customScriptName?e.$0:t.path.basename(e.$0),s=e.getDemandedOptions(),o=e.getDemandedCommands(),a=e.getDeprecatedOptions(),c=e.getGroups(),m=e.getOptions();let g=[];g=g.concat(Object.keys(f)),g=g.concat(Object.keys(s)),g=g.concat(Object.keys(o)),g=g.concat(Object.keys(m.default)),g=g.filter(x),g=Object.keys(g.reduce(((e,t)=>("_"!==t&&(e[t]=!0),e)),{}));const S=y(),E=t.cliui({width:S,wrap:!!S});if(!u)if(l.length)l.forEach((e=>{E.div({text:`${e[0].replace(/\$0/g,i)}`}),e[1]&&E.div({text:`${e[1]}`,padding:[1,0,0,0]})})),E.div();else if(h.length){let e=null;e=o._?`${i} <${n("command")}>\n`:`${i} [${n("command")}]\n`,E.div(`${e}`)}if(h.length>1||1===h.length&&!h[0][2]){E.div(n("Commands:"));const t=e.getInternalMethods().getContext(),r=t.commands.length?`${t.commands.join(" ")} `:"";!0===e.getInternalMethods().getParserConfiguration()["sort-commands"]&&(h=h.sort(((e,t)=>e[0].localeCompare(t[0]))));const s=i?`${i} `:"";h.forEach((e=>{const t=`${s}${r}${e[0].replace(/^\$0 ?/,"")}`;E.span({text:t,padding:[0,2,0,2],width:v(h,S,`${i}${r}`)+4},{text:e[1]});const o=[];e[2]&&o.push(`[${n("default")}]`),e[3]&&e[3].length&&o.push(`[${n("aliases:")} ${e[3].join(", ")}]`),e[4]&&("string"==typeof e[4]?o.push(`[${n("deprecated: %s",e[4])}]`):o.push(`[${n("deprecated")}]`)),o.length?E.div({text:o.join(" "),padding:[0,0,0,2],align:"right"}):E.div()})),E.div()}const j=(Object.keys(m.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);g=g.filter((t=>!e.parsed.newAliases[t]&&j.every((e=>-1===(m.alias[e]||[]).indexOf(t)))));const C=n("Options:");c[C]||(c[C]=[]),function(e,t,n,r){let i=[],s=null;Object.keys(n).forEach((e=>{i=i.concat(n[e])})),e.forEach((e=>{s=[e].concat(t[e]),s.some((e=>-1!==i.indexOf(e)))||n[r].push(e)}))}(g,m.alias,c,C);const A=e=>/^--/.test(oe(e)),_=Object.keys(c).filter((e=>c[e].length>0)).map((e=>({groupName:e,normalizedKeys:c[e].filter(x).map((e=>{if(j.includes(e))return e;for(let t,n=0;void 0!==(t=j[n]);n++)if((m.alias[t]||[]).includes(e))return t;return e}))}))).filter((({normalizedKeys:e})=>e.length>0)).map((({groupName:e,normalizedKeys:t})=>{const n=t.reduce(((t,n)=>(t[n]=[n].concat(m.alias[n]||[]).map((t=>e===r.getPositionalGroupName()?t:(/^[0-9]$/.test(t)?m.boolean.includes(n)?"-":"--":t.length>1?"--":"-")+t)).sort(((e,t)=>A(e)===A(t)?0:A(e)?1:-1)).join(", "),t)),{});return{groupName:e,normalizedKeys:t,switches:n}}));if(_.filter((({groupName:e})=>e!==r.getPositionalGroupName())).some((({normalizedKeys:e,switches:t})=>!e.every((e=>A(t[e])))))&&_.filter((({groupName:e})=>e!==r.getPositionalGroupName())).forEach((({normalizedKeys:e,switches:t})=>{e.forEach((e=>{var n,r;A(t[e])&&(t[e]=(n=t[e],r="-x, ".length,ie(n)?{text:n.text,indentation:n.indentation+r}:{text:n,indentation:r}))}))})),_.forEach((({groupName:e,normalizedKeys:t,switches:i})=>{E.div(e),t.forEach((e=>{const t=i[e];let o=f[e]||"",c=null;o.includes(b)&&(o=n(o.substring(b.length))),m.boolean.includes(e)&&(c=`[${n("boolean")}]`),m.count.includes(e)&&(c=`[${n("count")}]`),m.string.includes(e)&&(c=`[${n("string")}]`),m.normalize.includes(e)&&(c=`[${n("string")}]`),m.array.includes(e)&&(c=`[${n("array")}]`),m.number.includes(e)&&(c=`[${n("number")}]`);const l=[e in a?(u=a[e],"string"==typeof u?`[${n("deprecated: %s",u)}]`:`[${n("deprecated")}]`):null,c,e in s?`[${n("required")}]`:null,m.choices&&m.choices[e]?`[${n("choices:")} ${r.stringifiedValues(m.choices[e])}]`:null,O(m.default[e],m.defaultDescription[e])].filter(Boolean).join(" ");var u;E.span({text:oe(t),padding:[0,2,0,2+se(t)],width:v(i,S)+4},o),l?E.div({text:l,padding:[0,0,0,2],align:"right"}):E.div()})),E.div()})),d.length&&(E.div(n("Examples:")),d.forEach((e=>{e[0]=e[0].replace(/\$0/g,i)})),d.forEach((e=>{""===e[1]?E.div({text:e[0],padding:[0,2,0,2]}):E.div({text:e[0],padding:[0,2,0,2],width:v(d,S)+4},{text:e[1]})})),E.div()),p.length>0){const e=p.map((e=>e.replace(/\$0/g,i))).join("\n");E.div(`${e}\n`)}return E.toString().replace(/\s*$/,"")},r.cacheHelpMessage=function(){w=this.help()},r.clearCachedHelpMessage=function(){w=void 0},r.hasCachedHelpMessage=function(){return!!w},r.showHelp=t=>{const n=e.getInternalMethods().getLoggerInstance();t||(t="error");("function"==typeof t?t:n[t])(r.help())},r.functionDescription=e=>["(",e.name?t.Parser.decamelize(e.name,"-"):n("generated-value"),")"].join(""),r.stringifiedValues=function(e,t){let n="";const r=t||", ",i=[].concat(e);return e&&i.length?(i.forEach((e=>{n.length&&(n+=r),n+=JSON.stringify(e)})),n):n};let S=null;r.version=e=>{S=e},r.showVersion=t=>{const n=e.getInternalMethods().getLoggerInstance();t||(t="error");("function"==typeof t?t:n[t])(S)},r.reset=function(e){return s=null,c=!1,l=[],u=!1,p=[],d=[],h=[],f=ee(f,(t=>!e[t])),r};const E=[];return r.freeze=function(){E.push({failMessage:s,failureOutput:c,usages:l,usageDisabled:u,epilogs:p,examples:d,commands:h,descriptions:f})},r.unfreeze=function(e=!1){const t=E.pop();t&&(e?(f={...t.descriptions,...f},h=[...t.commands,...h],l=[...t.usages,...l],d=[...t.examples,...d],p=[...t.epilogs,...p]):({failMessage:s,failureOutput:c,usages:l,usageDisabled:u,epilogs:p,examples:d,commands:h,descriptions:f}=t))},r}function ie(e){return"object"==typeof e}function se(e){return ie(e)?e.indentation:0}function oe(e){return ie(e)?e.text:e}class ae{constructor(e,t,n,r){var i,s,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=null!==(o=(null===(i=this.shim.getEnv("SHELL"))||void 0===i?void 0:i.includes("zsh"))||(null===(s=this.shim.getEnv("ZSH_NAME"))||void 0===s?void 0:s.includes("zsh")))&&void 0!==o&&o}defaultCompletion(e,t,n,r){const i=this.command.getCommandHandlers();for(let t=0,n=e.length;t<n;++t)if(i[e[t]]&&i[e[t]].builder){const n=i[e[t]].builder;if(Z(n)){this.indexAfterLastReset=t+1;const e=this.yargs.getInternalMethods().reset();return n(e,!0),e.argv}}const s=[];this.commandCompletions(s,e,n),this.optionCompletions(s,e,t,n),this.choicesFromOptionsCompletions(s,e,t,n),this.choicesFromPositionalsCompletions(s,e,t,n),r(null,s)}commandCompletions(e,t,n){const r=this.yargs.getInternalMethods().getContext().commands;n.match(/^-/)||r[r.length-1]===n||this.previousArgHasChoices(t)||this.usage.getCommands().forEach((n=>{const r=U(n[0]).cmd;if(-1===t.indexOf(r))if(this.zshShell){const t=n[1]||"";e.push(r.replace(/:/g,"\\:")+":"+t)}else e.push(r)}))}optionCompletions(e,t,n,r){if((r.match(/^-/)||""===r&&0===e.length)&&!this.previousArgHasChoices(t)){const n=this.yargs.getOptions(),i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(n.key).forEach((s=>{const o=!!n.configuration["boolean-negation"]&&n.boolean.includes(s);i.includes(s)||n.hiddenOptions.includes(s)||this.argsContainKey(t,s,o)||(this.completeOptionKey(s,e,r),o&&n.default[s]&&this.completeOptionKey(`no-${s}`,e,r))}))}}choicesFromOptionsCompletions(e,t,n,r){if(this.previousArgHasChoices(t)){const 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;const i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],s=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),o=i[n._.length-s-1];if(!o)return;const a=this.yargs.getOptions().choices[o]||[];for(const t of a)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;const r=t.replace(/^-+/,""),i=this.yargs.getOptions(),s=[r,...this.yargs.getAliases()[r]||[]];let o;for(const e of s)if(Object.prototype.hasOwnProperty.call(i.key,e)&&Array.isArray(i.choices[e])){o=i.choices[e];break}return o?o.filter((e=>!n||e.startsWith(n))):void 0}previousArgHasChoices(e){const t=this.getPreviousArgChoices(e);return void 0!==t&&t.length>0}argsContainKey(e,t,n){const r=t=>-1!==e.indexOf((/^[^0-9]$/.test(t)?"-":"--")+t);if(r(t))return!0;if(n&&r(`no-${t}`))return!0;if(this.aliases)for(const e of this.aliases[t])if(r(e))return!0;return!1}completeOptionKey(e,t,n){const r=this.usage.getDescriptions(),i=!/^--/.test(n)&&(e=>/^[^0-9]$/.test(e))(e)?"-":"--";if(this.zshShell){const n=r[e]||"";t.push(i+`${e.replace(/:/g,"\\:")}:${n.replace("__yargsString__:","")}`)}else t.push(i+e)}customCompletion(e,t,n,r){if(R(this.customCompletionFunction,null,this.shim),this.customCompletionFunction.length<3){const e=this.customCompletionFunction(n,t);return B(e)?e.then((e=>{this.shim.process.nextTick((()=>{r(null,e)}))})).catch((e=>{this.shim.process.nextTick((()=>{r(e,void 0)}))})):r(null,e)}return function(e){return e.length>3}(this.customCompletionFunction)?this.customCompletionFunction(n,t,((i=r)=>this.defaultCompletion(e,t,n,i)),(e=>{r(null,e)})):this.customCompletionFunction(n,t,(e=>{r(null,e)}))}getCompletion(e,t){const 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 B(r)?r.then(i):i(r)}generateCompletionScript(e,t){let n=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 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 ce(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;const n=[];let r,i;for(r=0;r<=t.length;r++)n[r]=[r];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 le=["$0","--","_"];let ue,de=[];function he(e,t,n,r){ue=r;let i={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if("string"!=typeof e.extends)return i;const r=/\.json|\..*rc$/.test(e.extends);let s=null;if(r)s=function(e,t){return ue.path.resolve(e,t)}(t,e.extends);else try{s=require.resolve(e.extends)}catch(t){return e}!function(e){if(de.indexOf(e)>-1)throw new k(`Circular extended configurations: '${e}'.`)}(s),de.push(s),i=r?JSON.parse(ue.readFileSync(s,"utf8")):require(e.extends),delete e.extends,i=he(i,ue.path.dirname(s),n,ue)}return de=[],n?fe(i,e):Object.assign({},i,e)}function fe(e,t){const n={};function r(e){return e&&"object"==typeof e&&!Array.isArray(e)}Object.assign(n,e);for(const i of Object.keys(t))r(t[i])&&r(n[i])?n[i]=fe(e[i],t[i]):n[i]=t[i];return n}var pe,me,ge,ye,be,ve,we,xe,Oe,Se,Ee,je,Ce,Ae,_e,ke,Pe,Ie,$e,Me,Te,Le,Ge,Ne,Re,De,Fe,Be,Ue,We,He,ze,qe,Ve,Ke=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},Ye=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};const Xe=Symbol("copyDoubleDash"),Je=Symbol("copyDoubleDash"),Qe=Symbol("deleteFromParserHintObject"),Ze=Symbol("emitWarning"),et=Symbol("freeze"),tt=Symbol("getDollarZero"),nt=Symbol("getParserConfiguration"),rt=Symbol("guessLocale"),it=Symbol("guessVersion"),st=Symbol("parsePositionalNumbers"),ot=Symbol("pkgUp"),at=Symbol("populateParserHintArray"),ct=Symbol("populateParserHintSingleValueDictionary"),lt=Symbol("populateParserHintArrayDictionary"),ut=Symbol("populateParserHintDictionary"),dt=Symbol("sanitizeKey"),ht=Symbol("setKey"),ft=Symbol("unfreeze"),pt=Symbol("validateAsync"),mt=Symbol("getCommandInstance"),gt=Symbol("getContext"),yt=Symbol("getHasOutput"),bt=Symbol("getLoggerInstance"),vt=Symbol("getParseContext"),wt=Symbol("getUsageInstance"),xt=Symbol("getValidationInstance"),Ot=Symbol("hasParseCallback"),St=Symbol("isGlobalContext"),Et=Symbol("postProcess"),jt=Symbol("rebase"),Ct=Symbol("reset"),At=Symbol("runYargsParserAndExecuteCommands"),_t=Symbol("runValidation"),kt=Symbol("setHasOutput"),Pt=Symbol("kTrackManuallySetKeys");class It{constructor(e=[],t,n,r){this.customScriptName=!1,this.parsed=!1,pe.set(this,void 0),me.set(this,void 0),ge.set(this,{commands:[],fullCommands:[]}),ye.set(this,null),be.set(this,null),ve.set(this,"show-hidden"),we.set(this,null),xe.set(this,!0),Oe.set(this,{}),Se.set(this,!0),Ee.set(this,[]),je.set(this,void 0),Ce.set(this,{}),Ae.set(this,!1),_e.set(this,null),ke.set(this,!0),Pe.set(this,void 0),Ie.set(this,""),$e.set(this,void 0),Me.set(this,void 0),Te.set(this,{}),Le.set(this,null),Ge.set(this,null),Ne.set(this,{}),Re.set(this,{}),De.set(this,void 0),Fe.set(this,!1),Be.set(this,void 0),Ue.set(this,!1),We.set(this,!1),He.set(this,!1),ze.set(this,void 0),qe.set(this,null),Ve.set(this,void 0),Ke(this,Be,r,"f"),Ke(this,De,e,"f"),Ke(this,me,t,"f"),Ke(this,Me,n,"f"),Ke(this,je,new V(this),"f"),this.$0=this[tt](),this[Ct](),Ke(this,pe,Ye(this,pe,"f"),"f"),Ke(this,ze,Ye(this,ze,"f"),"f"),Ke(this,Ve,Ye(this,Ve,"f"),"f"),Ke(this,$e,Ye(this,$e,"f"),"f"),Ye(this,$e,"f").showHiddenOpt=Ye(this,ve,"f"),Ke(this,Pe,this[Je](),"f")}addHelpOpt(e,t){return H("[string|boolean] [string]",[e,t],arguments.length),Ye(this,_e,"f")&&(this[Qe](Ye(this,_e,"f")),Ke(this,_e,null,"f")),!1===e&&void 0===t||(Ke(this,_e,"string"==typeof e?e:"help","f"),this.boolean(Ye(this,_e,"f")),this.describe(Ye(this,_e,"f"),t||Ye(this,ze,"f").deferY18nLookup("Show help"))),this}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if(H("[string|boolean] [string]",[e,t],arguments.length),!1===e&&void 0===t)return this;const n="string"==typeof e?e:Ye(this,ve,"f");return this.boolean(n),this.describe(n,t||Ye(this,ze,"f").deferY18nLookup("Show hidden options")),Ye(this,$e,"f").showHiddenOpt=n,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return H("<object|string|array> [string|array]",[e,t],arguments.length),this[lt](this.alias.bind(this),"alias",e,t),this}array(e){return H("<array|string>",[e],arguments.length),this[at]("array",e),this[Pt](e),this}boolean(e){return H("<array|string>",[e],arguments.length),this[at]("boolean",e),this[Pt](e),this}check(e,t){return H("<function> [boolean]",[e,t],arguments.length),this.middleware(((t,n)=>Y((()=>e(t,n.getOptions())),(n=>(n?("string"==typeof n||n instanceof Error)&&Ye(this,ze,"f").fail(n.toString(),n):Ye(this,ze,"f").fail(Ye(this,Be,"f").y18n.__("Argument check failed: %s",e.toString())),t)),(e=>(Ye(this,ze,"f").fail(e.message?e.message:e.toString(),e),t)))),!1,t),this}choices(e,t){return H("<object|string|array> [string|array]",[e,t],arguments.length),this[lt](this.choices.bind(this),"choices",e,t),this}coerce(e,t){if(H("<object|string|array> [function]",[e,t],arguments.length),Array.isArray(e)){if(!t)throw new k("coerce callback must be provided");for(const n of e)this.coerce(n,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 k("coerce callback must be provided");return Ye(this,$e,"f").key[e]=!0,Ye(this,je,"f").addCoerceMiddleware(((n,r)=>{let i;return Object.prototype.hasOwnProperty.call(n,e)?Y((()=>(i=r.getAliases(),t(n[e]))),(t=>{n[e]=t;const s=r.getInternalMethods().getParserConfiguration()["strip-aliased"];if(i[e]&&!0!==s)for(const r of i[e])n[r]=t;return n}),(e=>{throw new k(e.message)})):n}),e),this}conflicts(e,t){return H("<string|object> [string|array]",[e,t],arguments.length),Ye(this,Ve,"f").conflicts(e,t),this}config(e="config",t,n){return H("[object|string] [string|function] [function]",[e,t,n],arguments.length),"object"!=typeof e||Array.isArray(e)?("function"==typeof t&&(n=t,t=void 0),this.describe(e,t||Ye(this,ze,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach((e=>{Ye(this,$e,"f").config[e]=n||!0})),this):(e=he(e,Ye(this,me,"f"),this[nt]()["deep-merge-config"]||!1,Ye(this,Be,"f")),Ye(this,$e,"f").configObjects=(Ye(this,$e,"f").configObjects||[]).concat(e),this)}completion(e,t,n){return H("[string] [string|boolean|function] [function]",[e,t,n],arguments.length),"function"==typeof t&&(n=t,t=void 0),Ke(this,be,e||Ye(this,be,"f")||"completion","f"),t||!1===t||(t="generate completion script"),this.command(Ye(this,be,"f"),t),n&&Ye(this,ye,"f").registerFunction(n),this}command(e,t,n,r,i,s){return H("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,t,n,r,i,s],arguments.length),Ye(this,pe,"f").addHandler(e,t,n,r,i,s),this}commands(e,t,n,r,i,s){return this.command(e,t,n,r,i,s)}commandDir(e,t){H("<string> [object]",[e,t],arguments.length);const n=Ye(this,Me,"f")||Ye(this,Be,"f").require;return Ye(this,pe,"f").addDirectory(e,n,Ye(this,Be,"f").getCallerFile(),t),this}count(e){return H("<array|string>",[e],arguments.length),this[at]("count",e),this[Pt](e),this}default(e,t,n){return H("<object|string|array> [*] [string]",[e,t,n],arguments.length),n&&(D(e,Ye(this,Be,"f")),Ye(this,$e,"f").defaultDescription[e]=n),"function"==typeof t&&(D(e,Ye(this,Be,"f")),Ye(this,$e,"f").defaultDescription[e]||(Ye(this,$e,"f").defaultDescription[e]=Ye(this,ze,"f").functionDescription(t)),t=t.call()),this[ct](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 H("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,t,n,r],arguments.length),"number"!=typeof t&&(n=t,t=1/0),this.global("_",!1),Ye(this,$e,"f").demandedCommands._={min:e,max:t,minMsg:n,maxMsg:r},this}demand(e,t,n){return Array.isArray(t)?(t.forEach((e=>{R(n,!0,Ye(this,Be,"f")),this.demandOption(e,n)})),t=1/0):"number"!=typeof t&&(n=t,t=1/0),"number"==typeof e?(R(n,!0,Ye(this,Be,"f")),this.demandCommand(e,t,n,n)):Array.isArray(e)?e.forEach((e=>{R(n,!0,Ye(this,Be,"f")),this.demandOption(e,n)})):"string"==typeof n?this.demandOption(e,n):!0!==n&&void 0!==n||this.demandOption(e),this}demandOption(e,t){return H("<object|string|array> [string]",[e,t],arguments.length),this[ct](this.demandOption.bind(this),"demandedOptions",e,t),this}deprecateOption(e,t){return H("<string> [string|boolean]",[e,t],arguments.length),Ye(this,$e,"f").deprecatedOptions[e]=t,this}describe(e,t){return H("<object|string|array> [string]",[e,t],arguments.length),this[ht](e,!0),Ye(this,ze,"f").describe(e,t),this}detectLocale(e){return H("<boolean>",[e],arguments.length),Ke(this,xe,e,"f"),this}env(e){return H("[string|boolean]",[e],arguments.length),!1===e?delete Ye(this,$e,"f").envPrefix:Ye(this,$e,"f").envPrefix=e||"",this}epilogue(e){return H("<string>",[e],arguments.length),Ye(this,ze,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return H("<string|array> [string]",[e,t],arguments.length),Array.isArray(e)?e.forEach((e=>this.example(...e))):Ye(this,ze,"f").example(e,t),this}exit(e,t){Ke(this,Ae,!0,"f"),Ke(this,we,t,"f"),Ye(this,Se,"f")&&Ye(this,Be,"f").process.exit(e)}exitProcess(e=!0){return H("[boolean]",[e],arguments.length),Ke(this,Se,e,"f"),this}fail(e){if(H("<function|boolean>",[e],arguments.length),"boolean"==typeof e&&!1!==e)throw new k("Invalid first argument. Expected function or boolean 'false'");return Ye(this,ze,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return H("<array> [function]",[e,t],arguments.length),t?Ye(this,ye,"f").getCompletion(e,t):new Promise(((t,n)=>{Ye(this,ye,"f").getCompletion(e,((e,r)=>{e?n(e):t(r)}))}))}getDemandedOptions(){return H([],0),Ye(this,$e,"f").demandedOptions}getDemandedCommands(){return H([],0),Ye(this,$e,"f").demandedCommands}getDeprecatedOptions(){return H([],0),Ye(this,$e,"f").deprecatedOptions}getDetectLocale(){return Ye(this,xe,"f")}getExitProcess(){return Ye(this,Se,"f")}getGroups(){return Object.assign({},Ye(this,Ce,"f"),Ye(this,Re,"f"))}getHelp(){if(Ke(this,Ae,!0,"f"),!Ye(this,ze,"f").hasCachedHelpMessage()){if(!this.parsed){const e=this[At](Ye(this,De,"f"),void 0,void 0,0,!0);if(B(e))return e.then((()=>Ye(this,ze,"f").help()))}const e=Ye(this,pe,"f").runDefaultBuilderOn(this);if(B(e))return e.then((()=>Ye(this,ze,"f").help()))}return Promise.resolve(Ye(this,ze,"f").help())}getOptions(){return Ye(this,$e,"f")}getStrict(){return Ye(this,Ue,"f")}getStrictCommands(){return Ye(this,We,"f")}getStrictOptions(){return Ye(this,He,"f")}global(e,t){return H("<string|array> [boolean]",[e,t],arguments.length),e=[].concat(e),!1!==t?Ye(this,$e,"f").local=Ye(this,$e,"f").local.filter((t=>-1===e.indexOf(t))):e.forEach((e=>{Ye(this,$e,"f").local.includes(e)||Ye(this,$e,"f").local.push(e)})),this}group(e,t){H("<string|array> <string>",[e,t],arguments.length);const n=Ye(this,Re,"f")[t]||Ye(this,Ce,"f")[t];Ye(this,Re,"f")[t]&&delete Ye(this,Re,"f")[t];const r={};return Ye(this,Ce,"f")[t]=(n||[]).concat(e).filter((e=>!r[e]&&(r[e]=!0))),this}hide(e){return H("<string>",[e],arguments.length),Ye(this,$e,"f").hiddenOptions.push(e),this}implies(e,t){return H("<string|object> [number|string|array]",[e,t],arguments.length),Ye(this,Ve,"f").implies(e,t),this}locale(e){return H("[string]",[e],arguments.length),void 0===e?(this[rt](),Ye(this,Be,"f").y18n.getLocale()):(Ke(this,xe,!1,"f"),Ye(this,Be,"f").y18n.setLocale(e),this)}middleware(e,t,n){return Ye(this,je,"f").addMiddleware(e,!!t,n)}nargs(e,t){return H("<string|object|array> [number]",[e,t],arguments.length),this[ct](this.nargs.bind(this),"narg",e,t),this}normalize(e){return H("<array|string>",[e],arguments.length),this[at]("normalize",e),this}number(e){return H("<array|string>",[e],arguments.length),this[at]("number",e),this[Pt](e),this}option(e,t){if(H("<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[Pt](e),!Ye(this,qe,"f")||"version"!==e&&"version"!==(null==t?void 0:t.alias)||this[Ze](['"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"),Ye(this,$e,"f").key[e]=!0,t.alias&&this.alias(e,t.alias);const n=t.deprecate||t.deprecated;n&&this.deprecateOption(e,n);const r=t.demand||t.required||t.require;r&&this.demand(e,r),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&&(Ye(this,$e,"f").defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);const i=t.describe||t.description||t.desc;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){H("[string|array] [function|boolean|object] [function]",[e,t,n],arguments.length),this[et](),void 0===e&&(e=Ye(this,De,"f")),"object"==typeof t&&(Ke(this,Ge,t,"f"),t=n),"function"==typeof t&&(Ke(this,Le,t,"f"),t=!1),t||Ke(this,De,e,"f"),Ye(this,Le,"f")&&Ke(this,Se,!1,"f");const r=this[At](e,!!t),i=this.parsed;return Ye(this,ye,"f").setParsed(this.parsed),B(r)?r.then((e=>(Ye(this,Le,"f")&&Ye(this,Le,"f").call(this,Ye(this,we,"f"),e,Ye(this,Ie,"f")),e))).catch((e=>{throw Ye(this,Le,"f")&&Ye(this,Le,"f")(e,this.parsed.argv,Ye(this,Ie,"f")),e})).finally((()=>{this[ft](),this.parsed=i})):(Ye(this,Le,"f")&&Ye(this,Le,"f").call(this,Ye(this,we,"f"),r,Ye(this,Ie,"f")),this[ft](),this.parsed=i,r)}parseAsync(e,t,n){const r=this.parse(e,t,n);return B(r)?r:Promise.resolve(r)}parseSync(e,t,n){const r=this.parse(e,t,n);if(B(r))throw new k(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return r}parserConfiguration(e){return H("<object>",[e],arguments.length),Ke(this,Te,e,"f"),this}pkgConf(e,t){H("<string> [string]",[e,t],arguments.length);let n=null;const r=this[ot](t||Ye(this,me,"f"));return r[e]&&"object"==typeof r[e]&&(n=he(r[e],t||Ye(this,me,"f"),this[nt]()["deep-merge-config"]||!1,Ye(this,Be,"f")),Ye(this,$e,"f").configObjects=(Ye(this,$e,"f").configObjects||[]).concat(n)),this}positional(e,t){H("<string> <object>",[e,t],arguments.length);const n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];t=ee(t,((e,t)=>!("type"===e&&!["string","number","boolean"].includes(t))&&n.includes(e)));const r=Ye(this,ge,"f").fullCommands[Ye(this,ge,"f").fullCommands.length-1],i=r?Ye(this,pe,"f").cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return F(i).forEach((n=>{const r=i[n];Array.isArray(r)?-1!==r.indexOf(e)&&(t[n]=!0):r[e]&&!(n in t)&&(t[n]=r[e])})),this.group(e,Ye(this,ze,"f").getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return H("[boolean]",[e],arguments.length),Ke(this,Fe,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 H("<array|string|object> [number]",[e],arguments.length),"string"==typeof e&&Ye(this,$e,"f").narg[e]||this[ct](this.requiresArg.bind(this),"narg",e,NaN),this}showCompletionScript(e,t){return H("[string] [string]",[e,t],arguments.length),e=e||this.$0,Ye(this,Pe,"f").log(Ye(this,ye,"f").generateCompletionScript(e,t||Ye(this,be,"f")||"completion")),this}showHelp(e){if(H("[string|function]",[e],arguments.length),Ke(this,Ae,!0,"f"),!Ye(this,ze,"f").hasCachedHelpMessage()){if(!this.parsed){const t=this[At](Ye(this,De,"f"),void 0,void 0,0,!0);if(B(t))return t.then((()=>{Ye(this,ze,"f").showHelp(e)})),this}const t=Ye(this,pe,"f").runDefaultBuilderOn(this);if(B(t))return t.then((()=>{Ye(this,ze,"f").showHelp(e)})),this}return Ye(this,ze,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return H("[boolean|string] [string]",[e,t],arguments.length),Ye(this,ze,"f").showHelpOnFail(e,t),this}showVersion(e){return H("[string|function]",[e],arguments.length),Ye(this,ze,"f").showVersion(e),this}skipValidation(e){return H("<array|string>",[e],arguments.length),this[at]("skipValidation",e),this}strict(e){return H("[boolean]",[e],arguments.length),Ke(this,Ue,!1!==e,"f"),this}strictCommands(e){return H("[boolean]",[e],arguments.length),Ke(this,We,!1!==e,"f"),this}strictOptions(e){return H("[boolean]",[e],arguments.length),Ke(this,He,!1!==e,"f"),this}string(e){return H("<array|string>",[e],arguments.length),this[at]("string",e),this[Pt](e),this}terminalWidth(){return H([],0),Ye(this,Be,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return H("<object>",[e],arguments.length),Ke(this,xe,!1,"f"),Ye(this,Be,"f").y18n.updateLocale(e),this}usage(e,t,n,r){if(H("<string|null|undefined> [string|boolean] [function|object] [function]",[e,t,n,r],arguments.length),void 0!==t){if(R(e,null,Ye(this,Be,"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()")}return Ye(this,ze,"f").usage(e),this}version(e,t,n){const r="version";if(H("[boolean|string] [string] [string]",[e,t,n],arguments.length),Ye(this,qe,"f")&&(this[Qe](Ye(this,qe,"f")),Ye(this,ze,"f").version(void 0),Ke(this,qe,null,"f")),0===arguments.length)n=this[it](),e=r;else if(1===arguments.length){if(!1===e)return this;n=e,e=r}else 2===arguments.length&&(n=t,t=void 0);return Ke(this,qe,"string"==typeof e?e:r,"f"),t=t||Ye(this,ze,"f").deferY18nLookup("Show version number"),Ye(this,ze,"f").version(n||void 0),this.boolean(Ye(this,qe,"f")),this.describe(Ye(this,qe,"f"),t),this}wrap(e){return H("<number|null|undefined>",[e],arguments.length),Ye(this,ze,"f").wrap(e),this}[(pe=new WeakMap,me=new WeakMap,ge=new WeakMap,ye=new WeakMap,be=new WeakMap,ve=new WeakMap,we=new WeakMap,xe=new WeakMap,Oe=new WeakMap,Se=new WeakMap,Ee=new WeakMap,je=new WeakMap,Ce=new WeakMap,Ae=new WeakMap,_e=new WeakMap,ke=new WeakMap,Pe=new WeakMap,Ie=new WeakMap,$e=new WeakMap,Me=new WeakMap,Te=new WeakMap,Le=new WeakMap,Ge=new WeakMap,Ne=new WeakMap,Re=new WeakMap,De=new WeakMap,Fe=new WeakMap,Be=new WeakMap,Ue=new WeakMap,We=new WeakMap,He=new WeakMap,ze=new WeakMap,qe=new WeakMap,Ve=new WeakMap,Xe)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch(e){}return e}[Je](){return{log:(...e)=>{this[Ot]()||console.log(...e),Ke(this,Ae,!0,"f"),Ye(this,Ie,"f").length&&Ke(this,Ie,Ye(this,Ie,"f")+"\n","f"),Ke(this,Ie,Ye(this,Ie,"f")+e.join(" "),"f")},error:(...e)=>{this[Ot]()||console.error(...e),Ke(this,Ae,!0,"f"),Ye(this,Ie,"f").length&&Ke(this,Ie,Ye(this,Ie,"f")+"\n","f"),Ke(this,Ie,Ye(this,Ie,"f")+e.join(" "),"f")}}}[Qe](e){F(Ye(this,$e,"f")).forEach((t=>{if("configObjects"===t)return;const n=Ye(this,$e,"f")[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):"object"==typeof n&&delete n[e]})),delete Ye(this,ze,"f").getDescriptions()[e]}[Ze](e,t,n){Ye(this,Oe,"f")[n]||(Ye(this,Be,"f").process.emitWarning(e,t),Ye(this,Oe,"f")[n]=!0)}[et](){Ye(this,Ee,"f").push({options:Ye(this,$e,"f"),configObjects:Ye(this,$e,"f").configObjects.slice(0),exitProcess:Ye(this,Se,"f"),groups:Ye(this,Ce,"f"),strict:Ye(this,Ue,"f"),strictCommands:Ye(this,We,"f"),strictOptions:Ye(this,He,"f"),completionCommand:Ye(this,be,"f"),output:Ye(this,Ie,"f"),exitError:Ye(this,we,"f"),hasOutput:Ye(this,Ae,"f"),parsed:this.parsed,parseFn:Ye(this,Le,"f"),parseContext:Ye(this,Ge,"f")}),Ye(this,ze,"f").freeze(),Ye(this,Ve,"f").freeze(),Ye(this,pe,"f").freeze(),Ye(this,je,"f").freeze()}[tt](){let e,t="";return e=/\b(node|iojs|electron)(\.exe)?$/.test(Ye(this,Be,"f").process.argv()[0])?Ye(this,Be,"f").process.argv().slice(1,2):Ye(this,Be,"f").process.argv().slice(0,1),t=e.map((e=>{const t=this[jt](Ye(this,me,"f"),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e})).join(" ").trim(),Ye(this,Be,"f").getEnv("_")&&Ye(this,Be,"f").getProcessArgvBin()===Ye(this,Be,"f").getEnv("_")&&(t=Ye(this,Be,"f").getEnv("_").replace(`${Ye(this,Be,"f").path.dirname(Ye(this,Be,"f").process.execPath())}/`,"")),t}[nt](){return Ye(this,Te,"f")}[rt](){if(!Ye(this,xe,"f"))return;const e=Ye(this,Be,"f").getEnv("LC_ALL")||Ye(this,Be,"f").getEnv("LC_MESSAGES")||Ye(this,Be,"f").getEnv("LANG")||Ye(this,Be,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[it](){return this[ot]().version||"unknown"}[st](e){const t=e["--"]?e["--"]:e._;for(let e,n=0;void 0!==(e=t[n]);n++)Ye(this,Be,"f").Parser.looksLikeNumber(e)&&Number.isSafeInteger(Math.floor(parseFloat(`${e}`)))&&(t[n]=Number(e));return e}[ot](e){const t=e||"*";if(Ye(this,Ne,"f")[t])return Ye(this,Ne,"f")[t];let n={};try{let t=e||Ye(this,Be,"f").mainFilename;!e&&Ye(this,Be,"f").path.extname(t)&&(t=Ye(this,Be,"f").path.dirname(t));const r=Ye(this,Be,"f").findUp(t,((e,t)=>t.includes("package.json")?"package.json":void 0));R(r,void 0,Ye(this,Be,"f")),n=JSON.parse(Ye(this,Be,"f").readFileSync(r,"utf8"))}catch(e){}return Ye(this,Ne,"f")[t]=n||{},Ye(this,Ne,"f")[t]}[at](e,t){(t=[].concat(t)).forEach((t=>{t=this[dt](t),Ye(this,$e,"f")[e].push(t)}))}[ct](e,t,n,r){this[ut](e,t,n,r,((e,t,n)=>{Ye(this,$e,"f")[e][t]=n}))}[lt](e,t,n,r){this[ut](e,t,n,r,((e,t,n)=>{Ye(this,$e,"f")[e][t]=(Ye(this,$e,"f")[e][t]||[]).concat(n)}))}[ut](e,t,n,r,i){if(Array.isArray(n))n.forEach((t=>{e(t,r)}));else if((e=>"object"==typeof e)(n))for(const t of F(n))e(t,n[t]);else i(t,this[dt](n),r)}[dt](e){return"__proto__"===e?"___proto___":e}[ht](e,t){return this[ct](this[ht].bind(this),"key",e,t),this}[ft](){var e,t,n,r,i,s,o,a,c,l,u,d;const h=Ye(this,Ee,"f").pop();let f;R(h,void 0,Ye(this,Be,"f")),e=this,t=this,n=this,r=this,i=this,s=this,o=this,a=this,c=this,l=this,u=this,d=this,({options:{set value(t){Ke(e,$e,t,"f")}}.value,configObjects:f,exitProcess:{set value(e){Ke(t,Se,e,"f")}}.value,groups:{set value(e){Ke(n,Ce,e,"f")}}.value,output:{set value(e){Ke(r,Ie,e,"f")}}.value,exitError:{set value(e){Ke(i,we,e,"f")}}.value,hasOutput:{set value(e){Ke(s,Ae,e,"f")}}.value,parsed:this.parsed,strict:{set value(e){Ke(o,Ue,e,"f")}}.value,strictCommands:{set value(e){Ke(a,We,e,"f")}}.value,strictOptions:{set value(e){Ke(c,He,e,"f")}}.value,completionCommand:{set value(e){Ke(l,be,e,"f")}}.value,parseFn:{set value(e){Ke(u,Le,e,"f")}}.value,parseContext:{set value(e){Ke(d,Ge,e,"f")}}.value}=h),Ye(this,$e,"f").configObjects=f,Ye(this,ze,"f").unfreeze(),Ye(this,Ve,"f").unfreeze(),Ye(this,pe,"f").unfreeze(),Ye(this,je,"f").unfreeze()}[pt](e,t){return Y(t,(t=>(e(t),t)))}getInternalMethods(){return{getCommandInstance:this[mt].bind(this),getContext:this[gt].bind(this),getHasOutput:this[yt].bind(this),getLoggerInstance:this[bt].bind(this),getParseContext:this[vt].bind(this),getParserConfiguration:this[nt].bind(this),getUsageInstance:this[wt].bind(this),getValidationInstance:this[xt].bind(this),hasParseCallback:this[Ot].bind(this),isGlobalContext:this[St].bind(this),postProcess:this[Et].bind(this),reset:this[Ct].bind(this),runValidation:this[_t].bind(this),runYargsParserAndExecuteCommands:this[At].bind(this),setHasOutput:this[kt].bind(this)}}[mt](){return Ye(this,pe,"f")}[gt](){return Ye(this,ge,"f")}[yt](){return Ye(this,Ae,"f")}[bt](){return Ye(this,Pe,"f")}[vt](){return Ye(this,Ge,"f")||{}}[wt](){return Ye(this,ze,"f")}[xt](){return Ye(this,Ve,"f")}[Ot](){return!!Ye(this,Le,"f")}[St](){return Ye(this,ke,"f")}[Et](e,t,n,r){if(n)return e;if(B(e))return e;t||(e=this[Xe](e));return(this[nt]()["parse-positional-numbers"]||void 0===this[nt]()["parse-positional-numbers"])&&(e=this[st](e)),r&&(e=K(e,this,Ye(this,je,"f").getMiddleware(),!1)),e}[Ct](e={}){Ke(this,$e,Ye(this,$e,"f")||{},"f");const t={};t.local=Ye(this,$e,"f").local||[],t.configObjects=Ye(this,$e,"f").configObjects||[];const n={};t.local.forEach((t=>{n[t]=!0,(e[t]||[]).forEach((e=>{n[e]=!0}))})),Object.assign(Ye(this,Re,"f"),Object.keys(Ye(this,Ce,"f")).reduce(((e,t)=>{const r=Ye(this,Ce,"f")[t].filter((e=>!(e in n)));return r.length>0&&(e[t]=r),e}),{})),Ke(this,Ce,{},"f");return["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"].forEach((e=>{t[e]=(Ye(this,$e,"f")[e]||[]).filter((e=>!n[e]))})),["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"].forEach((e=>{t[e]=ee(Ye(this,$e,"f")[e],(e=>!n[e]))})),t.envPrefix=Ye(this,$e,"f").envPrefix,Ke(this,$e,t,"f"),Ke(this,ze,Ye(this,ze,"f")?Ye(this,ze,"f").reset(n):re(this,Ye(this,Be,"f")),"f"),Ke(this,Ve,Ye(this,Ve,"f")?Ye(this,Ve,"f").reset(n):function(e,t,n){const r=n.y18n.__,i=n.y18n.__n,s={nonOptionCount:function(n){const r=e.getDemandedCommands(),s=n._.length+(n["--"]?n["--"].length:0)-e.getInternalMethods().getContext().commands.length;r._&&(s<r._.min||s>r._.max)&&(s<r._.min?void 0!==r._.minMsg?t.fail(r._.minMsg?r._.minMsg.replace(/\$0/g,s.toString()).replace(/\$1/,r._.min.toString()):null):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",s,s.toString(),r._.min.toString())):s>r._.max&&(void 0!==r._.maxMsg?t.fail(r._.maxMsg?r._.maxMsg.replace(/\$0/g,s.toString()).replace(/\$1/,r._.max.toString()):null):t.fail(i("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",s,s.toString(),r._.max.toString()))))},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+""))},requiredArguments:function(e,n){let r=null;for(const t of Object.keys(n))Object.prototype.hasOwnProperty.call(e,t)&&void 0!==e[t]||(r=r||{},r[t]=n[t]);if(r){const e=[];for(const t of Object.keys(r)){const n=r[t];n&&e.indexOf(n)<0&&e.push(n)}const n=e.length?`\n${e.join("\n")}`:"";t.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(r).length,Object.keys(r).join(", ")+n))}},unknownArguments:function(n,r,o,a,c=!0){var l;const u=e.getInternalMethods().getCommandInstance().getCommands(),d=[],h=e.getInternalMethods().getContext();if(Object.keys(n).forEach((t=>{le.includes(t)||Object.prototype.hasOwnProperty.call(o,t)||Object.prototype.hasOwnProperty.call(e.getInternalMethods().getParseContext(),t)||s.isValidAndSomeAliasIsNotNew(t,r)||d.push(t)})),c&&(h.commands.length>0||u.length>0||a)&&n._.slice(h.commands.length).forEach((e=>{u.includes(""+e)||d.push(""+e)})),c){const t=(null===(l=e.getDemandedCommands()._)||void 0===l?void 0:l.max)||0,r=h.commands.length+t;r<n._.length&&n._.slice(r).forEach((e=>{e=String(e),h.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(", ")))},unknownCommands:function(n){const r=e.getInternalMethods().getCommandInstance().getCommands(),s=[],o=e.getInternalMethods().getContext();return(o.commands.length>0||r.length>0)&&n._.slice(o.commands.length).forEach((e=>{r.includes(""+e)||s.push(""+e)})),s.length>0&&(t.fail(i("Unknown command: %s","Unknown commands: %s",s.length,s.join(", "))),!0)},isValidAndSomeAliasIsNotNew:function(t,n){if(!Object.prototype.hasOwnProperty.call(n,t))return!1;const r=e.parsed.newAliases;return[t,...n[t]].some((e=>!Object.prototype.hasOwnProperty.call(r,e)||!r[t]))},limitedChoices:function(n){const i=e.getOptions(),s={};if(!Object.keys(i.choices).length)return;Object.keys(n).forEach((e=>{-1===le.indexOf(e)&&Object.prototype.hasOwnProperty.call(i.choices,e)&&[].concat(n[e]).forEach((t=>{-1===i.choices[e].indexOf(t)&&void 0!==t&&(s[e]=(s[e]||[]).concat(t))}))}));const o=Object.keys(s);if(!o.length)return;let a=r("Invalid values:");o.forEach((e=>{a+=`\n ${r("Argument: %s, Given: %s, Choices: %s",e,t.stringifiedValues(s[e]),t.stringifiedValues(i.choices[e]))}`})),t.fail(a)}};let o={};function a(e,t){const n=Number(t);return"number"==typeof(t=isNaN(n)?t:n)?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,r){H("<string|object> [array|number|string]",[t,r],arguments.length),"object"==typeof t?Object.keys(t).forEach((e=>{s.implies(e,t[e])})):(e.global(t),o[t]||(o[t]=[]),Array.isArray(r)?r.forEach((e=>s.implies(t,e))):(R(r,void 0,n),o[t].push(r)))},s.getImplied=function(){return o},s.implications=function(e){const n=[];if(Object.keys(o).forEach((t=>{const r=t;(o[t]||[]).forEach((t=>{let i=r;const s=t;i=a(e,i),t=a(e,t),i&&!t&&n.push(` ${r} -> ${s}`)}))})),n.length){let e=`${r("Implications failed:")}\n`;n.forEach((t=>{e+=t})),t.fail(e)}};let c={};s.conflicts=function(t,n){H("<string|object> [array|string]",[t,n],arguments.length),"object"==typeof t?Object.keys(t).forEach((e=>{s.conflicts(e,t[e])})):(e.global(t),c[t]||(c[t]=[]),Array.isArray(n)?n.forEach((e=>s.conflicts(t,e))):c[t].push(n))},s.getConflicting=()=>c,s.conflicting=function(i){Object.keys(i).forEach((e=>{c[e]&&c[e].forEach((n=>{n&&void 0!==i[e]&&void 0!==i[n]&&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((s=>{s&&void 0!==i[n.Parser.camelCase(e)]&&void 0!==i[n.Parser.camelCase(s)]&&t.fail(r("Arguments %s and %s are mutually exclusive",e,s))}))}))},s.recommendCommands=function(e,n){n=n.sort(((e,t)=>t.length-e.length));let i=null,s=1/0;for(let t,r=0;void 0!==(t=n[r]);r++){const n=ce(e,t);n<=3&&n<s&&(s=n,i=t)}i&&t.fail(r("Did you mean %s?",i))},s.reset=function(e){return o=ee(o,(t=>!e[t])),c=ee(c,(t=>!e[t])),s};const l=[];return s.freeze=function(){l.push({implied:o,conflicting:c})},s.unfreeze=function(){const e=l.pop();R(e,void 0,n),({implied:o,conflicting:c}=e)},s}(this,Ye(this,ze,"f"),Ye(this,Be,"f")),"f"),Ke(this,pe,Ye(this,pe,"f")?Ye(this,pe,"f").reset():function(e,t,n,r){return new J(e,t,n,r)}(Ye(this,ze,"f"),Ye(this,Ve,"f"),Ye(this,je,"f"),Ye(this,Be,"f")),"f"),Ye(this,ye,"f")||Ke(this,ye,function(e,t,n,r){return new ae(e,t,n,r)}(this,Ye(this,ze,"f"),Ye(this,pe,"f"),Ye(this,Be,"f")),"f"),Ye(this,je,"f").reset(),Ke(this,be,null,"f"),Ke(this,Ie,"","f"),Ke(this,we,null,"f"),Ke(this,Ae,!1,"f"),this.parsed=!1,this}[jt](e,t){return Ye(this,Be,"f").path.relative(e,t)}[At](e,t,n,r=0,i=!1){let s=!!n||i;e=e||Ye(this,De,"f"),Ye(this,$e,"f").__=Ye(this,Be,"f").y18n.__,Ye(this,$e,"f").configuration=this[nt]();const o=!!Ye(this,$e,"f").configuration["populate--"],a=Object.assign({},Ye(this,$e,"f").configuration,{"populate--":!0}),c=Ye(this,Be,"f").Parser.detailed(e,Object.assign({},Ye(this,$e,"f"),{configuration:{"parse-positional-numbers":!1,...a}})),l=Object.assign(c.argv,Ye(this,Ge,"f"));let u;const d=c.aliases;let h=!1,f=!1;Object.keys(l).forEach((e=>{e===Ye(this,_e,"f")&&l[e]?h=!0:e===Ye(this,qe,"f")&&l[e]&&(f=!0)})),l.$0=this.$0,this.parsed=c,0===r&&Ye(this,ze,"f").clearCachedHelpMessage();try{if(this[rt](),t)return this[Et](l,o,!!n,!1);if(Ye(this,_e,"f")){[Ye(this,_e,"f")].concat(d[Ye(this,_e,"f")]||[]).filter((e=>e.length>1)).includes(""+l._[l._.length-1])&&(l._.pop(),h=!0)}Ke(this,ke,!1,"f");const a=Ye(this,pe,"f").getCommands(),p=Ye(this,ye,"f").completionKey in l,m=h||p||i;if(l._.length){if(a.length){let e;for(let t,s=r||0;void 0!==l._[s];s++){if(t=String(l._[s]),a.includes(t)&&t!==Ye(this,be,"f")){const e=Ye(this,pe,"f").runCommand(t,this,c,s+1,i,h||f||i);return this[Et](e,o,!!n,!1)}if(!e&&t!==Ye(this,be,"f")){e=t;break}}!Ye(this,pe,"f").hasDefaultCommand()&&Ye(this,Fe,"f")&&e&&!m&&Ye(this,Ve,"f").recommendCommands(e,a)}Ye(this,be,"f")&&l._.includes(Ye(this,be,"f"))&&!p&&(Ye(this,Se,"f")&&te(!0),this.showCompletionScript(),this.exit(0))}if(Ye(this,pe,"f").hasDefaultCommand()&&!m){const e=Ye(this,pe,"f").runCommand(null,this,c,0,i,h||f||i);return this[Et](e,o,!!n,!1)}if(p){Ye(this,Se,"f")&&te(!0);const t=(e=[].concat(e)).slice(e.indexOf(`--${Ye(this,ye,"f").completionKey}`)+1);return Ye(this,ye,"f").getCompletion(t,((e,t)=>{if(e)throw new k(e.message);(t||[]).forEach((e=>{Ye(this,Pe,"f").log(e)})),this.exit(0)})),this[Et](l,!o,!!n,!1)}if(Ye(this,Ae,"f")||(h?(Ye(this,Se,"f")&&te(!0),s=!0,this.showHelp("log"),this.exit(0)):f&&(Ye(this,Se,"f")&&te(!0),s=!0,Ye(this,ze,"f").showVersion("log"),this.exit(0))),!s&&Ye(this,$e,"f").skipValidation.length>0&&(s=Object.keys(l).some((e=>Ye(this,$e,"f").skipValidation.indexOf(e)>=0&&!0===l[e]))),!s){if(c.error)throw new k(c.error.message);if(!p){const e=this[_t](d,{},c.error);n||(u=K(l,this,Ye(this,je,"f").getMiddleware(),!0)),u=this[pt](e,null!=u?u:l),B(u)&&!n&&(u=u.then((()=>K(l,this,Ye(this,je,"f").getMiddleware(),!1))))}}}catch(e){if(!(e instanceof k))throw e;Ye(this,ze,"f").fail(e.message,e)}return this[Et](null!=u?u:l,o,!!n,!0)}[_t](e,t,n,r){const i={...this.getDemandedOptions()};return s=>{if(n)throw new k(n.message);Ye(this,Ve,"f").nonOptionCount(s),Ye(this,Ve,"f").requiredArguments(s,i);let o=!1;Ye(this,We,"f")&&(o=Ye(this,Ve,"f").unknownCommands(s)),Ye(this,Ue,"f")&&!o?Ye(this,Ve,"f").unknownArguments(s,e,t,!!r):Ye(this,He,"f")&&Ye(this,Ve,"f").unknownArguments(s,e,{},!1,!1),Ye(this,Ve,"f").limitedChoices(s),Ye(this,Ve,"f").implications(s),Ye(this,Ve,"f").conflicting(s)}}[kt](){Ke(this,Ae,!0,"f")}[Pt](e){if("string"==typeof e)Ye(this,$e,"f").key[e]=!0;else for(const t of e)Ye(this,$e,"f").key[t]=!0}}const $t=(Mt=N,(e=[],t=Mt.process.cwd(),n)=>{const r=new It(e,t,n,Mt);return Object.defineProperty(r,"argv",{get:()=>r.parse(),enumerable:!0}),r.help(),r.version(),r});var Mt;const Tt=$t;function Lt(e,t){const n=e.startsWith(".")?(0,f.join)(t,e):e;return import(n)}function Gt(e,t){const{homepage:n,site:r=n,repository:i}=t,s=r&&r!==i,o=e.getInternalMethods(),a=(c=o.getCommandInstance().handlers,Object.keys(c).some((e=>e&&"$0"!==e)));var c;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: ${r}`),i&&e.epilogue(`Repository: ${i}`),e}const Nt=e(import.meta.url)("module"),Rt=e(import.meta.url)("node:buffer"),Dt=e(import.meta.url)("node:path"),Ft=e(import.meta.url)("node:child_process"),Bt=e(import.meta.url)("node:process");var Ut=a(8995);const Wt=e(import.meta.url)("node:url");function Ht(e={}){const{env:t=process.env,platform:n=process.platform}=e;return"win32"!==n?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"}function zt({env:e=Bt.env,...t}={}){const n=Ht({env:e={...e}});return t.path=e[n],e[n]=function(e={}){const{cwd:t=Bt.cwd(),path:n=Bt.env[Ht()],execPath:r=Bt.execPath}=e;let i;const s=t instanceof URL?Wt.fileURLToPath(t):t;let o=Dt.resolve(s);const a=[];for(;i!==o;)a.push(Dt.join(o,"node_modules/.bin")),i=o,o=Dt.resolve(o,"..");return a.push(Dt.resolve(s,r,"..")),[...a,n].join(Dt.delimiter)}(t),e}const qt=(e,t,n,r)=>{if("length"===n||"prototype"===n)return;if("arguments"===n||"caller"===n)return;const i=Object.getOwnPropertyDescriptor(e,n),s=Object.getOwnPropertyDescriptor(t,n);!Vt(i,s)&&r||Object.defineProperty(e,n,s)},Vt=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)},Kt=(e,t)=>`/* Wrapped ${e}*/\n${t}`,Yt=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Xt=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");function Jt(e,t,{ignoreNonConfigurable:n=!1}={}){const{name:r}=e;for(const r of Reflect.ownKeys(t))qt(e,t,r,n);return((e,t)=>{const n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)})(e,t),((e,t,n)=>{const r=""===n?"":`with ${n.trim()}() `,i=Kt.bind(null,r,t.toString());Object.defineProperty(i,"name",Xt),Object.defineProperty(e,"toString",{...Yt,value:i})})(e,t,r),e}const Qt=new WeakMap,Zt=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let n,r=0;const i=e.displayName||e.name||"<anonymous>",s=function(...o){if(Qt.set(s,++r),1===r)n=e.apply(this,o),e=null;else if(!0===t.throw)throw new Error(`Function \`${i}\` can only be called once`);return n};return Jt(s,e),Qt.set(s,r),s};Zt.callCount=e=>{if(!Qt.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Qt.get(e)};const en=Zt;var tn=a(22037);const nn=function(e,t){return{name:`SIGRT${t+1}`,number:rn+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},rn=34,sn=64,on=[{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"}],an=function(){const e=function(){const e=sn-rn+1;return Array.from({length:e},nn)}();return[...on,...e].map(cn)},cn=function({name:e,number:t,description:n,action:r,forced:i=!1,standard:s}){const{signals:{[e]:o}}=tn.constants,a=void 0!==o;return{name:e,number:a?o:t,description:n,supported:a,action:r,forced:i,standard:s}},ln=function(e,{name:t,number:n,description:r,supported:i,action:s,forced:o,standard:a}){return{...e,[t]:{name:t,number:n,description:r,supported:i,action:s,forced:o,standard:a}}},un=an().reduce(ln,{}),dn=function(e,t){const n=hn(e,t);if(void 0===n)return{};const{name:r,description:i,supported:s,action:o,forced:a,standard:c}=n;return{[e]:{name:r,number:e,description:i,supported:s,action:o,forced:a,standard:c}}},hn=function(e,t){const n=t.find((({name:t})=>tn.constants.signals[t]===e));return void 0!==n?n:t.find((t=>t.number===e))},fn=(function(){const e=an(),t=sn+1,n=Array.from({length:t},((t,n)=>dn(n,e)));Object.assign({},...n)}(),({stdout:e,stderr:t,all:n,error:r,signal:i,exitCode:s,command:o,escapedCommand:a,timedOut:c,isCanceled:l,killed:u,parsed:{options:{timeout:d}}})=>{s=null===s?void 0:s;const h=void 0===(i=null===i?void 0:i)?void 0:un[i].description,f=(({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:i,exitCode:s,isCanceled:o})=>e?`timed out after ${t} milliseconds`:o?"was canceled":void 0!==n?`failed with ${n}`:void 0!==r?`was killed with ${r} (${i})`:void 0!==s?`failed with exit code ${s}`:"failed")({timedOut:c,timeout:d,errorCode:r&&r.code,signal:i,signalDescription:h,exitCode:s,isCanceled:l}),p=`Command ${f}: ${o}`,m="[object Error]"===Object.prototype.toString.call(r),g=m?`${p}\n${r.message}`:p,y=[g,t,e].filter(Boolean).join("\n");return m?(r.originalMessage=r.message,r.message=y):r=new Error(y),r.shortMessage=g,r.command=o,r.escapedCommand=a,r.exitCode=s,r.signal=i,r.signalDescription=h,r.stdout=e,r.stderr=t,void 0!==n&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=Boolean(c),r.isCanceled=l,r.killed=u&&!c,r}),pn=["stdin","stdout","stderr"],mn=e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return pn.map((t=>e[t]));if((e=>pn.some((t=>void 0!==e[t])))(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${pn.map((e=>`\`${e}\``)).join(", ")}`);if("string"==typeof t)return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);const n=Math.max(t.length,pn.length);return Array.from({length:n},((e,n)=>t[n]))},gn=e(import.meta.url)("node:os");var yn=a(90260);const bn=(e,t="SIGTERM",n={})=>{const r=e(t);return vn(e,t,n,r),r},vn=(e,t,n,r)=>{if(!wn(t,n,r))return;const i=On(n),s=setTimeout((()=>{e("SIGKILL")}),i);s.unref&&s.unref()},wn=(e,{forceKillAfterTimeout:t},n)=>xn(e)&&!1!==t&&n,xn=e=>e===gn.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),On=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Sn=(e,t)=>{e.kill()&&(t.isCanceled=!0)},En=(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(0===t||void 0===t)return r;let i;const s=new Promise(((r,s)=>{i=setTimeout((()=>{((e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,n,s)}),t)})),o=r.finally((()=>{clearTimeout(i)}));return Promise.race([s,o])};function jn(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}var Cn=a(10031),An=a(90873);const _n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},kn=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(e&&n)return t?Cn(e,{encoding:t,maxBuffer:r}):Cn.buffer(e,{maxBuffer:r})},Pn=(async()=>{})().constructor.prototype,In=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Pn,e)])),$n=(e,t)=>{for(const[n,r]of In){const i="function"==typeof t?(...e)=>Reflect.apply(r.value,t(),e):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:i})}return e},Mn=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Tn=/^[\w.-]+$/,Ln=/"/g,Gn=(e,t)=>Mn(e,t).map((e=>(e=>"string"!=typeof e||Tn.test(e)?e:`"${e.replace(Ln,'\\"')}"`)(e))).join(" "),Nn=(e,t,n={})=>{const r=Ut._parse(e,t,n);return e=r.command,t=r.args,(n={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(n=r.options).cwd||Bt.cwd(),execPath:Bt.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n}).env=(({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:i})=>{const s=t?{...Bt.env,...e}:e;return n?zt({env:s,cwd:r,execPath:i}):s})(n),n.stdio=mn(n),"win32"===Bt.platform&&"cmd"===Dt.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:n,parsed:r}},Rn=(e,t,n)=>"string"==typeof t||Rt.Buffer.isBuffer(t)?e.stripFinalNewline?function(e){const t="string"==typeof e?"\n":"\n".charCodeAt(),n="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===n&&(e=e.slice(0,-1)),e}(t):t:void 0===n?void 0:"";function Dn(e,t,n){const r=Nn(e,t,n),i=((e,t)=>Mn(e,t).join(" "))(e,t),s=Gn(e,t);let o;(({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})`)})(r.options);try{o=Ft.spawn(r.file,r.args,r.options)}catch(e){const t=new Ft.ChildProcess,n=Promise.reject(fn({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return $n(t,n)}const a=(e=>new Promise(((t,n)=>{e.on("exit",((e,n)=>{t({exitCode:e,signal:n})})),e.on("error",(e=>{n(e)})),e.stdin&&e.stdin.on("error",(e=>{n(e)}))})))(o),c=En(o,r.options,a),l=(async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;const i=yn((()=>{e.kill()}));return r.finally((()=>{i()}))})(o,r.options,c),u={isCanceled:!1};o.kill=bn.bind(null,o.kill.bind(o)),o.cancel=Sn.bind(null,o,u);const d=en((async()=>{const[{error:e,exitCode:t,signal:n,timedOut:a},c,d,h]=await(async({stdout:e,stderr:t,all:n},{encoding:r,buffer:i,maxBuffer:s},o)=>{const a=kn(e,{encoding:r,buffer:i,maxBuffer:s}),c=kn(t,{encoding:r,buffer:i,maxBuffer:s}),l=kn(n,{encoding:r,buffer:i,maxBuffer:2*s});try{return await Promise.all([o,a,c,l])}catch(r){return Promise.all([{error:r,signal:r.signal,timedOut:r.timedOut},_n(e,a),_n(t,c),_n(n,l)])}})(o,r.options,l),f=Rn(r.options,c),p=Rn(r.options,d),m=Rn(r.options,h);if(e||0!==t||null!==n){const c=fn({error:e,exitCode:t,signal:n,stdout:f,stderr:p,all:m,command:i,escapedCommand:s,parsed:r,timedOut:a,isCanceled:u.isCanceled||!!r.options.signal&&r.options.signal.aborted,killed:o.killed});if(!r.options.reject)return c;throw c}return{command:i,escapedCommand:s,exitCode:0,stdout:f,stderr:p,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return((e,t)=>{void 0!==t&&void 0!==e.stdin&&(jn(t)?t.pipe(e.stdin):e.stdin.end(t))})(o,r.options.input),o.all=((e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=An();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n})(o,r.options),$n(o,d)}const Fn=process.cwd();const Bn=(0,Nt.createRequire)(import.meta.url);function Un(e,t=Fn){return e.startsWith(".")?(0,f.resolve)(t,e):(0,f.isAbsolute)(e)?e:Bn.resolve(e)}function Wn(e){try{return(0,r.statSync)(Un(e)),!0}catch{return!1}}function Hn(e,t={}){const n=function(e){try{const t=(0,r.readFileSync)(Un(e),"utf8");return JSON.parse(t)}catch{return{}}}("./package.json");if(e){const{[e]:r=t}=n;return r}return n}var zn=a(77918);const qn="git",Vn="";async function Kn(){try{const{stdout:e}=await Dn("git",["--version"]);return Boolean(e)}catch{return!1}}function Yn(e){e.command("hooks","Set .githooks as git.hooksPath",{},(()=>{Kn().then((e=>{e&&zn()&&Dn("git config core.hooksPath .githooks").then((()=>{console.log("Done: set .githooks")})).catch((e=>{process.exitCode=1,console.error("Error:",e.message)}))})).catch((()=>{}))})),e.demandCommand(1,"Typing `hooks`")}const Xn=e(import.meta.url)("fs/promises"),Jn={"body-leading-blank":[1,"always"],"body-max-line-length":[2,"always",100],"footer-leading-blank":[1,"always"],"footer-max-line-length":[2,"always",100],"header-max-length":[2,"always",100],"subject-case":[0],"subject-empty":[2,"never"],"subject-full-stop":[2,"never","."],"type-case":[2,"always","lower-case"],"type-empty":[2,"never"],"type-enum":[2,"always",["build","chore","ci","docs","feat","fix","perf","refactor","revert","style","test"]],"scope-case":[0],"body-case":[0],"header-case":[0]};function Qn(){return(0,Xn.readFile)((0,f.resolve)(process.cwd(),".git/COMMIT_EDITMSG"),"utf8")}function Zn(e){e.command("commit","Lint git commit message",{},(()=>{(async function(){const e=await Qn(),t=await Promise.all([a.e(402),a.e(824)]).then(a.t.bind(a,69402,19)).then((e=>e.default.default||e.default)),n=await Promise.all([a.e(640),a.e(824)]).then(a.t.bind(a,93794,19)).then((e=>e.default.default||e.default)),r=await t(e,Jn);return{result:r,output:await n({results:[r]})}})().then((({result:e,output:t})=>{e.valid?console.log("Pass."):(console.log("Fail:"),console.log(t),process.exitCode=1)})).catch((e=>{console.error(e),process.exitCode=1}))}))}function er({rustywind:e,garou:t,stylelint:n,eslint:r,prettier:i,typescript:s}){const o=process.stdin.isTTY?" --color":"";return function(e){const t=Object.entries(e).map((([e,t])=>[e,t.filter(Boolean)])).filter((([e,t])=>t.length));return t.length>0?Object.fromEntries(t):void 0}({"*.{{wx,tt,q,ax,jx,ks}ml,swan}":[e&&"rustywind --write"],"*.{vue,html,htm,md}":[e&&"rustywind --write",t&&"garou",i&&`prettier -w -u${o}`,n&&`stylelint --fix --custom-formatter=node_modules/stylelint-formatter-pretty${o}`,r&&`eslint --fix -f=pretty${o}`],"*.{ts,tsx,mts,cts}":[e&&"rustywind --write",t&&"garou",i&&`prettier -w -u${o}`,r&&`eslint --fix -f=pretty${o}`,s&&(()=>"tsc --noEmit")],"*.{js,jsx,mjs,cjs,wxs,qs}":[e&&"rustywind --write",t&&"garou",i&&`prettier -w -u${o}`,r&&`eslint --fix -f=pretty${o}`],"*.{c,sc,le,wx,q,tt,jx,ac}ss":[t&&"garou",i&&`prettier -w -u${o}`,n&&`stylelint --fix --custom-formatter=node_modules/stylelint-formatter-pretty${o}`],"{*.{json,jsonc,webmanifest,editorconfig,yml,yaml,toml},.{babel,npm}rc}":[i&&`prettier -w -u${o}`],"*.svg":[t&&"garou",i&&`prettier --parser html -w -u${o}`,i&&`prettier -w -u${o}`,n&&`stylelint --fix --custom-formatter=node_modules/stylelint-formatter-pretty${o}`],"yarn.lock":[t&&"garou"]})}async function tr(){const{default:e}=await Promise.all([a.e(640),a.e(841),a.e(824)]).then(a.bind(a,73750));return e({allowEmpty:!0,concurrent:!0,config:er(function(){const e=Hn("devDependencies");return{rustywind:"rustywind"in e,garou:"garou"in e,stylelint:"stylelint"in e,eslint:"eslint"in e,prettier:"prettier"in e,typescript:"typescript"in e}}()),cwd:process.cwd(),debug:!1,quiet:!1,relative:!1,shell:!1,stash:!0})}const nr="lint";function rr(e){Zn(e),function(e){e.command("staged","Lint and format git staged files",{},(()=>{tr().then((e=>{process.exitCode=e?0:1})).catch((()=>{process.exitCode=1}))}))}(e),e.demandCommand(1,"Typing `commit` or `staged`")}process.on("SIGINT",(()=>{})),new class{constructor(e,t){this.root=t;const{bin:n,homepage:i,name:s="cheetor",repository:{url:o=""}={},version:a}="string"==typeof e?JSON.parse((0,r.readFileSync)(new URL(e,t))):e;this.homepage=i,this.repository=o.includes("github.com")?o.replace(/\.git$/,""):"";const c=Tt(process.argv.slice(2)).strict().alias("help","h").alias("version","v").hide("help").version(a).hide("version").detectLocale(!1),l=function(e,t){if("string"==typeof e||!e)return t;const n=Object.keys(e);return 1===n.length&&n[0]}(n,s);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=>{const n=await Lt(e,this.root);return t.command(n)})),this}commandSafe(e){return this.cli=this.cli.then((t=>function(e,t){return Lt(e,t).catch((e=>{if("ERR_MODULE_NOT_FOUND"===e.code&&e.message.endsWith(` imported from ${(0,m.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 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=>Gt(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").command(n).command(t).commandSmart((function(){if(Wn("svgo/package.json")&&Wn("svgo-config/package.json"))return{command:"svgo",describe:"Run `svgo` to optimize `*.svg`",handler({_:[e,t="./"]}){Dn("svgo",["-r","-q","--pretty","--indent","2","--config",(0,Nt.createRequire)(import.meta.url).resolve("svgo-config"),"-f",t]).then((()=>{console.log("Done: calling svgo")})).catch((e=>{process.exitCode=1,console.error("Error:",e.message)}))}}})).setup()})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-move/cli",
3
- "version": "0.7.2",
3
+ "version": "0.8.2",
4
4
  "description": "Frontend develop helper for frontend development",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -34,16 +34,17 @@
34
34
  "nice-move": "index.mjs"
35
35
  },
36
36
  "dependencies": {
37
- "@nice-move/lint": "^0.5.1",
37
+ "@nice-move/lint": "^0.6.2",
38
38
  "cheetor": "^0.13.0",
39
39
  "execa": "^6.1.0",
40
- "settingz": "^0.1.9"
40
+ "is-git-repository": "^2.0.0",
41
+ "settingz": "^0.2.0"
41
42
  },
42
43
  "engines": {
43
- "node": "^14.17.0 || >=16.13.0"
44
+ "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
44
45
  },
45
46
  "publishConfig": {
46
47
  "access": "public",
47
48
  "registry": "https://registry.npmjs.org/"
48
49
  }
49
- }
50
+ }
package/cmd/svgo.mjs DELETED
@@ -1,39 +0,0 @@
1
- import { createRequire } from 'module';
2
-
3
- import { execa } from 'execa';
4
- import { isReachable } from 'settingz';
5
-
6
- // eslint-disable-next-line consistent-return
7
- export function svgoCaller() {
8
- if (
9
- isReachable('svgo/package.json') &&
10
- isReachable('svgo-config/package.json')
11
- ) {
12
- return {
13
- command: 'svgo',
14
- describe: 'Run `svgo` to optimize `*.svg`',
15
- handler({ _: [_, path = './'] }) {
16
- const require = createRequire(import.meta.url);
17
-
18
- execa('svgo', [
19
- '-r',
20
- '-q',
21
- '--pretty',
22
- '--indent',
23
- '2',
24
- '--config',
25
- require.resolve('svgo-config'),
26
- '-f',
27
- path,
28
- ])
29
- .then(() => {
30
- console.log('Done: calling svgo');
31
- })
32
- .catch((error) => {
33
- process.exitCode = 1;
34
- console.error('Error:', error.message);
35
- });
36
- },
37
- };
38
- }
39
- }
package/index.mjs DELETED
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { Cheetor } from 'cheetor';
4
-
5
- import { svgoCaller } from './cmd/svgo.mjs';
6
-
7
- process.on('SIGINT', () => {});
8
-
9
- new Cheetor('./package.json', import.meta.url)
10
- .website('https://www.npmjs.com/org/nice-move')
11
- .commandSafe('@nice-move/lint/dist/index.mjs')
12
- .commandSmart(svgoCaller)
13
- .setup();