@qlover/create-app 0.3.5 → 0.3.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @qlover/create-app
2
2
 
3
+ ## 0.3.6
4
+
5
+ ### Patch Changes
6
+
7
+ #### ♻️ Refactors
8
+
9
+ - update @qlover/create-app with new build tools and dependencies ([a6d902b](https://github.com/qlover/fe-base/commit/a6d902bee8a5f8b3c37669f26cf0862bf317ef6f)) ([#420](https://github.com/qlover/fe-base/pull/420))
10
+
11
+ - Replaced Rollup with tsup for building the application, enhancing build performance and simplifying configuration.
12
+ - Updated package.json to reflect changes in dependencies and scripts, including the removal of outdated entries.
13
+ - Improved README with installation and usage instructions for better user guidance.
14
+ - Removed unnecessary files and streamlined the project structure for clarity.
15
+
3
16
  ## 0.3.5
4
17
 
5
18
  ### Patch Changes
@@ -12,8 +25,7 @@
12
25
  - Introduced `vite-plugin-imp` to optimize Ant Design imports, reducing bundle size and improving load times.
13
26
  - Updated Vite configuration to define manual chunks for better code splitting and chunk management.
14
27
 
15
-
16
- Co-authored-by: QRJ <renjie.qin@brain.im>
28
+ Co-authored-by: QRJ <renjie.qin@brain.im>
17
29
 
18
30
  ## 0.3.4
19
31
 
package/README.md CHANGED
@@ -1,5 +1,17 @@
1
1
  ## @qlover/create-app
2
2
 
3
+ 快速创建和初始化新的应用程序的命令行工具。
4
+
5
+ ### 安装
6
+
7
+ ```bash
8
+ npm install -g @qlover/create-app
3
9
  ```
10
+
11
+ ### 使用方法
12
+
13
+ 你可以通过以下方式使用:
14
+
15
+ ```bash
4
16
  npx @qlover/create-app
5
17
  ```
package/dist/index.cjs CHANGED
@@ -1 +1,2 @@
1
- "use strict";var t=require("@qlover/scripts-context"),r=require("inquirer"),e=require("path"),n=require("ora"),i=require("fs"),o=require("ignore");const u=(t,r)=>"string"==typeof t&&""!==t.trim()||`${r} is required`;function a(t,r){return[{type:"input",name:"projectName",message:"Project name",validate:t=>u(t,"Project name")},{type:"list",name:"template",message:"Template name",choices:[...t,...r]}]}function c(t){return[{type:"checkbox",name:"subPackages",message:"Sub package names",choices:t}]}class f{static ensureDir(t){i.existsSync(t)||i.mkdirSync(t,{recursive:!0})}}const{copyFile:s,stat:l}=i.promises;class p{ignoreTargetPath;ignoreFile;static IGNORE_FILE=".gitignore.template";constructor(t,r=p.IGNORE_FILE){this.ignoreTargetPath=t,this.ignoreFile=r}getIg(t=this.ignoreTargetPath){const r=e.join(t,this.ignoreFile);if(!i.existsSync(r))return;const n=i.readFileSync(r,"utf8").split("\n").map((t=>t.trim())).filter((t=>t&&!t.startsWith("#")));return o().add(n)}async copyFiles(t,r,n,o){const u=await i.promises.readdir(t);await Promise.all(u.map((async i=>{const u=e.join(t,i),a=e.join(r,i);if(n&&n.ignores(i))return;f.ensureDir(e.dirname(a));if((await l(u)).isDirectory())await this.copyFiles(u,a,n,o);else{if(o&&await o(u,a))return;await s(u,a)}})))}copyPaths({sourcePath:t,targetPath:r,copyCallback:e}){f.ensureDir(r);const n=this.getIg();return this.copyFiles(t,r,n,e)}}var h,v,y,g,b,d,_,m,j,P,w,O,x,F,S,k,T,A,z,N,R,C,D,E,q,I,J,$,G,U,B,L,M,W,V,H,K,Q,X,Y,Z,tt,rt,et,nt,it,ot,ut,at,ct,ft,st,lt,pt,ht,vt,yt,gt,bt,dt,_t,mt,jt,Pt,wt,Ot,xt,Ft,St,kt,Tt,At,zt,Nt,Rt,Ct,Dt,Et,qt,It,Jt,$t,Gt,Ut,Bt,Lt,Mt,Wt,Vt,Ht,Kt,Qt,Xt,Yt,Zt,tr,rr,er,nr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ir(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function or(){if(v)return h;return v=1,h=function(){this.__data__=[],this.size=0}}function ur(){if(g)return y;return g=1,y=function(t,r){return t===r||t!=t&&r!=r}}function ar(){if(d)return b;d=1;var t=ur();return b=function(r,e){for(var n=r.length;n--;)if(t(r[n][0],e))return n;return-1}}function cr(){if(m)return _;m=1;var t=ar(),r=Array.prototype.splice;return _=function(e){var n=this.__data__,i=t(n,e);return!(i<0)&&(i==n.length-1?n.pop():r.call(n,i,1),--this.size,!0)}}function fr(){if(P)return j;P=1;var t=ar();return j=function(r){var e=this.__data__,n=t(e,r);return n<0?void 0:e[n][1]}}function sr(){if(O)return w;O=1;var t=ar();return w=function(r){return t(this.__data__,r)>-1}}function lr(){if(F)return x;F=1;var t=ar();return x=function(r,e){var n=this.__data__,i=t(n,r);return i<0?(++this.size,n.push([r,e])):n[i][1]=e,this}}function pr(){if(k)return S;k=1;var t=or(),r=cr(),e=fr(),n=sr(),i=lr();function o(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=e,o.prototype.has=n,o.prototype.set=i,S=o}function hr(){if(A)return T;A=1;var t=pr();return T=function(){this.__data__=new t,this.size=0}}function vr(){if(N)return z;return N=1,z=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e}}function yr(){if(C)return R;return C=1,R=function(t){return this.__data__.get(t)}}function gr(){if(E)return D;return E=1,D=function(t){return this.__data__.has(t)}}function br(){if(I)return q;I=1;var t="object"==typeof nr&&nr&&nr.Object===Object&&nr;return q=t}function dr(){if($)return J;$=1;var t=br(),r="object"==typeof self&&self&&self.Object===Object&&self,e=t||r||Function("return this")();return J=e}function _r(){if(U)return G;U=1;var t=dr().Symbol;return G=t}function mr(){if(L)return B;L=1;var t=_r(),r=Object.prototype,e=r.hasOwnProperty,n=r.toString,i=t?t.toStringTag:void 0;return B=function(t){var r=e.call(t,i),o=t[i];try{t[i]=void 0;var u=!0}catch(t){}var a=n.call(t);return u&&(r?t[i]=o:delete t[i]),a}}function jr(){if(W)return M;W=1;var t=Object.prototype.toString;return M=function(r){return t.call(r)}}function Pr(){if(H)return V;H=1;var t=_r(),r=mr(),e=jr(),n=t?t.toStringTag:void 0;return V=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":n&&n in Object(t)?r(t):e(t)}}function wr(){if(Q)return K;return Q=1,K=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}}function Or(){if(Y)return X;Y=1;var t=Pr(),r=wr();return X=function(e){if(!r(e))return!1;var n=t(e);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}}function xr(){if(tt)return Z;tt=1;var t=dr()["__core-js_shared__"];return Z=t}function Fr(){if(et)return rt;et=1;var t,r=xr(),e=(t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return rt=function(t){return!!e&&e in t}}function Sr(){if(it)return nt;it=1;var t=Function.prototype.toString;return nt=function(r){if(null!=r){try{return t.call(r)}catch(t){}try{return r+""}catch(t){}}return""}}function kr(){if(ut)return ot;ut=1;var t=Or(),r=Fr(),e=wr(),n=Sr(),i=/^\[object .+?Constructor\]$/,o=Function.prototype,u=Object.prototype,a=o.toString,c=u.hasOwnProperty,f=RegExp("^"+a.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return ot=function(o){return!(!e(o)||r(o))&&(t(o)?f:i).test(n(o))}}function Tr(){if(ct)return at;return ct=1,at=function(t,r){return null==t?void 0:t[r]}}function Ar(){if(st)return ft;st=1;var t=kr(),r=Tr();return ft=function(e,n){var i=r(e,n);return t(i)?i:void 0}}function zr(){if(pt)return lt;pt=1;var t=Ar()(dr(),"Map");return lt=t}function Nr(){if(vt)return ht;vt=1;var t=Ar()(Object,"create");return ht=t}function Rr(){if(gt)return yt;gt=1;var t=Nr();return yt=function(){this.__data__=t?t(null):{},this.size=0}}function Cr(){if(dt)return bt;return dt=1,bt=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}}function Dr(){if(mt)return _t;mt=1;var t=Nr(),r=Object.prototype.hasOwnProperty;return _t=function(e){var n=this.__data__;if(t){var i=n[e];return"__lodash_hash_undefined__"===i?void 0:i}return r.call(n,e)?n[e]:void 0}}function Er(){if(Pt)return jt;Pt=1;var t=Nr(),r=Object.prototype.hasOwnProperty;return jt=function(e){var n=this.__data__;return t?void 0!==n[e]:r.call(n,e)}}function qr(){if(Ot)return wt;Ot=1;var t=Nr();return wt=function(r,e){var n=this.__data__;return this.size+=this.has(r)?0:1,n[r]=t&&void 0===e?"__lodash_hash_undefined__":e,this}}function Ir(){if(Ft)return xt;Ft=1;var t=Rr(),r=Cr(),e=Dr(),n=Er(),i=qr();function o(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=e,o.prototype.has=n,o.prototype.set=i,xt=o}function Jr(){if(kt)return St;kt=1;var t=Ir(),r=pr(),e=zr();return St=function(){this.size=0,this.__data__={hash:new t,map:new(e||r),string:new t}}}function $r(){if(At)return Tt;return At=1,Tt=function(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t}}function Gr(){if(Nt)return zt;Nt=1;var t=$r();return zt=function(r,e){var n=r.__data__;return t(e)?n["string"==typeof e?"string":"hash"]:n.map}}function Ur(){if(Ct)return Rt;Ct=1;var t=Gr();return Rt=function(r){var e=t(this,r).delete(r);return this.size-=e?1:0,e}}function Br(){if(Et)return Dt;Et=1;var t=Gr();return Dt=function(r){return t(this,r).get(r)}}function Lr(){if(It)return qt;It=1;var t=Gr();return qt=function(r){return t(this,r).has(r)}}function Mr(){if($t)return Jt;$t=1;var t=Gr();return Jt=function(r,e){var n=t(this,r),i=n.size;return n.set(r,e),this.size+=n.size==i?0:1,this}}function Wr(){if(Ut)return Gt;Ut=1;var t=Jr(),r=Ur(),e=Br(),n=Lr(),i=Mr();function o(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=e,o.prototype.has=n,o.prototype.set=i,Gt=o}function Vr(){if(Lt)return Bt;Lt=1;var t=pr(),r=zr(),e=Wr();return Bt=function(n,i){var o=this.__data__;if(o instanceof t){var u=o.__data__;if(!r||u.length<199)return u.push([n,i]),this.size=++o.size,this;o=this.__data__=new e(u)}return o.set(n,i),this.size=o.size,this}}function Hr(){if(Wt)return Mt;Wt=1;var t=pr(),r=hr(),e=vr(),n=yr(),i=gr(),o=Vr();function u(r){var e=this.__data__=new t(r);this.size=e.size}return u.prototype.clear=r,u.prototype.delete=e,u.prototype.get=n,u.prototype.has=i,u.prototype.set=o,Mt=u}function Kr(){if(Ht)return Vt;Ht=1;var t=Ar(),r=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch(t){}}();return Vt=r}function Qr(){if(Qt)return Kt;Qt=1;var t=Kr();return Kt=function(r,e,n){"__proto__"==e&&t?t(r,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):r[e]=n}}function Xr(){if(Yt)return Xt;Yt=1;var t=Qr(),r=ur();return Xt=function(e,n,i){(void 0!==i&&!r(e[n],i)||void 0===i&&!(n in e))&&t(e,n,i)}}function Yr(){if(tr)return Zt;return tr=1,Zt=function(t){return function(r,e,n){for(var i=-1,o=Object(r),u=n(r),a=u.length;a--;){var c=u[t?a:++i];if(!1===e(o[c],c,o))break}return r}}}function Zr(){if(er)return rr;er=1;var t=Yr()();return rr=t}var te,re,ee,ne,ie,oe,ue,ae,ce,fe,se,le,pe,he,ve,ye,ge,be,de,_e,me,je,Pe,we,Oe,xe,Fe,Se,ke,Te,Ae,ze,Ne,Re={exports:{}};function Ce(){return te||(te=1,function(t,r){var e=dr(),n=r&&!r.nodeType&&r,i=n&&t&&!t.nodeType&&t,o=i&&i.exports===n?e.Buffer:void 0,u=o?o.allocUnsafe:void 0;t.exports=function(t,r){if(r)return t.slice();var e=t.length,n=u?u(e):new t.constructor(e);return t.copy(n),n}}(Re,Re.exports)),Re.exports}function De(){if(ee)return re;ee=1;var t=dr().Uint8Array;return re=t}function Ee(){if(ie)return ne;ie=1;var t=De();return ne=function(r){var e=new r.constructor(r.byteLength);return new t(e).set(new t(r)),e}}function qe(){if(ue)return oe;ue=1;var t=Ee();return oe=function(r,e){var n=e?t(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.length)}}function Ie(){if(ce)return ae;return ce=1,ae=function(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r}}function Je(){if(se)return fe;se=1;var t=wr(),r=Object.create,e=function(){function e(){}return function(n){if(!t(n))return{};if(r)return r(n);e.prototype=n;var i=new e;return e.prototype=void 0,i}}();return fe=e}function $e(){if(pe)return le;return pe=1,le=function(t,r){return function(e){return t(r(e))}}}function Ge(){if(ve)return he;ve=1;var t=$e()(Object.getPrototypeOf,Object);return he=t}function Ue(){if(ge)return ye;ge=1;var t=Object.prototype;return ye=function(r){var e=r&&r.constructor;return r===("function"==typeof e&&e.prototype||t)}}function Be(){if(de)return be;de=1;var t=Je(),r=Ge(),e=Ue();return be=function(n){return"function"!=typeof n.constructor||e(n)?{}:t(r(n))}}function Le(){if(me)return _e;return me=1,_e=function(t){return null!=t&&"object"==typeof t}}function Me(){if(Pe)return je;Pe=1;var t=Pr(),r=Le();return je=function(e){return r(e)&&"[object Arguments]"==t(e)}}function We(){if(Oe)return we;Oe=1;var t=Me(),r=Le(),e=Object.prototype,n=e.hasOwnProperty,i=e.propertyIsEnumerable,o=t(function(){return arguments}())?t:function(t){return r(t)&&n.call(t,"callee")&&!i.call(t,"callee")};return we=o}function Ve(){if(Fe)return xe;Fe=1;var t=Array.isArray;return xe=t}function He(){if(ke)return Se;ke=1;return Se=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function Ke(){if(Ae)return Te;Ae=1;var t=Or(),r=He();return Te=function(e){return null!=e&&r(e.length)&&!t(e)}}function Qe(){if(Ne)return ze;Ne=1;var t=Ke(),r=Le();return ze=function(e){return r(e)&&t(e)}}var Xe,Ye,Ze,tn,rn,en,nn,on,un,an={exports:{}};function cn(){if(Ye)return Xe;return Ye=1,Xe=function(){return!1}}function fn(){return Ze||(Ze=1,function(t,r){var e=dr(),n=cn(),i=r&&!r.nodeType&&r,o=i&&t&&!t.nodeType&&t,u=o&&o.exports===i?e.Buffer:void 0,a=(u?u.isBuffer:void 0)||n;t.exports=a}(an,an.exports)),an.exports}function sn(){if(rn)return tn;rn=1;var t=Pr(),r=Ge(),e=Le(),n=Function.prototype,i=Object.prototype,o=n.toString,u=i.hasOwnProperty,a=o.call(Object);return tn=function(n){if(!e(n)||"[object Object]"!=t(n))return!1;var i=r(n);if(null===i)return!0;var c=u.call(i,"constructor")&&i.constructor;return"function"==typeof c&&c instanceof c&&o.call(c)==a}}function ln(){if(nn)return en;nn=1;var t=Pr(),r=He(),e=Le(),n={};return n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0,n["[object Arguments]"]=n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1,en=function(i){return e(i)&&r(i.length)&&!!n[t(i)]}}function pn(){if(un)return on;return un=1,on=function(t){return function(r){return t(r)}}}var hn,vn,yn,gn,bn,dn,_n,mn,jn,Pn,wn,On,xn,Fn,Sn,kn,Tn,An,zn,Nn,Rn,Cn,Dn,En,qn,In,Jn,$n,Gn,Un,Bn,Ln,Mn,Wn,Vn,Hn,Kn,Qn,Xn,Yn,Zn,ti,ri,ei,ni,ii,oi,ui,ai,ci={exports:{}};function fi(){return hn||(hn=1,function(t,r){var e=br(),n=r&&!r.nodeType&&r,i=n&&t&&!t.nodeType&&t,o=i&&i.exports===n&&e.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=u}(ci,ci.exports)),ci.exports}function si(){if(yn)return vn;yn=1;var t=ln(),r=pn(),e=fi(),n=e&&e.isTypedArray,i=n?r(n):t;return vn=i}function li(){if(bn)return gn;return bn=1,gn=function(t,r){if(("constructor"!==r||"function"!=typeof t[r])&&"__proto__"!=r)return t[r]}}function pi(){if(_n)return dn;_n=1;var t=Qr(),r=ur(),e=Object.prototype.hasOwnProperty;return dn=function(n,i,o){var u=n[i];e.call(n,i)&&r(u,o)&&(void 0!==o||i in n)||t(n,i,o)}}function hi(){if(jn)return mn;jn=1;var t=pi(),r=Qr();return mn=function(e,n,i,o){var u=!i;i||(i={});for(var a=-1,c=n.length;++a<c;){var f=n[a],s=o?o(i[f],e[f],f,i,e):void 0;void 0===s&&(s=e[f]),u?r(i,f,s):t(i,f,s)}return i}}function vi(){if(wn)return Pn;return wn=1,Pn=function(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n}}function yi(){if(xn)return On;xn=1;var t=/^(?:0|[1-9]\d*)$/;return On=function(r,e){var n=typeof r;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&t.test(r))&&r>-1&&r%1==0&&r<e}}function gi(){if(Sn)return Fn;Sn=1;var t=vi(),r=We(),e=Ve(),n=fn(),i=yi(),o=si(),u=Object.prototype.hasOwnProperty;return Fn=function(a,c){var f=e(a),s=!f&&r(a),l=!f&&!s&&n(a),p=!f&&!s&&!l&&o(a),h=f||s||l||p,v=h?t(a.length,String):[],y=v.length;for(var g in a)!c&&!u.call(a,g)||h&&("length"==g||l&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||i(g,y))||v.push(g);return v}}function bi(){if(Tn)return kn;return Tn=1,kn=function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}}function di(){if(zn)return An;zn=1;var t=wr(),r=Ue(),e=bi(),n=Object.prototype.hasOwnProperty;return An=function(i){if(!t(i))return e(i);var o=r(i),u=[];for(var a in i)("constructor"!=a||!o&&n.call(i,a))&&u.push(a);return u}}function _i(){if(Rn)return Nn;Rn=1;var t=gi(),r=di(),e=Ke();return Nn=function(n){return e(n)?t(n,!0):r(n)}}function mi(){if(Dn)return Cn;Dn=1;var t=hi(),r=_i();return Cn=function(e){return t(e,r(e))}}function ji(){if(qn)return En;qn=1;var t=Xr(),r=Ce(),e=qe(),n=Ie(),i=Be(),o=We(),u=Ve(),a=Qe(),c=fn(),f=Or(),s=wr(),l=sn(),p=si(),h=li(),v=mi();return En=function(y,g,b,d,_,m,j){var P=h(y,b),w=h(g,b),O=j.get(w);if(O)t(y,b,O);else{var x=m?m(P,w,b+"",y,g,j):void 0,F=void 0===x;if(F){var S=u(w),k=!S&&c(w),T=!S&&!k&&p(w);x=w,S||k||T?u(P)?x=P:a(P)?x=n(P):k?(F=!1,x=r(w,!0)):T?(F=!1,x=e(w,!0)):x=[]:l(w)||o(w)?(x=P,o(P)?x=v(P):s(P)&&!f(P)||(x=i(w))):F=!1}F&&(j.set(w,x),_(x,w,d,m,j),j.delete(w)),t(y,b,x)}}}function Pi(){if(Jn)return In;Jn=1;var t=Hr(),r=Xr(),e=Zr(),n=ji(),i=wr(),o=_i(),u=li();return In=function a(c,f,s,l,p){c!==f&&e(f,(function(e,o){if(p||(p=new t),i(e))n(c,f,o,s,a,l,p);else{var h=l?l(u(c,o),e,o+"",c,f,p):void 0;void 0===h&&(h=e),r(c,o,h)}}),o)},In}function wi(){if(Gn)return $n;return Gn=1,$n=function(t){return t}}function Oi(){if(Bn)return Un;return Bn=1,Un=function(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}}function xi(){if(Mn)return Ln;Mn=1;var t=Oi(),r=Math.max;return Ln=function(e,n,i){return n=r(void 0===n?e.length-1:n,0),function(){for(var o=arguments,u=-1,a=r(o.length-n,0),c=Array(a);++u<a;)c[u]=o[n+u];u=-1;for(var f=Array(n+1);++u<n;)f[u]=o[u];return f[n]=i(c),t(e,this,f)}},Ln}function Fi(){if(Vn)return Wn;return Vn=1,Wn=function(t){return function(){return t}}}function Si(){if(Kn)return Hn;Kn=1;var t=Fi(),r=Kr();return Hn=r?function(e,n){return r(e,"toString",{configurable:!0,enumerable:!1,value:t(n),writable:!0})}:wi()}function ki(){if(Xn)return Qn;Xn=1;var t=Date.now;return Qn=function(r){var e=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++e>=800)return arguments[0]}else e=0;return r.apply(void 0,arguments)}},Qn}function Ti(){if(Zn)return Yn;Zn=1;var t=Si(),r=ki()(t);return Yn=r}function Ai(){if(ri)return ti;ri=1;var t=wi(),r=xi(),e=Ti();return ti=function(n,i){return e(r(n,i,t),n+"")}}function zi(){if(ni)return ei;ni=1;var t=ur(),r=Ke(),e=yi(),n=wr();return ei=function(i,o,u){if(!n(u))return!1;var a=typeof o;return!!("number"==a?r(u)&&e(o,u.length):"string"==a&&o in u)&&t(u[o],i)}}function Ni(){if(oi)return ii;oi=1;var t=Ai(),r=zi();return ii=function(e){return t((function(t,n){var i=-1,o=n.length,u=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(u=e.length>3&&"function"==typeof u?(o--,u):void 0,a&&r(n[0],n[1],a)&&(u=o<3?void 0:u,o=1),t=Object(t);++i<o;){var c=n[i];c&&e(t,c,i,u)}return t}))}}function Ri(){if(ai)return ui;ai=1;var t=Pi(),r=Ni()((function(r,e,n){t(r,e,n)}));return ui=r}var Ci=ir(Ri());class Di{constructor(){}isJSONFilePath(t){return t.endsWith(".json")||t.endsWith(".json.template")}isTemplateFilePath(t){return t.endsWith(".template")}getRealTemplateFilePath(t){return t.replace(".template","")}readFile(t){return i.readFileSync(t,"utf-8")}readJSONFile(t){return JSON.parse(this.readFile(t))}writeFile(t,r){i.writeFileSync(this.getRealTemplateFilePath(t),r,{encoding:"utf-8"})}replaceFile(t,r){let e=this.readFile(t);return Object.keys(r).forEach((t=>{const n=r[t];e=e.replace(new RegExp(`\\[TPL:${t}\\]`,"g"),"string"==typeof n?n:JSON.stringify(n))})),e}mergeJSONFile(t,r){const e=this.readJSONFile(t),n=Ci(r,e);this.writeFile(t,JSON.stringify(n,null,2))}composeConfigFile(t,r,e){if(this.isTemplateFilePath(r)){const n=this.replaceFile(r,t);if(this.isJSONFilePath(r)&&this.isJSONFilePath(e)){const t=this.getRealTemplateFilePath(e);return i.existsSync(t)?(this.mergeJSONFile(t,JSON.parse(n)),!0):(this.writeFile(t,n),!0)}return this.writeFile(e,n),!0}return!1}}const Ei=["pack-app"];exports.Copyer=p,exports.Generator=class{ora;context;subPackages;copyer;compose;constructor(r){const o=r.options?.templateRootPath;if(!o)throw new Error("template path not exit");if(!i.existsSync(o))throw new Error("template path not exit");this.ora=n.oraPromise,this.context=new t.FeScriptContext(r),this.subPackages=["node-lib","react-app"],this.copyer=new p(e.join(this.context.options.configsRootPath,"_common")),this.compose=new Di}get logger(){return this.context.logger}async steps(t){try{return await r.prompt(t)}catch(t){throw this.logger.error(t),t}}async action({label:t,task:r}){let e=r();e instanceof Promise||(e=Promise.resolve(e));const n=t;return this.ora(e,n),e}isPackageTemplate(t){return Ei.includes(t)}async getGeneratorContext(){const t=a(this.subPackages,Ei),r=await this.steps(t);if(this.isPackageTemplate(r.template)){const t=c(this.subPackages),e=await this.steps(t);Object.assign(r,e)}return r.targetPath=e.join(process.cwd(),r.projectName),r.releasePath=r.releasePath||"src",r}async generate(){const t=await this.getGeneratorContext();this.logger.debug("context is:",t,this.context.options.templateRootPath),t.subPackages?await this.action({label:"Generate Directories(subPackages)",task:async()=>{await this.generateTemplateDir(t),await this.generateSubPackages(t),await this.generateConfigs(t,t.targetPath,"_common")}}):await this.action({label:"Generate Directory",task:async()=>{await this.generateTemplateDir(t),await this.generateConfigs(t,t.targetPath,"_common"),await this.generateConfigs(t,t.targetPath,t.template)}})}async generateConfigs(t,r,n){const{configsRootPath:i,config:o}=this.context.options;o?await this.copyer.copyPaths({sourcePath:e.join(i,n),targetPath:r,copyCallback:(r,e)=>(this.logger.debug("copyCallback",r,e),this.compose.composeConfigFile(t,r,e))}):this.logger.debug("no copy config files")}generateTemplateDir(t){return this.copyer.copyPaths({sourcePath:e.join(this.context.options.templateRootPath,t.template),targetPath:t.targetPath})}async generateSubPackages(t){const{packagesNames:r="packages",subPackages:n=[],targetPath:i=""}=t,{templateRootPath:o}=this.context.options;for(const t of n){const n=e.join(o,t),u=e.join(i,r,t);this.logger.debug("copy sub package",n,u),await this.copyer.copyPaths({sourcePath:n,targetPath:u})}}},exports.createDefaultPrompts=a,exports.createPackagePrompts=c,exports.validRequiredString=u;
1
+ #!/usr/bin/env node
2
+ "use strict";function e(e){return e&&e.__esModule?e:{default:e}}function t(e,t){return null!=e?e:t()}function s(e){let t,s=e[0],o=1;for(;o<e.length;){const r=e[o],n=e[o+1];if(o+=2,("optionalAccess"===r||"optionalCall"===r)&&null==s)return;"access"===r||"optionalAccess"===r?(t=s,s=n(s)):"call"!==r&&"optionalCall"!==r||(s=n(((...e)=>s.call(t,...e))),t=void 0)}return s}var o,r,n=Object.create,i=Object.defineProperty,u=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,l=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty,h=(e=>"undefined"!=typeof require?require:"undefined"!=typeof Proxy?new Proxy(e,{get:(e,t)=>("undefined"!=typeof require?require:e)[t]}):e)((function(e){if("undefined"!=typeof require)return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')})),d=(e,t)=>function(){return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports},c=(e,t,s)=>(s=null!=e?n(l(e)):{},((e,t,s,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of a(t))D.call(e,r)||r===s||i(e,r,{get:()=>t[r],enumerable:!(o=u(t,r))||o.enumerable});return e})(!t&&e&&e.__esModule?s:i(s,"default",{value:e,enumerable:!0}),e)),p=d({"../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/error.js"(e){var t=class extends Error{constructor(e,t,s){super(s),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}};e.CommanderError=t,e.InvalidArgumentError=class extends t{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}}}),m=d({"../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/argument.js"(e){var{InvalidArgumentError:t}=p();e.Argument=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.length>3&&"..."===this._name.slice(-3)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,s)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,s):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}},e.humanReadableArgName=function(e){const t=e.name()+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"}}}),_=d({"../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/help.js"(e){var{humanReadableArgName:s}=m();function o(e){return e.replace(/\x1b\[\d*(;\d*)*m/g,"")}e.Help=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=t(t(this.helpWidth,(()=>e.helpWidth)),(()=>80))}visibleCommands(e){const t=e.commands.filter((e=>!e._hidden)),s=e._getHelpCommand();return s&&!s._hidden&&t.push(s),this.sortSubcommands&&t.sort(((e,t)=>e.name().localeCompare(t.name()))),t}compareOptions(e,t){const s=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return s(e).localeCompare(s(t))}visibleOptions(e){const t=e.options.filter((e=>!e.hidden)),s=e._getHelpOption();if(s&&!s.hidden){const o=s.short&&e._findOption(s.short),r=s.long&&e._findOption(s.long);o||r?s.long&&!r?t.push(e.createOption(s.long,s.description)):s.short&&!o&&t.push(e.createOption(s.short,s.description)):t.push(s)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const t=[];for(let s=e.parent;s;s=s.parent){const e=s.options.filter((e=>!e.hidden));t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach((t=>{t.description=t.description||e._argsDescription[t.name()]||""})),e.registeredArguments.find((e=>e.description))?e.registeredArguments:[]}subcommandTerm(e){const t=e.registeredArguments.map((e=>s(e))).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce(((e,s)=>Math.max(e,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(s))))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce(((e,s)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(s))))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce(((e,s)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(s))))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce(((e,s)=>Math.max(e,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(s))))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let s="";for(let t=e.parent;t;t=t.parent)s=t.name()+" "+s;return s+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue){(e.required||e.optional||e.isBoolean()&&"boolean"==typeof e.defaultValue)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}return void 0!==e.presetArg&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),void 0!==e.envVar&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){const s=`(${t.join(", ")})`;return e.description?`${e.description} ${s}`:s}return e.description}formatHelp(e,s){const o=s.padWidth(e,s),r=t(s.helpWidth,(()=>80));function n(e,t){return s.formatItem(e,o,t,s)}let i=[`${s.styleTitle("Usage:")} ${s.styleUsage(s.commandUsage(e))}`,""];const u=s.commandDescription(e);u.length>0&&(i=i.concat([s.boxWrap(s.styleCommandDescription(u),r),""]));const a=s.visibleArguments(e).map((e=>n(s.styleArgumentTerm(s.argumentTerm(e)),s.styleArgumentDescription(s.argumentDescription(e)))));a.length>0&&(i=i.concat([s.styleTitle("Arguments:"),...a,""]));const l=s.visibleOptions(e).map((e=>n(s.styleOptionTerm(s.optionTerm(e)),s.styleOptionDescription(s.optionDescription(e)))));if(l.length>0&&(i=i.concat([s.styleTitle("Options:"),...l,""])),s.showGlobalOptions){const t=s.visibleGlobalOptions(e).map((e=>n(s.styleOptionTerm(s.optionTerm(e)),s.styleOptionDescription(s.optionDescription(e)))));t.length>0&&(i=i.concat([s.styleTitle("Global Options:"),...t,""]))}const D=s.visibleCommands(e).map((e=>n(s.styleSubcommandTerm(s.subcommandTerm(e)),s.styleSubcommandDescription(s.subcommandDescription(e)))));return D.length>0&&(i=i.concat([s.styleTitle("Commands:"),...D,""])),i.join("\n")}displayWidth(e){return o(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map((e=>"[options]"===e?this.styleOptionText(e):"[command]"===e?this.styleSubcommandText(e):"["===e[0]||"<"===e[0]?this.styleArgumentText(e):this.styleCommandText(e))).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map((e=>"[options]"===e?this.styleOptionText(e):"["===e[0]||"<"===e[0]?this.styleArgumentText(e):this.styleSubcommandText(e))).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,s,o,r){const n=" ".repeat(2);if(!o)return n+e;const i=e.padEnd(s+e.length-r.displayWidth(e)),u=t(this.helpWidth,(()=>80))-s-2-2;let a;if(u<this.minWidthToWrap||r.preformatted(o))a=o;else{a=r.boxWrap(o,u).replace(/\n/g,"\n"+" ".repeat(s+2))}return n+i+" ".repeat(2)+a.replace(/\n/g,`\n${n}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;const s=e.split(/\r\n|\n/),o=/[\s]*[^\s]+/g,r=[];return s.forEach((e=>{const s=e.match(o);if(null===s)return void r.push("");let n=[s.shift()],i=this.displayWidth(n[0]);s.forEach((e=>{const s=this.displayWidth(e);if(i+s<=t)return n.push(e),void(i+=s);r.push(n.join(""));const o=e.trimStart();n=[o],i=this.displayWidth(o)})),r.push(n.join(""))})),r.join("\n")}},e.stripColor=o}}),f=d({"../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/option.js"(e){var{InvalidArgumentError:t}=p();function s(e){return e.split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}e.Option=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;const s=function(e){let t,s;const o=/^-[^-]$/,r=/^--[^-]/,n=e.split(/[ |,]+/).concat("guard");o.test(n[0])&&(t=n.shift());r.test(n[0])&&(s=n.shift());!t&&o.test(n[0])&&(t=n.shift());!t&&r.test(n[0])&&(t=s,s=n.shift());if(n[0].startsWith("-")){const t=n[0],s=`option creation failed due to '${t}' in option flags '${e}'`;if(/^-[^-][^-]/.test(t))throw new Error(`${s}\n- a short flag is a single dash and a single character\n - either use a single dash and a single character (for a short flag)\n - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(o.test(t))throw new Error(`${s}\n- too many short flags`);if(r.test(t))throw new Error(`${s}\n- too many long flags`);throw new Error(`${s}\n- unrecognised flag format`)}if(void 0===t&&void 0===s)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:s}}(e);this.short=s.shortFlag,this.long=s.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return"string"==typeof e&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,s)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,s):e},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?s(this.name().replace(/^no-/,"")):s(this.name())}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},e.DualOptions=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach((e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)})),this.negativeOptions.forEach(((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)}))}valueFromOption(e,t){const s=t.attributeName();if(!this.dualOptions.has(s))return!0;const o=this.negativeOptions.get(s).presetArg,r=void 0!==o&&o;return t.negate===(r===e)}}}}),F=d({"../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/suggestSimilar.js"(e){e.suggestSimilar=function(e,t){if(!t||0===t.length)return"";t=Array.from(new Set(t));const s=e.startsWith("--");s&&(e=e.slice(2),t=t.map((e=>e.slice(2))));let o=[],r=3;return t.forEach((t=>{if(t.length<=1)return;const s=function(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);const s=[];for(let t=0;t<=e.length;t++)s[t]=[t];for(let e=0;e<=t.length;e++)s[0][e]=e;for(let o=1;o<=t.length;o++)for(let r=1;r<=e.length;r++){let n=1;n=e[r-1]===t[o-1]?0:1,s[r][o]=Math.min(s[r-1][o]+1,s[r][o-1]+1,s[r-1][o-1]+n),r>1&&o>1&&e[r-1]===t[o-2]&&e[r-2]===t[o-1]&&(s[r][o]=Math.min(s[r][o],s[r-2][o-2]+1))}return s[e.length][t.length]}(e,t),n=Math.max(e.length,t.length);(n-s)/n>.4&&(s<r?(r=s,o=[t]):s===r&&o.push(t))})),o.sort(((e,t)=>e.localeCompare(t))),s&&(o=o.map((e=>`--${e}`))),o.length>1?`\n(Did you mean one of ${o.join(", ")}?)`:1===o.length?`\n(Did you mean ${o[0]}?)`:""}}}),g=d({"../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/command.js"(e){var o=h("events").EventEmitter,r=h("child_process"),n=h("path"),i=h("fs"),u=h("process"),{Argument:a,humanReadableArgName:l}=m(),{CommanderError:D}=p(),{Help:d,stripColor:c}=_(),{Option:g,DualOptions:C}=f(),{suggestSimilar:E}=F();function v(e){return e.map((e=>{if(!e.startsWith("--inspect"))return e;let t,s,o="127.0.0.1",r="9229";return null!==(s=e.match(/^(--inspect(-brk)?)$/))?t=s[1]:null!==(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(t=s[1],/^\d+$/.test(s[3])?r=s[3]:o=s[3]):null!==(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(t=s[1],o=s[3],r=s[4]),t&&"0"!==r?`${t}=${o}:${parseInt(r)+1}`:e}))}function b(){return!u.env.NO_COLOR&&"0"!==u.env.FORCE_COLOR&&"false"!==u.env.FORCE_COLOR&&(!(!u.env.FORCE_COLOR&&void 0===u.env.CLICOLOR_FORCE)||void 0)}e.Command=class e extends o{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:e=>u.stdout.write(e),writeErr:e=>u.stderr.write(e),outputError:(e,t)=>t(e),getOutHelpWidth:()=>u.stdout.isTTY?u.stdout.columns:void 0,getErrHelpWidth:()=>u.stderr.isTTY?u.stderr.columns:void 0,getOutHasColors:()=>t(b(),(()=>u.stdout.isTTY&&s([u,"access",e=>e.stdout,"access",e=>e.hasColors,"optionalCall",e=>e()]))),getErrHasColors:()=>t(b(),(()=>u.stderr.isTTY&&s([u,"access",e=>e.stderr,"access",e=>e.hasColors,"optionalCall",e=>e()]))),stripColor:e=>c(e)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){const e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,s){let o=t,r=s;"object"==typeof o&&null!==o&&(r=o,o=null),r=r||{};const[,n,i]=e.match(/([^ ]+) *(.*)/),u=this.createCommand(n);return o&&(u.description(o),u._executableHandler=!0),r.isDefault&&(this._defaultCommandName=u._name),u._hidden=!(!r.noHelp&&!r.hidden),u._executableFile=r.executableFile||null,i&&u.arguments(i),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),o?this:u}createCommand(t){return new e(t)}createHelp(){return Object.assign(new d,this.configureHelp())}configureHelp(e){return void 0===e?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return void 0===e?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return"string"!=typeof e&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()");return(t=t||{}).isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new a(e,t)}argument(e,t,s,o){const r=this.createArgument(e,t);return"function"==typeof s?r.default(o).argParser(s):r.default(s),this.addArgument(r),this}arguments(e){return e.trim().split(/ +/).forEach((e=>{this.argument(e)})),this}addArgument(e){const t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&void 0!==e.defaultValue&&void 0===e.parseArg)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,s){if("boolean"==typeof e)return this._addImplicitHelpCommand=e,this;e=t(e,(()=>"help [command]"));const[,o,r]=e.match(/([^ ]+) *(.*)/),n=t(s,(()=>"display help for command")),i=this.createCommand(o);return i.helpOption(!1),r&&i.arguments(r),n&&i.description(n),this._addImplicitHelpCommand=!0,this._helpCommand=i,this}addHelpCommand(e,t){return"object"!=typeof e?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return t(this._addImplicitHelpCommand,(()=>this.commands.length&&!this._actionHandler&&!this._findCommand("help")))?(void 0===this._helpCommand&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){const s=["preSubcommand","preAction","postAction"];if(!s.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${s.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return this._exitCallback=e||(e=>{if("commander.executeSubCommandAsync"!==e.code)throw e}),this}_exit(e,t,s){this._exitCallback&&this._exitCallback(new D(e,t,s)),u.exit(e)}action(e){return this._actionHandler=t=>{const s=this.registeredArguments.length,o=t.slice(0,s);return this._storeOptionsAsProperties?o[s]=this:o[s]=this.opts(),o.push(this),e.apply(this,o)},this}createOption(e,t){return new g(e,t)}_callParseArg(e,t,s,o){try{return e.parseArg(t,s)}catch(e){if("commander.invalidArgument"===e.code){const t=`${o} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){const t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){const s=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${s}'\n- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){const t=e=>[e.name()].concat(e.aliases()),s=t(e).find((e=>this._findCommand(e)));if(s){const o=t(this._findCommand(s)).join("|"),r=t(e).join("|");throw new Error(`cannot add command '${r}' as already have command '${o}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);const t=e.name(),s=e.attributeName();if(e.negate){const t=e.long.replace(/^--no-/,"--");this._findOption(t)||this.setOptionValueWithSource(s,void 0===e.defaultValue||e.defaultValue,"default")}else void 0!==e.defaultValue&&this.setOptionValueWithSource(s,e.defaultValue,"default");const o=(t,o,r)=>{null==t&&void 0!==e.presetArg&&(t=e.presetArg);const n=this.getOptionValue(s);null!==t&&e.parseArg?t=this._callParseArg(e,t,n,o):null!==t&&e.variadic&&(t=e._concatValue(t,n)),null==t&&(t=!e.negate&&(!(!e.isBoolean()&&!e.optional)||"")),this.setOptionValueWithSource(s,t,r)};return this.on("option:"+t,(t=>{const s=`error: option '${e.flags}' argument '${t}' is invalid.`;o(t,s,"cli")})),e.envVar&&this.on("optionEnv:"+t,(t=>{const s=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;o(t,s,"env")})),this}_optionEx(e,t,s,o,r){if("object"==typeof t&&t instanceof g)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const n=this.createOption(t,s);if(n.makeOptionMandatory(!!e.mandatory),"function"==typeof o)n.default(r).argParser(o);else if(o instanceof RegExp){const e=o;o=(t,s)=>{const o=e.exec(t);return o?o[0]:s},n.default(r).argParser(o)}else n.default(o);return this.addOption(n)}option(e,t,s,o){return this._optionEx({},e,t,s,o)}requiredOption(e,t,s,o){return this._optionEx({mandatory:!0},e,t,s,o)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,s){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=s,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach((s=>{void 0!==s.getOptionValueSource(e)&&(t=s.getOptionValueSource(e))})),t}_prepareUserArgs(e,o){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(o=o||{},void 0===e&&void 0===o.from){s([u,"access",e=>e.versions,"optionalAccess",e=>e.electron])&&(o.from="electron");const e=t(u.execArgv,(()=>[]));(e.includes("-e")||e.includes("--eval")||e.includes("-p")||e.includes("--print"))&&(o.from="eval")}let r;switch(void 0===e&&(e=u.argv),this.rawArgs=e.slice(),o.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":u.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${o.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,t){this._prepareForParse();const s=this._prepareUserArgs(e,t);return this._parseCommand([],s),this}async parseAsync(e,t){this._prepareForParse();const s=this._prepareUserArgs(e,t);return await this._parseCommand([],s),this}_prepareForParse(){null===this._savedState?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error("Can not call parse again when storeOptionsAsProperties is true.\n- either make a new Command for each call to parse, or stop storing options as properties");this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,s){if(i.existsSync(e))return;throw new Error(`'${e}' does not exist\n - if '${s}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory"}`)}_executeSubCommand(e,s){s=s.slice();let o=!1;const a=[".js",".ts",".tsx",".mjs",".cjs"];function l(e,t){const s=n.resolve(e,t);if(i.existsSync(s))return s;if(a.includes(n.extname(t)))return;const o=a.find((e=>i.existsSync(`${s}${e}`)));return o?`${s}${o}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let h,d=e._executableFile||`${this._name}-${e._name}`,c=this._executableDir||"";if(this._scriptPath){let e;try{e=i.realpathSync(this._scriptPath)}catch(t){e=this._scriptPath}c=n.resolve(n.dirname(e),c)}if(c){let t=l(c,d);if(!t&&!e._executableFile&&this._scriptPath){const s=n.basename(this._scriptPath,n.extname(this._scriptPath));s!==this._name&&(t=l(c,`${s}-${e._name}`))}d=t||d}if(o=a.includes(n.extname(d)),"win32"!==u.platform?o?(s.unshift(d),s=v(u.execArgv).concat(s),h=r.spawn(u.argv[0],s,{stdio:"inherit"})):h=r.spawn(d,s,{stdio:"inherit"}):(this._checkForMissingExecutable(d,c,e._name),s.unshift(d),s=v(u.execArgv).concat(s),h=r.spawn(u.execPath,s,{stdio:"inherit"})),!h.killed){["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((e=>{u.on(e,(()=>{!1===h.killed&&null===h.exitCode&&h.kill(e)}))}))}const p=this._exitCallback;h.on("close",(e=>{e=t(e,(()=>1)),p?p(new D(e,"commander.executeSubCommandAsync","(close)")):u.exit(e)})),h.on("error",(t=>{if("ENOENT"===t.code)this._checkForMissingExecutable(d,c,e._name);else if("EACCES"===t.code)throw new Error(`'${d}' not executable`);if(p){const e=new D(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,p(e)}else u.exit(1)})),this.runningCommand=h}_dispatchSubcommand(e,t,s){const o=this._findCommand(e);let r;return o||this.help({error:!0}),o._prepareForParse(),r=this._chainOrCallSubCommandHook(r,o,"preSubcommand"),r=this._chainOrCall(r,(()=>{if(!o._executableHandler)return o._parseCommand(t,s);this._executeSubCommand(o,t.concat(s))})),r}_dispatchHelpCommand(e){e||this.help();const o=this._findCommand(e);return o&&!o._executableHandler&&o.help(),this._dispatchSubcommand(e,[],[t(t(s([this,"access",e=>e._getHelpOption,"call",e=>e(),"optionalAccess",e=>e.long]),(()=>s([this,"access",e=>e._getHelpOption,"call",e=>e(),"optionalAccess",e=>e.short]))),(()=>"--help"))])}_checkNumberOfArguments(){this.registeredArguments.forEach(((e,t)=>{e.required&&null==this.args[t]&&this.missingArgument(e.name())})),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic||this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){const e=(e,t,s)=>{let o=t;if(null!==t&&e.parseArg){const r=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;o=this._callParseArg(e,t,s,r)}return o};this._checkNumberOfArguments();const t=[];this.registeredArguments.forEach(((s,o)=>{let r=s.defaultValue;s.variadic?o<this.args.length?(r=this.args.slice(o),s.parseArg&&(r=r.reduce(((t,o)=>e(s,o,t)),s.defaultValue))):void 0===r&&(r=[]):o<this.args.length&&(r=this.args[o],s.parseArg&&(r=e(s,r,s.defaultValue))),t[o]=r})),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&"function"==typeof e.then?e.then((()=>t())):t()}_chainOrCallHooks(e,t){let s=e;const o=[];return this._getCommandAndAncestors().reverse().filter((e=>void 0!==e._lifeCycleHooks[t])).forEach((e=>{e._lifeCycleHooks[t].forEach((t=>{o.push({hookedCommand:e,callback:t})}))})),"postAction"===t&&o.reverse(),o.forEach((e=>{s=this._chainOrCall(s,(()=>e.callback(e.hookedCommand,this)))})),s}_chainOrCallSubCommandHook(e,t,s){let o=e;return void 0!==this._lifeCycleHooks[s]&&this._lifeCycleHooks[s].forEach((e=>{o=this._chainOrCall(o,(()=>e(this,t)))})),o}_parseCommand(e,t){const s=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(s.operands),t=s.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),this._outputHelpIfRequested(s.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const o=()=>{s.unknown.length>0&&this.unknownOption(s.unknown[0])},r=`command:${this.name()}`;if(this._actionHandler){let s;return o(),this._processArguments(),s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,(()=>this._actionHandler(this.processedArgs))),this.parent&&(s=this._chainOrCall(s,(()=>{this.parent.emit(r,e,t)}))),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent&&this.parent.listenerCount(r))o(),this._processArguments(),this.parent.emit(r,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(o(),this._processArguments())}else this.commands.length?(o(),this.help({error:!0})):(o(),this._processArguments())}_findCommand(e){if(e)return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((e=>{e.options.forEach((t=>{t.mandatory&&void 0===e.getOptionValue(t.attributeName())&&e.missingMandatoryOptionValue(t)}))}))}_checkForConflictingLocalOptions(){const e=this.options.filter((e=>{const t=e.attributeName();return void 0!==this.getOptionValue(t)&&"default"!==this.getOptionValueSource(t)}));e.filter((e=>e.conflictsWith.length>0)).forEach((t=>{const s=e.find((e=>t.conflictsWith.includes(e.attributeName())));s&&this._conflictingOption(t,s)}))}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((e=>{e._checkForConflictingLocalOptions()}))}parseOptions(e){const t=[],s=[];let o=t;const r=e.slice();function n(e){return e.length>1&&"-"===e[0]}let i=null;for(;r.length;){const e=r.shift();if("--"===e){o===s&&o.push(e),o.push(...r);break}if(!i||n(e)){if(i=null,n(e)){const t=this._findOption(e);if(t){if(t.required){const e=r.shift();void 0===e&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;r.length>0&&!n(r[0])&&(e=r.shift()),this.emit(`option:${t.name()}`,e)}else this.emit(`option:${t.name()}`);i=t.variadic?t:null;continue}}if(e.length>2&&"-"===e[0]&&"-"!==e[1]){const t=this._findOption(`-${e[1]}`);if(t){t.required||t.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${t.name()}`,e.slice(2)):(this.emit(`option:${t.name()}`),r.unshift(`-${e.slice(2)}`));continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("="),s=this._findOption(e.slice(0,t));if(s&&(s.required||s.optional)){this.emit(`option:${s.name()}`,e.slice(t+1));continue}}if(n(e)&&(o=s),(this._enablePositionalOptions||this._passThroughOptions)&&0===t.length&&0===s.length){if(this._findCommand(e)){t.push(e),r.length>0&&s.push(...r);break}if(this._getHelpCommand()&&e===this._getHelpCommand().name()){t.push(e),r.length>0&&t.push(...r);break}if(this._defaultCommandName){s.push(e),r.length>0&&s.push(...r);break}}if(this._passThroughOptions){o.push(e),r.length>0&&o.push(...r);break}o.push(e)}else this.emit(`option:${i.name()}`,e)}return{operands:t,unknown:s}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let s=0;s<t;s++){const t=this.options[s].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(((e,t)=>Object.assign(e,t.opts())),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));const s=t||{},o=s.exitCode||1,r=s.code||"commander.error";this._exit(o,r,e)}_parseOptionsEnv(){this.options.forEach((e=>{if(e.envVar&&e.envVar in u.env){const t=e.attributeName();(void 0===this.getOptionValue(t)||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,u.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}}))}_parseOptionsImplied(){const e=new C(this.options),t=e=>void 0!==this.getOptionValue(e)&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter((s=>void 0!==s.implied&&t(s.attributeName())&&e.valueFromOption(this.getOptionValue(s.attributeName()),s))).forEach((e=>{Object.keys(e.implied).filter((e=>!t(e))).forEach((t=>{this.setOptionValueWithSource(t,e.implied[t],"implied")}))}))}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const s=e=>{const t=e.attributeName(),s=this.getOptionValue(t),o=this.options.find((e=>e.negate&&t===e.attributeName())),r=this.options.find((e=>!e.negate&&t===e.attributeName()));return o&&(void 0===o.presetArg&&!1===s||void 0!==o.presetArg&&s===o.presetArg)?o:r||e},o=e=>{const t=s(e),o=t.attributeName();return"env"===this.getOptionValueSource(o)?`environment variable '${t.envVar}'`:`option '${t.flags}'`},r=`error: ${o(e)} cannot be used with ${o(t)}`;this.error(r,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let s=[],o=this;do{const e=o.createHelp().visibleOptions(o).filter((e=>e.long)).map((e=>e.long));s=s.concat(e),o=o.parent}while(o&&!o._enablePositionalOptions);t=E(e,s)}const s=`error: unknown option '${e}'${t}`;this.error(s,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this.registeredArguments.length,s=1===t?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${s} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const s=[];this.createHelp().visibleCommands(this).forEach((e=>{s.push(e.name()),e.alias()&&s.push(e.alias())})),t=E(e,s)}const s=`error: unknown command '${e}'${t}`;this.error(s,{code:"commander.unknownCommand"})}version(e,t,s){if(void 0===e)return this._version;this._version=e,t=t||"-V, --version",s=s||"output the version number";const o=this.createOption(t,s);return this._versionOptionName=o.attributeName(),this._registerOption(o),this.on("option:"+o.name(),(()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,"commander.version",e)})),this}description(e,t){return void 0===e&&void 0===t?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return void 0===e?this._summary:(this._summary=e,this)}alias(e){if(void 0===e)return this._aliases[0];let t=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");const o=s([this,"access",e=>e.parent,"optionalAccess",e=>e._findCommand,"call",t=>t(e)]);if(o){const t=[o.name()].concat(o.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}return t._aliases.push(e),this}aliases(e){return void 0===e?this._aliases:(e.forEach((e=>this.alias(e))),this)}usage(e){if(void 0===e){if(this._usage)return this._usage;const e=this.registeredArguments.map((e=>l(e)));return[].concat(this.options.length||null!==this._helpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?e:[]).join(" ")}return this._usage=e,this}name(e){return void 0===e?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=n.basename(e,n.extname(e)),this}executableDir(e){return void 0===e?this._executableDir:(this._executableDir=e,this)}helpInformation(e){const t=this.createHelp(),s=this._getOutputContext(e);t.prepareContext({error:s.error,helpWidth:s.helpWidth,outputHasColors:s.hasColors});const o=t.formatHelp(this,t);return s.hasColors?o:this._outputConfiguration.stripColor(o)}_getOutputContext(e){const t=!!(e=e||{}).error;let s,o,r;t?(s=e=>this._outputConfiguration.writeErr(e),o=this._outputConfiguration.getErrHasColors(),r=this._outputConfiguration.getErrHelpWidth()):(s=e=>this._outputConfiguration.writeOut(e),o=this._outputConfiguration.getOutHasColors(),r=this._outputConfiguration.getOutHelpWidth());return{error:t,write:e=>(o||(e=this._outputConfiguration.stripColor(e)),s(e)),hasColors:o,helpWidth:r}}outputHelp(e){let t;"function"==typeof e&&(t=e,e=void 0);const o=this._getOutputContext(e),r={error:o.error,write:o.write,command:this};this._getCommandAndAncestors().reverse().forEach((e=>e.emit("beforeAllHelp",r))),this.emit("beforeHelp",r);let n=this.helpInformation({error:o.error});if(t&&(n=t(n),"string"!=typeof n&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");o.write(n),s([this,"access",e=>e._getHelpOption,"call",e=>e(),"optionalAccess",e=>e.long])&&this.emit(this._getHelpOption().long),this.emit("afterHelp",r),this._getCommandAndAncestors().forEach((e=>e.emit("afterAllHelp",r)))}helpOption(e,s){return"boolean"==typeof e?(this._helpOption=e?t(this._helpOption,(()=>{})):null,this):(e=t(e,(()=>"-h, --help")),s=t(s,(()=>"display help for command")),this._helpOption=this.createOption(e,s),this)}_getHelpOption(){return void 0===this._helpOption&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let s=Number(t(u.exitCode,(()=>0)));0===s&&e&&"function"!=typeof e&&e.error&&(s=1),this._exit(s,"commander.help","(outputHelp)")}addHelpText(e,t){const s=["beforeAll","before","after","afterAll"];if(!s.includes(e))throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${s.join("', '")}'`);const o=`${e}Help`;return this.on(o,(e=>{let s;s="function"==typeof t?t({error:e.error,command:e.command}):t,s&&e.write(`${s}\n`)})),this}_outputHelpIfRequested(e){const t=this._getHelpOption();t&&e.find((e=>t.is(e)))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}},e.useColor=b}}),C=d({"../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/index.js"(e){var{Argument:t}=m(),{Command:s}=g(),{CommanderError:o,InvalidArgumentError:r}=p(),{Help:n}=_(),{Option:i}=f();e.program=new s,e.createCommand=e=>new s(e),e.createOption=(e,t)=>new i(e,t),e.createArgument=(e,s)=>new t(e,s),e.Command=s,e.Option=i,e.Argument=t,e.Help=n,e.CommanderError=o,e.InvalidArgumentError=r,e.InvalidOptionArgumentError=r}}),E=d({"../../node_modules/.pnpm/cli-spinners@2.9.2/node_modules/cli-spinners/spinners.json"(e,t){t.exports={dots:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},dots2:{interval:80,frames:["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},dots3:{interval:80,frames:["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},dots4:{interval:80,frames:["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},dots5:{interval:80,frames:["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},dots6:{interval:80,frames:["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},dots7:{interval:80,frames:["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},dots8:{interval:80,frames:["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},dots9:{interval:80,frames:["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},dots10:{interval:80,frames:["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},dots11:{interval:100,frames:["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},dots12:{interval:80,frames:["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},dots13:{interval:80,frames:["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},dots8Bit:{interval:80,frames:["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},sand:{interval:80,frames:["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["⠂","-","–","—","–","-"]},pipe:{interval:100,frames:["┤","┘","┴","└","├","┌","┬","┐"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["✶","✸","✹","✺","✹","✷"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","´","-","_","_","_"]},hamburger:{interval:100,frames:["☱","☲","☴"]},growVertical:{interval:120,frames:["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},growHorizontal:{interval:120,frames:["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","°","O","o","."]},noise:{interval:100,frames:["▓","▒","░"]},bounce:{interval:120,frames:["⠁","⠂","⠄","⠂"]},boxBounce:{interval:120,frames:["▖","▘","▝","▗"]},boxBounce2:{interval:100,frames:["▌","▀","▐","▄"]},triangle:{interval:50,frames:["◢","◣","◤","◥"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["◜","◠","◝","◞","◡","◟"]},circle:{interval:120,frames:["◡","⊙","◠"]},squareCorners:{interval:180,frames:["◰","◳","◲","◱"]},circleQuarters:{interval:120,frames:["◴","◷","◶","◵"]},circleHalves:{interval:50,frames:["◐","◓","◑","◒"]},squish:{interval:100,frames:["╫","╪"]},toggle:{interval:250,frames:["⊶","⊷"]},toggle2:{interval:80,frames:["▫","▪"]},toggle3:{interval:120,frames:["□","■"]},toggle4:{interval:100,frames:["■","□","▪","▫"]},toggle5:{interval:100,frames:["▮","▯"]},toggle6:{interval:300,frames:["ဝ","၀"]},toggle7:{interval:80,frames:["⦾","⦿"]},toggle8:{interval:100,frames:["◍","◌"]},toggle9:{interval:100,frames:["◉","◎"]},toggle10:{interval:100,frames:["㊂","㊀","㊁"]},toggle11:{interval:50,frames:["⧇","⧆"]},toggle12:{interval:120,frames:["☗","☖"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["←","↖","↑","↗","→","↘","↓","↙"]},arrow2:{interval:80,frames:["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},arrow3:{interval:120,frames:["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},smiley:{interval:200,frames:["😄 ","😝 "]},monkey:{interval:300,frames:["🙈 ","🙈 ","🙉 ","🙊 "]},hearts:{interval:100,frames:["💛 ","💙 ","💜 ","💚 ","❤️ "]},clock:{interval:100,frames:["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},earth:{interval:180,frames:["🌍 ","🌎 ","🌏 "]},material:{interval:17,frames:["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},moon:{interval:80,frames:["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},runner:{interval:140,frames:["🚶 ","🏃 "]},pong:{interval:80,frames:["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},shark:{interval:120,frames:["▐|\\____________▌","▐_|\\___________▌","▐__|\\__________▌","▐___|\\_________▌","▐____|\\________▌","▐_____|\\_______▌","▐______|\\______▌","▐_______|\\_____▌","▐________|\\____▌","▐_________|\\___▌","▐__________|\\__▌","▐___________|\\_▌","▐____________|\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},christmas:{interval:400,frames:["🌲","🎄"]},grenade:{interval:80,frames:["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},point:{interval:125,frames:["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},layer:{interval:150,frames:["-","=","≡"]},betaWave:{interval:80,frames:["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},fingerDance:{interval:160,frames:["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},fistBump:{interval:80,frames:["🤜    🤛 ","🤜    🤛 ","🤜    🤛 "," 🤜  🤛  ","  🤜🤛   "," 🤜✨🤛   ","🤜 ✨ 🤛  "]},soccerHeader:{interval:80,frames:[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},mindblown:{interval:160,frames:["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ ","  ","  ","  "]},speaker:{interval:160,frames:["🔈 ","🔉 ","🔊 ","🔉 "]},orangePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},bluePulse:{interval:100,frames:["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},orangeBluePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},timeTravel:{interval:100,frames:["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},aesthetic:{interval:80,frames:["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},dwarfFortress:{interval:80,frames:[" ██████£££ ","☺██████£££ ","☺██████£££ ","☺▓█████£££ ","☺▓█████£££ ","☺▒█████£££ ","☺▒█████£££ ","☺░█████£££ ","☺░█████£££ ","☺ █████£££ "," ☺█████£££ "," ☺█████£££ "," ☺▓████£££ "," ☺▓████£££ "," ☺▒████£££ "," ☺▒████£££ "," ☺░████£££ "," ☺░████£££ "," ☺ ████£££ "," ☺████£££ "," ☺████£££ "," ☺▓███£££ "," ☺▓███£££ "," ☺▒███£££ "," ☺▒███£££ "," ☺░███£££ "," ☺░███£££ "," ☺ ███£££ "," ☺███£££ "," ☺███£££ "," ☺▓██£££ "," ☺▓██£££ "," ☺▒██£££ "," ☺▒██£££ "," ☺░██£££ "," ☺░██£££ "," ☺ ██£££ "," ☺██£££ "," ☺██£££ "," ☺▓█£££ "," ☺▓█£££ "," ☺▒█£££ "," ☺▒█£££ "," ☺░█£££ "," ☺░█£££ "," ☺ █£££ "," ☺█£££ "," ☺█£££ "," ☺▓£££ "," ☺▓£££ "," ☺▒£££ "," ☺▒£££ "," ☺░£££ "," ☺░£££ "," ☺ £££ "," ☺£££ "," ☺£££ "," ☺▓££ "," ☺▓££ "," ☺▒££ "," ☺▒££ "," ☺░££ "," ☺░££ "," ☺ ££ "," ☺££ "," ☺££ "," ☺▓£ "," ☺▓£ "," ☺▒£ "," ☺▒£ "," ☺░£ "," ☺░£ "," ☺ £ "," ☺£ "," ☺£ "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & £ "," & ░£ "," & ▒£ "," & ▓£ "," & ££ "," & ░££ "," & ▒££ ","& ▓££ ","& £££ "," ░£££ "," ▒£££ "," ▓£££ "," █£££ "," ░█£££ "," ▒█£££ "," ▓█£££ "," ██£££ "," ░██£££ "," ▒██£££ "," ▓██£££ "," ███£££ "," ░███£££ "," ▒███£££ "," ▓███£££ "," ████£££ "," ░████£££ "," ▒████£££ "," ▓████£££ "," █████£££ "," ░█████£££ "," ▒█████£££ "," ▓█████£££ "," ██████£££ "," ██████£££ "]}}}}),v=d({"../../node_modules/.pnpm/cli-spinners@2.9.2/node_modules/cli-spinners/index.js"(e,t){var s=Object.assign({},E()),o=Object.keys(s);Object.defineProperty(s,"random",{get(){const e=Math.floor(Math.random()*o.length),t=o[e];return s[t]}}),t.exports=s}}),b=d({"../../node_modules/.pnpm/ignore@7.0.4/node_modules/ignore/index.js"(e,t){function s(e){return Array.isArray(e)?e:[e]}var o=/^\s+$/,r=/(?:[^\\]|^)\\$/,n=/^\\!/,i=/^\\#/,u=/\r?\n/g,a=/^\.{0,2}\/|^\.{1,2}$/,l=/\/$/,D="/",h="node-ignore";"undefined"!=typeof Symbol&&(h=Symbol.for("node-ignore"));var d=h,c=(e,t,s)=>(Object.defineProperty(e,t,{value:s}),s),p=/([0-z])-([0-z])/g,m=()=>!1,_=[[/^\uFEFF/,()=>""],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,s)=>t+(0===s.indexOf("\\")?" ":"")],[/(\\+?)\s/g,(e,t)=>{const{length:s}=t;return t.slice(0,s-s%2)+" "}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,s)=>t+6<s.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,s)=>t+s.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,s,o,r)=>"\\"===t?`\\[${s}${(e=>{const{length:t}=e;return e.slice(0,t-t%2)})(o)}${r}`:"]"===r&&o.length%2==0?`[${(e=>e.replace(p,((e,t,s)=>t.charCodeAt(0)<=s.charCodeAt(0)?e:"")))(s)}${o}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`]],f=/(^|\\\/)?\\\*$/,F="regex",g="checkRegex",C={[F]:(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`,[g]:(e,t)=>`${t?`${t}[^/]*`:"[^/]*"}(?=$|\\/$)`},E=e=>"string"==typeof e,v=class{constructor(e,t,s,o,r,n){this.pattern=e,this.mark=t,this.negative=r,c(this,"body",s),c(this,"ignoreCase",o),c(this,"regexPrefix",n)}get regex(){const e="_"+F;return this[e]?this[e]:this._make(F,e)}get checkRegex(){const e="_"+g;return this[e]?this[e]:this._make(g,e)}_make(e,t){const s=this.regexPrefix.replace(f,C[e]),o=this.ignoreCase?new RegExp(s,"i"):new RegExp(s);return c(this,t,o)}},b=({pattern:e,mark:t},s)=>{let o=!1,r=e;0===r.indexOf("!")&&(o=!0,r=r.substr(1)),r=r.replace(n,"!").replace(i,"#");const u=(e=>_.reduce(((t,[s,o])=>t.replace(s,o.bind(e))),e))(r);return new v(e,t,r,s,o,u)},y=class{constructor(e){this._ignoreCase=e,this._rules=[]}_add(e){if(e&&e[d])return this._rules=this._rules.concat(e._rules._rules),void(this._added=!0);if(E(e)&&(e={pattern:e}),(e=>e&&E(e)&&!o.test(e)&&!r.test(e)&&0!==e.indexOf("#"))(e.pattern)){const t=b(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,s(E(e)?(e=>e.split(u).filter(Boolean))(e):e).forEach(this._add,this),this._added}test(e,t,s){let o,r=!1,n=!1;this._rules.forEach((i=>{const{negative:u}=i;if(n===u&&r!==n||u&&!r&&!n&&!t)return;i[s].test(e)&&(r=!u,n=u,o=u?undefined:i)}));const i={ignored:r,unignored:n};return o&&(i.rule=o),i}},x=(e,t)=>{throw new t(e)},A=(e,t,s)=>{if(!E(e))return s(`path must be a string, but got \`${t}\``,TypeError);if(!e)return s("path must not be empty",TypeError);if(A.isNotRelative(e)){return s(`path should be a ${"`path.relative()`d"} string, but got "${t}"`,RangeError)}return!0},O=e=>a.test(e);A.isNotRelative=O,A.convert=e=>e;var B=class{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:s=!1}={}){c(this,d,!0),this._rules=new y(t),this._strictPathCheck=!s,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(e){return this._rules.add(e)&&this._initCache(),this}addPattern(e){return this.add(e)}_test(e,t,s,o){const r=e&&A.convert(e);return A(r,e,this._strictPathCheck?x:m),this._t(r,t,s,o)}checkIgnore(e){if(!l.test(e))return this.test(e);const t=e.split(D).filter(Boolean);if(t.pop(),t.length){const e=this._t(t.join(D)+D,this._testCache,!0,t);if(e.ignored)return e}return this._rules.test(e,!1,g)}_t(e,t,s,o){if(e in t)return t[e];if(o||(o=e.split(D).filter(Boolean)),o.pop(),!o.length)return t[e]=this._rules.test(e,s,F);const r=this._t(o.join(D)+D,t,s,o);return t[e]=r.ignored?r:this._rules.test(e,s,F)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return s(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},w=e=>new B(e);if("undefined"!=typeof process&&(process.env&&process.env.IGNORE_TEST_WIN32||"win32"===process.platform)){const e=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");A.convert=e;const t=/^[a-z]:\//i;A.isNotRelative=e=>t.test(e)||O(e)}t.exports=w,w.default=w,t.exports.isPathValid=e=>A(e&&A.convert(e),e,m)}}),y=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js"(e,t){t.exports=function(){this.__data__=[],this.size=0}}}),x=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js"(e,t){t.exports=function(e,t){return e===t||e!=e&&t!=t}}}),A=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js"(e,t){var s=x();t.exports=function(e,t){for(var o=e.length;o--;)if(s(e[o][0],t))return o;return-1}}}),O=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js"(e,t){var s=A(),o=Array.prototype.splice;t.exports=function(e){var t=this.__data__,r=s(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}}}),B=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js"(e,t){var s=A();t.exports=function(e){var t=this.__data__,o=s(t,e);return o<0?void 0:t[o][1]}}}),w=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js"(e,t){var s=A();t.exports=function(e){return s(this.__data__,e)>-1}}}),T=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js"(e,t){var s=A();t.exports=function(e,t){var o=this.__data__,r=s(o,e);return r<0?(++this.size,o.push([e,t])):o[r][1]=t,this}}}),j=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js"(e,t){var s=y(),o=O(),r=B(),n=w(),i=T();function u(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var o=e[t];this.set(o[0],o[1])}}u.prototype.clear=s,u.prototype.delete=o,u.prototype.get=r,u.prototype.has=n,u.prototype.set=i,t.exports=u}}),S=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackClear.js"(e,t){var s=j();t.exports=function(){this.__data__=new s,this.size=0}}}),P=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackDelete.js"(e,t){t.exports=function(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s}}}),$=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackGet.js"(e,t){t.exports=function(e){return this.__data__.get(e)}}}),k=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackHas.js"(e,t){t.exports=function(e){return this.__data__.has(e)}}}),I=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js"(e,t){var s="object"==typeof global&&global&&global.Object===Object&&global;t.exports=s}}),R=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js"(e,t){var s=I(),o="object"==typeof self&&self&&self.Object===Object&&self,r=s||o||Function("return this")();t.exports=r}}),H=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js"(e,t){var s=R().Symbol;t.exports=s}}),M=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js"(e,t){var s=H(),o=Object.prototype,r=o.hasOwnProperty,n=o.toString,i=s?s.toStringTag:void 0;t.exports=function(e){var t=r.call(e,i),s=e[i];try{e[i]=void 0;var o=!0}catch(e){}var u=n.call(e);return o&&(t?e[i]=s:delete e[i]),u}}}),V=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js"(e,t){var s=Object.prototype.toString;t.exports=function(e){return s.call(e)}}}),N=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js"(e,t){var s=H(),o=M(),r=V(),n=s?s.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":n&&n in Object(e)?o(e):r(e)}}}),L=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js"(e,t){t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}}),W=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js"(e,t){var s=N(),o=L();t.exports=function(e){if(!o(e))return!1;var t=s(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}}}),G=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js"(e,t){var s=R()["__core-js_shared__"];t.exports=s}}),q=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js"(e,t){var s,o=G(),r=(s=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+s:"";t.exports=function(e){return!!r&&r in e}}}),U=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js"(e,t){var s=Function.prototype.toString;t.exports=function(e){if(null!=e){try{return s.call(e)}catch(e){}try{return e+""}catch(e){}}return""}}}),z=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js"(e,t){var s=W(),o=q(),r=L(),n=U(),i=/^\[object .+?Constructor\]$/,u=Function.prototype,a=Object.prototype,l=u.toString,D=a.hasOwnProperty,h=RegExp("^"+l.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(e){return!(!r(e)||o(e))&&(s(e)?h:i).test(n(e))}}}),Y=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js"(e,t){t.exports=function(e,t){return null==e?void 0:e[t]}}}),J=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js"(e,t){var s=z(),o=Y();t.exports=function(e,t){var r=o(e,t);return s(r)?r:void 0}}}),K=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js"(e,t){var s=J()(R(),"Map");t.exports=s}}),Z=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js"(e,t){var s=J()(Object,"create");t.exports=s}}),Q=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js"(e,t){var s=Z();t.exports=function(){this.__data__=s?s(null):{},this.size=0}}}),X=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js"(e,t){t.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}}}),ee=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js"(e,t){var s=Z(),o=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;if(s){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}}}),te=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js"(e,t){var s=Z(),o=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;return s?void 0!==t[e]:o.call(t,e)}}}),se=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js"(e,t){var s=Z();t.exports=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=s&&void 0===t?"__lodash_hash_undefined__":t,this}}}),oe=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js"(e,t){var s=Q(),o=X(),r=ee(),n=te(),i=se();function u(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var o=e[t];this.set(o[0],o[1])}}u.prototype.clear=s,u.prototype.delete=o,u.prototype.get=r,u.prototype.has=n,u.prototype.set=i,t.exports=u}}),re=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js"(e,t){var s=oe(),o=j(),r=K();t.exports=function(){this.size=0,this.__data__={hash:new s,map:new(r||o),string:new s}}}}),ne=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js"(e,t){t.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}}}),ie=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js"(e,t){var s=ne();t.exports=function(e,t){var o=e.__data__;return s(t)?o["string"==typeof t?"string":"hash"]:o.map}}}),ue=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js"(e,t){var s=ie();t.exports=function(e){var t=s(this,e).delete(e);return this.size-=t?1:0,t}}}),ae=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js"(e,t){var s=ie();t.exports=function(e){return s(this,e).get(e)}}}),le=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js"(e,t){var s=ie();t.exports=function(e){return s(this,e).has(e)}}}),De=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js"(e,t){var s=ie();t.exports=function(e,t){var o=s(this,e),r=o.size;return o.set(e,t),this.size+=o.size==r?0:1,this}}}),he=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js"(e,t){var s=re(),o=ue(),r=ae(),n=le(),i=De();function u(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var o=e[t];this.set(o[0],o[1])}}u.prototype.clear=s,u.prototype.delete=o,u.prototype.get=r,u.prototype.has=n,u.prototype.set=i,t.exports=u}}),de=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackSet.js"(e,t){var s=j(),o=K(),r=he();t.exports=function(e,t){var n=this.__data__;if(n instanceof s){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new r(i)}return n.set(e,t),this.size=n.size,this}}}),ce=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Stack.js"(e,t){var s=j(),o=S(),r=P(),n=$(),i=k(),u=de();function a(e){var t=this.__data__=new s(e);this.size=t.size}a.prototype.clear=o,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=i,a.prototype.set=u,t.exports=a}}),pe=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js"(e,t){var s=J(),o=function(){try{var e=s(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.exports=o}}),me=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js"(e,t){var s=pe();t.exports=function(e,t,o){"__proto__"==t&&s?s(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}}}),_e=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignMergeValue.js"(e,t){var s=me(),o=x();t.exports=function(e,t,r){(void 0!==r&&!o(e[t],r)||void 0===r&&!(t in e))&&s(e,t,r)}}}),fe=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseFor.js"(e,t){t.exports=function(e){return function(t,s,o){for(var r=-1,n=Object(t),i=o(t),u=i.length;u--;){var a=i[e?u:++r];if(!1===s(n[a],a,n))break}return t}}}}),Fe=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFor.js"(e,t){var s=fe()();t.exports=s}}),ge=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneBuffer.js"(e,t){var s=R(),o="object"==typeof e&&e&&!e.nodeType&&e,r=o&&"object"==typeof t&&t&&!t.nodeType&&t,n=r&&r.exports===o?s.Buffer:void 0,i=n?n.allocUnsafe:void 0;t.exports=function(e,t){if(t)return e.slice();var s=e.length,o=i?i(s):new e.constructor(s);return e.copy(o),o}}}),Ce=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Uint8Array.js"(e,t){var s=R().Uint8Array;t.exports=s}}),Ee=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneArrayBuffer.js"(e,t){var s=Ce();t.exports=function(e){var t=new e.constructor(e.byteLength);return new s(t).set(new s(e)),t}}}),ve=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneTypedArray.js"(e,t){var s=Ee();t.exports=function(e,t){var o=t?s(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}}}),be=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copyArray.js"(e,t){t.exports=function(e,t){var s=-1,o=e.length;for(t||(t=Array(o));++s<o;)t[s]=e[s];return t}}}),ye=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseCreate.js"(e,t){var s=L(),o=Object.create,r=function(){function e(){}return function(t){if(!s(t))return{};if(o)return o(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();t.exports=r}}),xe=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js"(e,t){t.exports=function(e,t){return function(s){return e(t(s))}}}}),Ae=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getPrototype.js"(e,t){var s=xe()(Object.getPrototypeOf,Object);t.exports=s}}),Oe=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isPrototype.js"(e,t){var s=Object.prototype;t.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||s)}}}),Be=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneObject.js"(e,t){var s=ye(),o=Ae(),r=Oe();t.exports=function(e){return"function"!=typeof e.constructor||r(e)?{}:s(o(e))}}}),we=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js"(e,t){t.exports=function(e){return null!=e&&"object"==typeof e}}}),Te=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js"(e,t){var s=N(),o=we();t.exports=function(e){return o(e)&&"[object Arguments]"==s(e)}}}),je=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js"(e,t){var s=Te(),o=we(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,u=s(function(){return arguments}())?s:function(e){return o(e)&&n.call(e,"callee")&&!i.call(e,"callee")};t.exports=u}}),Se=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js"(e,t){var s=Array.isArray;t.exports=s}}),Pe=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js"(e,t){t.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}}),$e=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js"(e,t){var s=W(),o=Pe();t.exports=function(e){return null!=e&&o(e.length)&&!s(e)}}}),ke=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js"(e,t){var s=$e(),o=we();t.exports=function(e){return o(e)&&s(e)}}}),Ie=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubFalse.js"(e,t){t.exports=function(){return!1}}}),Re=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js"(e,t){var s=R(),o=Ie(),r="object"==typeof e&&e&&!e.nodeType&&e,n=r&&"object"==typeof t&&t&&!t.nodeType&&t,i=n&&n.exports===r?s.Buffer:void 0,u=(i?i.isBuffer:void 0)||o;t.exports=u}}),He=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js"(e,t){var s=N(),o=Ae(),r=we(),n=Function.prototype,i=Object.prototype,u=n.toString,a=i.hasOwnProperty,l=u.call(Object);t.exports=function(e){if(!r(e)||"[object Object]"!=s(e))return!1;var t=o(e);if(null===t)return!0;var n=a.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}}}),Me=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js"(e,t){var s=N(),o=Pe(),r=we(),n={};n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0,n["[object Arguments]"]=n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1,t.exports=function(e){return r(e)&&o(e.length)&&!!n[s(e)]}}}),Ve=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js"(e,t){t.exports=function(e){return function(t){return e(t)}}}}),Ne=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nodeUtil.js"(e,t){var s=I(),o="object"==typeof e&&e&&!e.nodeType&&e,r=o&&"object"==typeof t&&t&&!t.nodeType&&t,n=r&&r.exports===o&&s.process,i=function(){try{var e=r&&r.require&&r.require("util").types;return e||n&&n.binding&&n.binding("util")}catch(e){}}();t.exports=i}}),Le=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js"(e,t){var s=Me(),o=Ve(),r=Ne(),n=r&&r.isTypedArray,i=n?o(n):s;t.exports=i}}),We=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_safeGet.js"(e,t){t.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}}}),Ge=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js"(e,t){var s=me(),o=x(),r=Object.prototype.hasOwnProperty;t.exports=function(e,t,n){var i=e[t];r.call(e,t)&&o(i,n)&&(void 0!==n||t in e)||s(e,t,n)}}}),qe=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copyObject.js"(e,t){var s=Ge(),o=me();t.exports=function(e,t,r,n){var i=!r;r||(r={});for(var u=-1,a=t.length;++u<a;){var l=t[u],D=n?n(r[l],e[l],l,r,e):void 0;void 0===D&&(D=e[l]),i?o(r,l,D):s(r,l,D)}return r}}}),Ue=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTimes.js"(e,t){t.exports=function(e,t){for(var s=-1,o=Array(e);++s<e;)o[s]=t(s);return o}}}),ze=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIndex.js"(e,t){var s=/^(?:0|[1-9]\d*)$/;t.exports=function(e,t){var o=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&s.test(e))&&e>-1&&e%1==0&&e<t}}}),Ye=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayLikeKeys.js"(e,t){var s=Ue(),o=je(),r=Se(),n=Re(),i=ze(),u=Le(),a=Object.prototype.hasOwnProperty;t.exports=function(e,t){var l=r(e),D=!l&&o(e),h=!l&&!D&&n(e),d=!l&&!D&&!h&&u(e),c=l||D||h||d,p=c?s(e.length,String):[],m=p.length;for(var _ in e)!t&&!a.call(e,_)||c&&("length"==_||h&&("offset"==_||"parent"==_)||d&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||i(_,m))||p.push(_);return p}}}),Je=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeysIn.js"(e,t){t.exports=function(e){var t=[];if(null!=e)for(var s in Object(e))t.push(s);return t}}}),Ke=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeysIn.js"(e,t){var s=L(),o=Oe(),r=Je(),n=Object.prototype.hasOwnProperty;t.exports=function(e){if(!s(e))return r(e);var t=o(e),i=[];for(var u in e)("constructor"!=u||!t&&n.call(e,u))&&i.push(u);return i}}}),Ze=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keysIn.js"(e,t){var s=Ye(),o=Ke(),r=$e();t.exports=function(e){return r(e)?s(e,!0):o(e)}}}),Qe=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toPlainObject.js"(e,t){var s=qe(),o=Ze();t.exports=function(e){return s(e,o(e))}}}),Xe=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMergeDeep.js"(e,t){var s=_e(),o=ge(),r=ve(),n=be(),i=Be(),u=je(),a=Se(),l=ke(),D=Re(),h=W(),d=L(),c=He(),p=Le(),m=We(),_=Qe();t.exports=function(e,t,f,F,g,C,E){var v=m(e,f),b=m(t,f),y=E.get(b);if(y)s(e,f,y);else{var x=C?C(v,b,f+"",e,t,E):void 0,A=void 0===x;if(A){var O=a(b),B=!O&&D(b),w=!O&&!B&&p(b);x=b,O||B||w?a(v)?x=v:l(v)?x=n(v):B?(A=!1,x=o(b,!0)):w?(A=!1,x=r(b,!0)):x=[]:c(b)||u(b)?(x=v,u(v)?x=_(v):d(v)&&!h(v)||(x=i(b))):A=!1}A&&(E.set(b,x),g(x,b,F,C,E),E.delete(b)),s(e,f,x)}}}}),et=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMerge.js"(e,t){var s=ce(),o=_e(),r=Fe(),n=Xe(),i=L(),u=Ze(),a=We();t.exports=function e(t,l,D,h,d){t!==l&&r(l,(function(r,u){if(d||(d=new s),i(r))n(t,l,u,D,e,h,d);else{var c=h?h(a(t,u),r,u+"",t,l,d):void 0;void 0===c&&(c=r),o(t,u,c)}}),u)}}}),tt=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js"(e,t){t.exports=function(e){return e}}}),st=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_apply.js"(e,t){t.exports=function(e,t,s){switch(s.length){case 0:return e.call(t);case 1:return e.call(t,s[0]);case 2:return e.call(t,s[0],s[1]);case 3:return e.call(t,s[0],s[1],s[2])}return e.apply(t,s)}}}),ot=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overRest.js"(e,t){var s=st(),o=Math.max;t.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,u=o(n.length-t,0),a=Array(u);++i<u;)a[i]=n[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=n[i];return l[t]=r(a),s(e,this,l)}}}}),rt=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/constant.js"(e,t){t.exports=function(e){return function(){return e}}}}),nt=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSetToString.js"(e,t){var s=rt(),o=pe(),r=tt(),n=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:s(t),writable:!0})}:r;t.exports=n}}),it=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_shortOut.js"(e,t){var s=Date.now;t.exports=function(e){var t=0,o=0;return function(){var r=s(),n=16-(r-o);if(o=r,n>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}}}),ut=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToString.js"(e,t){var s=nt(),o=it()(s);t.exports=o}}),at=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRest.js"(e,t){var s=tt(),o=ot(),r=ut();t.exports=function(e,t){return r(o(e,t,s),e+"")}}}),lt=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIterateeCall.js"(e,t){var s=x(),o=$e(),r=ze(),n=L();t.exports=function(e,t,i){if(!n(i))return!1;var u=typeof t;return!!("number"==u?o(i)&&r(t,i.length):"string"==u&&t in i)&&s(i[t],e)}}}),Dt=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createAssigner.js"(e,t){var s=at(),o=lt();t.exports=function(e){return s((function(t,s){var r=-1,n=s.length,i=n>1?s[n-1]:void 0,u=n>2?s[2]:void 0;for(i=e.length>3&&"function"==typeof i?(n--,i):void 0,u&&o(s[0],s[1],u)&&(i=n<3?void 0:i,n=1),t=Object(t);++r<n;){var a=s[r];a&&e(t,a,r,i)}return t}))}}}),ht=d({"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/merge.js"(e,t){var s=et(),o=Dt()((function(e,t,o){s(e,t,o)}));t.exports=o}}),dt=require("path"),ct=require("fs"),pt=c(C(),1),{program:mt,createCommand:_t,createArgument:ft,createOption:Ft,CommanderError:gt,InvalidArgumentError:Ct,InvalidOptionArgumentError:Et,Command:vt,Argument:bt,Option:yt,Help:xt}=pt.default,At=require("@qlover/scripts-context"),Ot=e(require("inquirer"));var Bt=e(require("process")),wt=(e=0)=>t=>`[${t+e}m`,Tt=(e=0)=>t=>`[${38+e};5;${t}m`,jt=(e=0)=>(t,s,o)=>`[${38+e};2;${t};${s};${o}m`,St={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(St.modifier),Object.keys(St.color),Object.keys(St.bgColor);var Pt=function(){const e=new Map;for(const[t,s]of Object.entries(St)){for(const[t,o]of Object.entries(s))St[t]={open:`[${o[0]}m`,close:`[${o[1]}m`},s[t]=St[t],e.set(o[0],o[1]);Object.defineProperty(St,t,{value:s,enumerable:!1})}return Object.defineProperty(St,"codes",{value:e,enumerable:!1}),St.color.close="",St.bgColor.close="",St.color.ansi=wt(),St.color.ansi256=Tt(),St.color.ansi16m=jt(),St.bgColor.ansi=wt(10),St.bgColor.ansi256=Tt(10),St.bgColor.ansi16m=jt(10),Object.defineProperties(St,{rgbToAnsi256:{value:(e,t,s)=>e===t&&t===s?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(s/255*5),enumerable:!1},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[s]=t;3===s.length&&(s=[...s].map((e=>e+e)).join(""));const o=Number.parseInt(s,16);return[o>>16&255,o>>8&255,255&o]},enumerable:!1},hexToAnsi256:{value:e=>St.rgbToAnsi256(...St.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return e-8+90;let t,s,o;if(e>=232)t=(10*(e-232)+8)/255,s=t,o=t;else{const r=(e-=16)%36;t=Math.floor(e/36)/5,s=Math.floor(r/6)/5,o=r%6/5}const r=2*Math.max(t,s,o);if(0===r)return 30;let n=30+(Math.round(o)<<2|Math.round(s)<<1|Math.round(t));return 2===r&&(n+=60),n},enumerable:!1},rgbToAnsi:{value:(e,t,s)=>St.ansi256ToAnsi(St.rgbToAnsi256(e,t,s)),enumerable:!1},hexToAnsi:{value:e=>St.ansi256ToAnsi(St.hexToAnsi256(e)),enumerable:!1}}),St}(),$t=e(require("os")),kt=e(require("tty"));function It(e,t=(globalThis.Deno?globalThis.Deno.args:Bt.default.argv)){const s=e.startsWith("-")?"":1===e.length?"-":"--",o=t.indexOf(s+e),r=t.indexOf("--");return-1!==o&&(-1===r||o<r)}var Rt,{env:Ht}=Bt.default;function Mt(e,{streamIsTTY:t,sniffFlags:s=!0}={}){const o=function(){if("FORCE_COLOR"in Ht)return"true"===Ht.FORCE_COLOR?1:"false"===Ht.FORCE_COLOR?0:0===Ht.FORCE_COLOR.length?1:Math.min(Number.parseInt(Ht.FORCE_COLOR,10),3)}();void 0!==o&&(Rt=o);const r=s?Rt:o;if(0===r)return 0;if(s){if(It("color=16m")||It("color=full")||It("color=truecolor"))return 3;if(It("color=256"))return 2}if("TF_BUILD"in Ht&&"AGENT_NAME"in Ht)return 1;if(e&&!t&&void 0===r)return 0;const n=r||0;if("dumb"===Ht.TERM)return n;if("win32"===Bt.default.platform){const e=$t.default.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in Ht)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((e=>e in Ht))?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((e=>e in Ht))||"codeship"===Ht.CI_NAME?1:n;if("TEAMCITY_VERSION"in Ht)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ht.TEAMCITY_VERSION)?1:0;if("truecolor"===Ht.COLORTERM)return 3;if("xterm-kitty"===Ht.TERM)return 3;if("TERM_PROGRAM"in Ht){const e=Number.parseInt((Ht.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ht.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ht.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ht.TERM)||"COLORTERM"in Ht?1:n}function Vt(e,t={}){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(Mt(e,{streamIsTTY:e&&e.isTTY,...t}))}It("no-color")||It("no-colors")||It("color=false")||It("color=never")?Rt=0:(It("color")||It("colors")||It("color=true")||It("color=always"))&&(Rt=1);var Nt={stdout:Vt({isTTY:kt.default.isatty(1)}),stderr:Vt({isTTY:kt.default.isatty(2)})};function Lt(e,t,s){let o=e.indexOf(t);if(-1===o)return e;const r=t.length;let n=0,i="";do{i+=e.slice(n,o)+t+s,n=o+r,o=e.indexOf(t,n)}while(-1!==o);return i+=e.slice(n),i}var{stdout:Wt,stderr:Gt}=Nt,qt=Symbol("GENERATOR"),Ut=Symbol("STYLER"),zt=Symbol("IS_EMPTY"),Yt=["ansi","ansi","ansi256","ansi16m"],Jt=Object.create(null),Kt=e=>{const t=(...e)=>e.join(" ");return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const s=Wt?Wt.level:0;e.level=void 0===t.level?s:t.level})(t,e),Object.setPrototypeOf(t,Zt.prototype),t};function Zt(e){return Kt(e)}Object.setPrototypeOf(Zt.prototype,Function.prototype);for(const[e,t]of Object.entries(Pt))Jt[e]={get(){const s=ts(this,es(t.open,t.close,this[Ut]),this[zt]);return Object.defineProperty(this,e,{value:s}),s}};Jt.visible={get(){const e=ts(this,this[Ut],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Qt=(e,t,s,...o)=>"rgb"===e?"ansi16m"===t?Pt[s].ansi16m(...o):"ansi256"===t?Pt[s].ansi256(Pt.rgbToAnsi256(...o)):Pt[s].ansi(Pt.rgbToAnsi(...o)):"hex"===e?Qt("rgb",t,s,...Pt.hexToRgb(...o)):Pt[s][e](...o);for(const e of["rgb","hex","ansi256"]){Jt[e]={get(){const{level:t}=this;return function(...s){const o=es(Qt(e,Yt[t],"color",...s),Pt.color.close,this[Ut]);return ts(this,o,this[zt])}}};Jt["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...s){const o=es(Qt(e,Yt[t],"bgColor",...s),Pt.bgColor.close,this[Ut]);return ts(this,o,this[zt])}}}}var Xt=Object.defineProperties((()=>{}),{...Jt,level:{enumerable:!0,get(){return this[qt].level},set(e){this[qt].level=e}}}),es=(e,t,s)=>{let o,r;return void 0===s?(o=e,r=t):(o=s.openAll+e,r=t+s.closeAll),{open:e,close:t,openAll:o,closeAll:r,parent:s}},ts=(e,t,s)=>{const o=(...e)=>ss(o,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(o,Xt),o[qt]=e,o[Ut]=t,o[zt]=s,o},ss=(e,t)=>{if(e.level<=0||!t)return e[zt]?"":t;let s=e[Ut];if(void 0===s)return t;const{openAll:o,closeAll:r}=s;if(t.includes(""))for(;void 0!==s;)t=Lt(t,s.close,s.open),s=s.parent;const n=t.indexOf("\n");return-1!==n&&(t=function(e,t,s,o){let r=0,n="";do{const i="\r"===e[o-1];n+=e.slice(r,i?o-1:o)+t+(i?"\r\n":"\n")+s,r=o+1,o=e.indexOf("\n",r)}while(-1!==o);return n+=e.slice(r),n}(t,r,o,n)),o+t+r};Object.defineProperties(Zt.prototype,Jt);var os=Zt(),rs=(Zt({level:Gt?Gt.level:0}),os),ns=(e,t,s,o)=>{if("length"===s||"prototype"===s)return;if("arguments"===s||"caller"===s)return;const r=Object.getOwnPropertyDescriptor(e,s),n=Object.getOwnPropertyDescriptor(t,s);!is(r,n)&&o||Object.defineProperty(e,s,n)},is=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)},us=(e,t)=>`/* Wrapped ${e}*/\n${t}`,as=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),ls=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");function Ds(e,t,{ignoreNonConfigurable:s=!1}={}){const{name:o}=e;for(const o of Reflect.ownKeys(t))ns(e,t,o,s);return((e,t)=>{const s=Object.getPrototypeOf(t);s!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,s)})(e,t),((e,t,s)=>{const o=""===s?"":`with ${s.trim()}() `,r=us.bind(null,o,t.toString());Object.defineProperty(r,"name",ls);const{writable:n,enumerable:i,configurable:u}=as;Object.defineProperty(e,"toString",{value:r,writable:n,enumerable:i,configurable:u})})(e,t,o),e}var hs=new WeakMap,ds=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let s,o=0;const r=e.displayName||e.name||"<anonymous>",n=function(...i){if(hs.set(n,++o),1===o)s=e.apply(this,i),e=void 0;else if(!0===t.throw)throw new Error(`Function \`${r}\` can only be called once`);return s};return Ds(n,e),hs.set(n,o),n};ds.callCount=e=>{if(!hs.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return hs.get(e)};var cs=ds,ps=[];ps.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&ps.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&ps.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var ms,_s=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,fs=Symbol.for("signal-exit emitter"),Fs=globalThis,gs=Object.defineProperty.bind(Object),Cs=o=class{__init(){this.emitted={afterExit:!1,exit:!1}}__init2(){this.listeners={afterExit:[],exit:[]}}__init3(){this.count=0}__init4(){this.id=Math.random()}constructor(){if(o.prototype.__init.call(this),o.prototype.__init2.call(this),o.prototype.__init3.call(this),o.prototype.__init4.call(this),Fs[fs])return Fs[fs];gs(Fs,fs,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const s=this.listeners[e],o=s.indexOf(t);-1!==o&&(0===o&&1===s.length?s.length=0:s.splice(o,1))}emit(e,t,s){if(this.emitted[e])return!1;this.emitted[e]=!0;let o=!1;for(const r of this.listeners[e])o=!0===r(t,s)||o;return"exit"===e&&(o=this.emit("afterExit",t,s)||o),o}},Es=class{},vs=globalThis.process,{onExit:bs,load:ys,unload:xs}=(ms=_s(vs)?new class extends Es{#e="win32"===vs.platform?"SIGINT":"SIGHUP";#t=new Cs;#s;#o;#r;#n={};#i=!1;constructor(e){super(),this.#s=e,this.#n={};for(const t of ps)this.#n[t]=()=>{const s=this.#s.listeners(t);let{count:o}=this.#t;const r=e;if("object"==typeof r.__signal_exit_emitter__&&"number"==typeof r.__signal_exit_emitter__.count&&(o+=r.__signal_exit_emitter__.count),s.length===o){this.unload();const s=this.#t.emit("exit",null,t),o="SIGHUP"===t?this.#e:t;s||e.kill(e.pid,o)}};this.#r=e.reallyExit,this.#o=e.emit}onExit(e,t){if(!_s(this.#s))return()=>{};!1===this.#i&&this.load();const o=s([t,"optionalAccess",e=>e.alwaysLast])?"afterExit":"exit";return this.#t.on(o,e),()=>{this.#t.removeListener(o,e),0===this.#t.listeners.exit.length&&0===this.#t.listeners.afterExit.length&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#t.count+=1;for(const e of ps)try{const t=this.#n[e];t&&this.#s.on(e,t)}catch(e){}this.#s.emit=(e,...t)=>this.#u(e,...t),this.#s.reallyExit=e=>this.#a(e)}}unload(){this.#i&&(this.#i=!1,ps.forEach((e=>{const t=this.#n[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#s.removeListener(e,t)}catch(e){}})),this.#s.emit=this.#o,this.#s.reallyExit=this.#r,this.#t.count-=1)}#a(e){return _s(this.#s)?(this.#s.exitCode=e||0,this.#t.emit("exit",this.#s.exitCode,null),this.#r.call(this.#s,this.#s.exitCode)):0}#u(e,...t){const s=this.#o;if("exit"===e&&_s(this.#s)){"number"==typeof t[0]&&(this.#s.exitCode=t[0]);const o=s.call(this.#s,e,...t);return this.#t.emit("exit",this.#s.exitCode,null),o}return s.call(this.#s,e,...t)}}(vs):new class extends Es{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>ms.onExit(e,t),load:()=>ms.load(),unload:()=>ms.unload()}),As=Bt.default.stderr.isTTY?Bt.default.stderr:Bt.default.stdout.isTTY?Bt.default.stdout:void 0,Os=As?cs((()=>{bs((()=>{As.write("[?25h")}),{alwaysLast:!0})})):()=>{},Bs=!1,ws={show:(e=Bt.default.stderr)=>{e.isTTY&&(Bs=!1,e.write("[?25h"))},hide:(e=Bt.default.stderr)=>{e.isTTY&&(Os(),Bs=!0,e.write("[?25l"))},toggle:(e,t)=>{void 0!==e&&(Bs=e),Bs?ws.show(t):ws.hide(t)}},Ts=ws,js=c(v(),1);var Ss={info:rs.blue("ℹ"),success:rs.green("✔"),warning:rs.yellow("⚠"),error:rs.red("✖")},Ps={info:rs.blue("i"),success:rs.green("√"),warning:rs.yellow("‼"),error:rs.red("×")},$s=("win32"!==Bt.default.platform?"linux"!==Bt.default.env.TERM:Boolean(Bt.default.env.CI)||Boolean(Bt.default.env.WT_SESSION)||Boolean(Bt.default.env.TERMINUS_SUBLIME)||"{cmd::Cmder}"===Bt.default.env.ConEmuTask||"Terminus-Sublime"===Bt.default.env.TERM_PROGRAM||"vscode"===Bt.default.env.TERM_PROGRAM||"xterm-256color"===Bt.default.env.TERM||"alacritty"===Bt.default.env.TERM||"JetBrains-JediTerm"===Bt.default.env.TERMINAL_EMULATOR)?Ss:Ps;var ks=function({onlyFirst:e=!1}={}){const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}();function Is(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(ks,"")}function Rs(e,{ambiguousAsWide:t=!1}={}){return function(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}(e),12288===(s=e)||s>=65281&&s<=65376||s>=65504&&s<=65510||function(e){return e>=4352&&e<=4447||8986===e||8987===e||9001===e||9002===e||e>=9193&&e<=9196||9200===e||9203===e||9725===e||9726===e||9748===e||9749===e||e>=9776&&e<=9783||e>=9800&&e<=9811||9855===e||e>=9866&&e<=9871||9875===e||9889===e||9898===e||9899===e||9917===e||9918===e||9924===e||9925===e||9934===e||9940===e||9962===e||9970===e||9971===e||9973===e||9978===e||9981===e||9989===e||9994===e||9995===e||10024===e||10060===e||10062===e||e>=10067&&e<=10069||10071===e||e>=10133&&e<=10135||10160===e||10175===e||11035===e||11036===e||11088===e||11093===e||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||94192===e||94193===e||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||110589===e||110590===e||e>=110592&&e<=110882||110898===e||e>=110928&&e<=110930||110933===e||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||126980===e||127183===e||127374===e||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||127568===e||127569===e||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||127988===e||e>=127992&&e<=128062||128064===e||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||128378===e||128405===e||128406===e||128420===e||e>=128507&&e<=128591||e>=128640&&e<=128709||128716===e||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||128747===e||128748===e||e>=128756&&e<=128764||e>=128992&&e<=129003||129008===e||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}(e)||t&&function(e){return 161===e||164===e||167===e||168===e||170===e||173===e||174===e||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||198===e||208===e||215===e||216===e||e>=222&&e<=225||230===e||e>=232&&e<=234||236===e||237===e||240===e||242===e||243===e||e>=247&&e<=250||252===e||254===e||257===e||273===e||275===e||283===e||294===e||295===e||299===e||e>=305&&e<=307||312===e||e>=319&&e<=322||324===e||e>=328&&e<=331||333===e||338===e||339===e||358===e||359===e||363===e||462===e||464===e||466===e||468===e||470===e||472===e||474===e||476===e||593===e||609===e||708===e||711===e||e>=713&&e<=715||717===e||720===e||e>=728&&e<=731||733===e||735===e||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||1025===e||e>=1040&&e<=1103||1105===e||8208===e||e>=8211&&e<=8214||8216===e||8217===e||8220===e||8221===e||e>=8224&&e<=8226||e>=8228&&e<=8231||8240===e||8242===e||8243===e||8245===e||8251===e||8254===e||8308===e||8319===e||e>=8321&&e<=8324||8364===e||8451===e||8453===e||8457===e||8467===e||8470===e||8481===e||8482===e||8486===e||8491===e||8531===e||8532===e||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||8585===e||e>=8592&&e<=8601||8632===e||8633===e||8658===e||8660===e||8679===e||8704===e||8706===e||8707===e||8711===e||8712===e||8715===e||8719===e||8721===e||8725===e||8730===e||e>=8733&&e<=8736||8739===e||8741===e||e>=8743&&e<=8748||8750===e||e>=8756&&e<=8759||8764===e||8765===e||8776===e||8780===e||8786===e||8800===e||8801===e||e>=8804&&e<=8807||8810===e||8811===e||8814===e||8815===e||8834===e||8835===e||8838===e||8839===e||8853===e||8857===e||8869===e||8895===e||8978===e||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||9632===e||9633===e||e>=9635&&e<=9641||9650===e||9651===e||9654===e||9655===e||9660===e||9661===e||9664===e||9665===e||e>=9670&&e<=9672||9675===e||e>=9678&&e<=9681||e>=9698&&e<=9701||9711===e||9733===e||9734===e||9737===e||9742===e||9743===e||9756===e||9758===e||9792===e||9794===e||9824===e||9825===e||e>=9827&&e<=9829||e>=9831&&e<=9834||9836===e||9837===e||9839===e||9886===e||9887===e||9919===e||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||9955===e||9960===e||9961===e||e>=9963&&e<=9969||9972===e||e>=9974&&e<=9977||9979===e||9980===e||9982===e||9983===e||10045===e||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||65533===e||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||127375===e||127376===e||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}(e)?2:1;var s}var Hs=new Intl.Segmenter,Ms=/^\p{Default_Ignorable_Code_Point}$/u;function Vs(e,t={}){if("string"!=typeof e||0===e.length)return 0;const{ambiguousIsNarrow:s=!0,countAnsiEscapeCodes:o=!1}=t;if(o||(e=Is(e)),0===e.length)return 0;let r=0;const n={ambiguousAsWide:!s};for(const{segment:t}of Hs.segment(e)){const e=t.codePointAt(0);e<=31||e>=127&&e<=159||(e>=8203&&e<=8207||65279===e||e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071||e>=55296&&e<=57343||e>=65024&&e<=65039||Ms.test(t)||(/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g.test(t)?r+=2:r+=Rs(e,n)))}return r}var Ns=new class{#l=0;start(){this.#l++,1===this.#l&&this.#D()}stop(){if(this.#l<=0)throw new Error("`stop` called more times than `start`");this.#l--,0===this.#l&&this.#h()}#D(){"win32"!==Bt.default.platform&&Bt.default.stdin.isTTY&&(Bt.default.stdin.setRawMode(!0),Bt.default.stdin.on("data",this.#d),Bt.default.stdin.resume())}#h(){Bt.default.stdin.isTTY&&(Bt.default.stdin.off("data",this.#d),Bt.default.stdin.pause(),Bt.default.stdin.setRawMode(!1))}#d(e){3===e[0]&&Bt.default.emit("SIGINT")}},Ls=(c(v(),1),class{#c=0;#p=!1;#m=0;#_=-1;#f=0;#F;#g;#C;#E;#v;#b;#y;#x;#A;#O;#B;constructor(e){"string"==typeof e&&(e={text:e}),this.#F={color:"cyan",stream:Bt.default.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#F.color,this.spinner=this.#F.spinner,this.#v=this.#F.interval,this.#C=this.#F.stream,this.#b="boolean"==typeof this.#F.isEnabled?this.#F.isEnabled:function({stream:e=process.stdout}={}){return Boolean(e&&e.isTTY&&"dumb"!==process.env.TERM&&!("CI"in process.env))}({stream:this.#C}),this.#y="boolean"==typeof this.#F.isSilent&&this.#F.isSilent,this.text=this.#F.text,this.prefixText=this.#F.prefixText,this.suffixText=this.#F.suffixText,this.indent=this.#F.indent,"test"===Bt.default.env.NODE_ENV&&(this._stream=this.#C,this._isEnabled=this.#b,Object.defineProperty(this,"_linesToClear",{get(){return this.#c},set(e){this.#c=e}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#_}}),Object.defineProperty(this,"_lineCount",{get(){return this.#m}}))}get indent(){return this.#x}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#x=e,this.#w()}get interval(){return t(t(this.#v,(()=>this.#g.interval)),(()=>100))}get spinner(){return this.#g}set spinner(e){if(this.#_=-1,this.#v=void 0,"object"==typeof e){if(void 0===e.frames)throw new Error("The given spinner must have a `frames` property");this.#g=e}else if(function(){const{env:e}=Bt.default,{TERM:t,TERM_PROGRAM:s}=e;return"win32"!==Bt.default.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===s||"vscode"===s||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}())if(void 0===e)this.#g=js.default.dots;else{if("default"===e||!js.default[e])throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);this.#g=js.default[e]}else this.#g=js.default.line}get text(){return this.#A}set text(e=""){this.#A=e,this.#w()}get prefixText(){return this.#O}set prefixText(e=""){this.#O=e,this.#w()}get suffixText(){return this.#B}set suffixText(e=""){this.#B=e,this.#w()}get isSpinning(){return void 0!==this.#E}#T(e=this.#O,t=" "){return"string"==typeof e&&""!==e?e+t:"function"==typeof e?e()+t:""}#j(e=this.#B,t=" "){return"string"==typeof e&&""!==e?t+e:"function"==typeof e?t+e():""}#w(){const e=t(this.#C.columns,(()=>80)),s=this.#T(this.#O,"-"),o=this.#j(this.#B,"-"),r=" ".repeat(this.#x)+s+"--"+this.#A+"--"+o;this.#m=0;for(const t of Is(r).split("\n"))this.#m+=Math.max(1,Math.ceil(Vs(t,{countAnsiEscapeCodes:!0})/e))}get isEnabled(){return this.#b&&!this.#y}set isEnabled(e){if("boolean"!=typeof e)throw new TypeError("The `isEnabled` option must be a boolean");this.#b=e}get isSilent(){return this.#y}set isSilent(e){if("boolean"!=typeof e)throw new TypeError("The `isSilent` option must be a boolean");this.#y=e}frame(){const e=Date.now();(-1===this.#_||e-this.#f>=this.interval)&&(this.#_=++this.#_%this.#g.frames.length,this.#f=e);const{frames:t}=this.#g;let s=t[this.#_];this.color&&(s=rs[this.color](s));return("string"==typeof this.#O&&""!==this.#O?this.#O+" ":"")+s+("string"==typeof this.text?" "+this.text:"")+("string"==typeof this.#B&&""!==this.#B?" "+this.#B:"")}clear(){if(!this.#b||!this.#C.isTTY)return this;this.#C.cursorTo(0);for(let e=0;e<this.#c;e++)e>0&&this.#C.moveCursor(0,-1),this.#C.clearLine(1);return(this.#x||this.lastIndent!==this.#x)&&this.#C.cursorTo(this.#x),this.lastIndent=this.#x,this.#c=0,this}render(){return this.#y||(this.clear(),this.#C.write(this.frame()),this.#c=this.#m),this}start(e){return e&&(this.text=e),this.#y?this:this.#b?(this.isSpinning||(this.#F.hideCursor&&Ts.hide(this.#C),this.#F.discardStdin&&Bt.default.stdin.isTTY&&(this.#p=!0,Ns.start()),this.render(),this.#E=setInterval(this.render.bind(this),this.interval)),this):(this.text&&this.#C.write(`- ${this.text}\n`),this)}stop(){return this.#b?(clearInterval(this.#E),this.#E=void 0,this.#_=0,this.clear(),this.#F.hideCursor&&Ts.show(this.#C),this.#F.discardStdin&&Bt.default.stdin.isTTY&&this.#p&&(Ns.stop(),this.#p=!1),this):this}succeed(e){return this.stopAndPersist({symbol:$s.success,text:e})}fail(e){return this.stopAndPersist({symbol:$s.error,text:e})}warn(e){return this.stopAndPersist({symbol:$s.warning,text:e})}info(e){return this.stopAndPersist({symbol:$s.info,text:e})}stopAndPersist(e={}){if(this.#y)return this;const s=t(e.prefixText,(()=>this.#O)),o=this.#T(s," "),r=t(e.symbol,(()=>" ")),n=t(e.text,(()=>this.text)),i="string"==typeof n?(r?" ":"")+n:"",u=t(e.suffixText,(()=>this.#B)),a=o+r+i+this.#j(u," ")+"\n";return this.stop(),this.#C.write(a),this}});async function Ws(e,t){const s="function"==typeof e,o="function"==typeof e.then;if(!s&&!o)throw new TypeError("Parameter `action` must be a Function or a Promise");const{successText:r,failText:n}="object"==typeof t?t:{successText:void 0,failText:void 0},i=function(e){return new Ls(e)}(t).start();try{const t=s?e(i):e,o=await t;return i.succeed(void 0===r?void 0:"string"==typeof r?r:r(o)),o}catch(e){throw i.fail(void 0===n?void 0:"string"==typeof n?n:n(e)),e}}var Gs=c(b(),1),qs=class{static ensureDir(e){ct.existsSync.call(void 0,e)||ct.mkdirSync.call(void 0,e,{recursive:!0})}},{copyFile:Us,stat:zs}=ct.promises,Ys=((r=class e{constructor(t,s=e.IGNORE_FILE){this.ignoreTargetPath=t,this.ignoreFile=s}static __initStatic(){this.IGNORE_FILE=".gitignore.template"}getIg(e=this.ignoreTargetPath){const t=dt.join.call(void 0,e,this.ignoreFile);if(!ct.existsSync.call(void 0,t))return;const s=ct.readFileSync.call(void 0,t,"utf8").split("\n").map((e=>e.trim())).filter((e=>e&&!e.startsWith("#")));return(0,Gs.default)().add(s)}async copyFiles(e,t,s,o){const r=await ct.promises.readdir(e);await Promise.all(r.map((async r=>{const n=dt.join.call(void 0,e,r),i=dt.join.call(void 0,t,r);if(s&&s.ignores(r))return;qs.ensureDir(dt.dirname.call(void 0,i));if((await zs(n)).isDirectory())await this.copyFiles(n,i,s,o);else{if(o&&await o(n,i))return;await Us(n,i)}})))}copyPaths({sourcePath:e,targetPath:t,copyCallback:s}){qs.ensureDir(t);const o=this.getIg();return this.copyFiles(e,t,o,s)}}).__initStatic(),r),Js=c(ht(),1),Ks=class{constructor(){}isJSONFilePath(e){return e.endsWith(".json")||e.endsWith(".json.template")}isTemplateFilePath(e){return e.endsWith(".template")}getRealTemplateFilePath(e){return e.replace(".template","")}readFile(e){return ct.readFileSync.call(void 0,e,"utf-8")}readJSONFile(e){return JSON.parse(this.readFile(e))}writeFile(e,t){ct.writeFileSync.call(void 0,this.getRealTemplateFilePath(e),t,{encoding:"utf-8"})}replaceFile(e,t){let s=this.readFile(e);return Object.keys(t).forEach((e=>{const o=t[e];s=s.replace(new RegExp(`\\[TPL:${e}\\]`,"g"),"string"==typeof o?o:JSON.stringify(o))})),s}mergeJSONFile(e,t){const s=this.readJSONFile(e),o=(0,Js.default)(t,s);this.writeFile(e,JSON.stringify(o,null,2))}composeConfigFile(e,t,s){if(this.isTemplateFilePath(t)){const o=this.replaceFile(t,e);if(this.isJSONFilePath(t)&&this.isJSONFilePath(s)){const e=this.getRealTemplateFilePath(s);return ct.existsSync.call(void 0,e)?(this.mergeJSONFile(e,JSON.parse(o)),!0):(this.writeFile(e,o),!0)}return this.writeFile(s,o),!0}return!1}},Zs=["pack-app"],Qs=class{constructor(e){const t=s([e,"access",e=>e.options,"optionalAccess",e=>e.templateRootPath]);if(!t)throw new Error("template path not exit");if(!ct.existsSync.call(void 0,t))throw new Error("template path not exit");this.ora=Ws,this.context=new(0,At.FeScriptContext)(e),this.subPackages=["node-lib","react-app"],this.copyer=new Ys(dt.join.call(void 0,this.context.options.configsRootPath,"_common")),this.compose=new Ks}get logger(){return this.context.logger}async steps(e){try{return await Ot.default.prompt(e)}catch(e){throw e.isTtyError,this.logger.error(e),e}}async action({label:e,task:t}){let s=t();s instanceof Promise||(s=Promise.resolve(s));const o=e;return this.ora(s,o),s}isPackageTemplate(e){return Zs.includes(e)}async getGeneratorContext(){const e=(t=this.subPackages,s=Zs,[{type:"input",name:"projectName",message:"Project name",validate:e=>((e,t)=>"string"==typeof e&&""!==e.trim()||`${t} is required`)(e,"Project name")},{type:"list",name:"template",message:"Template name",choices:[...t,...s]}]);var t,s;const o=await this.steps(e);if(this.isPackageTemplate(o.template)){const e=function(e){return[{type:"checkbox",name:"subPackages",message:"Sub package names",choices:e}]}(this.subPackages),t=await this.steps(e);Object.assign(o,t)}return o.targetPath=dt.join.call(void 0,process.cwd(),o.projectName),o.releasePath=o.releasePath||"src",o}async generate(){const e=await this.getGeneratorContext();this.logger.debug("context is:",e,this.context.options.templateRootPath),e.subPackages?await this.action({label:"Generate Directories(subPackages)",task:async()=>{await this.generateTemplateDir(e),await this.generateSubPackages(e),await this.generateConfigs(e,e.targetPath,"_common")}}):await this.action({label:"Generate Directory",task:async()=>{await this.generateTemplateDir(e),await this.generateConfigs(e,e.targetPath,"_common"),await this.generateConfigs(e,e.targetPath,e.template)}})}async generateConfigs(e,t,s){const{configsRootPath:o,config:r}=this.context.options;r?await this.copyer.copyPaths({sourcePath:dt.join.call(void 0,o,s),targetPath:t,copyCallback:(t,s)=>(this.logger.debug("copyCallback",t,s),this.compose.composeConfigFile(e,t,s))}):this.logger.debug("no copy config files")}generateTemplateDir(e){return this.copyer.copyPaths({sourcePath:dt.join.call(void 0,this.context.options.templateRootPath,e.template),targetPath:e.targetPath})}async generateSubPackages(e){const{packagesNames:t="packages",subPackages:s=[],targetPath:o=""}=e,{templateRootPath:r}=this.context.options;for(const e of s){const s=dt.join.call(void 0,r,e),n=dt.join.call(void 0,o,t,e);this.logger.debug("copy sub package",s,n),await this.copyer.copyPaths({sourcePath:s,targetPath:n})}}},Xs="0.3.6",eo="Create a new app with a single command";(async function(){const{dryRun:e,verbose:t,...s}=function(){const e=new vt;return e.version(Xs,"-v, --version","Show version").description(eo).option("-d, --dry-run","Do not touch or write anything, but show the commands").option("-V, --verbose","Show more information").option("--config","Copy config files (default: true)",!0).option("--no-config","Do not copy config files"),e.parse(),e.opts()}(),o=__dirname,r=dt.join.call(void 0,o,"../templates"),n=dt.join.call(void 0,o,"../configs");ct.existsSync.call(void 0,r)||(console.error("Template is empty!"),process.exit(1)),ct.existsSync.call(void 0,n)||(console.error("Configs is empty!"),process.exit(1));const i=new Qs({dryRun:e,verbose:t,options:{...s,templateRootPath:r,configsRootPath:n}});await i.generate()})().catch((e=>{console.error(e),process.exit(1)}));
package/package.json CHANGED
@@ -1,22 +1,11 @@
1
1
  {
2
2
  "name": "@qlover/create-app",
3
- "version": "0.3.5",
4
- "type": "module",
3
+ "version": "0.3.6",
4
+ "description": "Create a new app with a single command",
5
5
  "private": false,
6
- "main": "./dist/index.cjs",
7
- "module": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- "./package.json": "./package.json",
11
- ".": {
12
- "types": "./dist/index.d.ts",
13
- "import": "./dist/index.js",
14
- "require": "./dist/index.cjs"
15
- }
16
- },
6
+ "type": "module",
17
7
  "files": [
18
8
  "dist",
19
- "bin",
20
9
  "configs",
21
10
  "templates",
22
11
  "package.json",
@@ -24,7 +13,7 @@
24
13
  "CHANGELOG.md"
25
14
  ],
26
15
  "bin": {
27
- "create-app": "bin/create-app.js"
16
+ "create-app": "dist/index.cjs"
28
17
  },
29
18
  "repository": {
30
19
  "type": "git",
@@ -43,21 +32,18 @@
43
32
  "access": "public"
44
33
  },
45
34
  "devDependencies": {
46
- "@qlover/env-loader": "0.3.0"
47
- },
48
- "dependencies": {
49
35
  "commander": "^13.1.0",
50
36
  "ignore": "^7.0.3",
51
- "inquirer": "^12.3.2",
52
- "ora": "^8.1.1",
53
37
  "lodash": "^4.17.21",
54
- "@qlover/scripts-context": "0.2.1",
55
- "@qlover/logger": "0.1.1",
56
- "@qlover/fe-corekit": "1.4.0"
38
+ "ora": "^8.1.1",
39
+ "@qlover/logger": "0.1.1"
40
+ },
41
+ "dependencies": {
42
+ "inquirer": "^12.3.2",
43
+ "@qlover/scripts-context": "0.2.1"
57
44
  },
58
45
  "scripts": {
59
- "build": "rollup -c",
60
- "create:app:build": "npm run build && npm run create:app",
61
- "create:app": "node ./bin/create-app.js"
46
+ "build": "tsup",
47
+ "create:app": "node ./dist/index.cjs"
62
48
  }
63
49
  }
package/bin/create-app.js DELETED
@@ -1,66 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { fileURLToPath } from 'url';
4
- import { dirname, join } from 'path';
5
- import { Generator } from '../dist/es/index.js';
6
- import { existsSync, readFileSync } from 'fs';
7
- import { Command } from 'commander';
8
-
9
- const __dirname = dirname(fileURLToPath(import.meta.url));
10
- const pkg = JSON.parse(
11
- readFileSync(join(__dirname, '../package.json'), 'utf-8')
12
- );
13
-
14
- function programArgs() {
15
- const program = new Command();
16
-
17
- program.version(pkg.version, '-v, --version', 'Show version');
18
-
19
- program
20
- .option(
21
- '-d, --dry-run',
22
- 'Do not touch or write anything, but show the commands'
23
- )
24
- .option('-V, --verbose', 'Show more information')
25
- .option('--config', 'Copy config files (default: true)', true)
26
- .option('--no-config', 'Do not copy config files');
27
-
28
- // parse arguments
29
- program.parse();
30
-
31
- return program.opts();
32
- }
33
-
34
- async function main() {
35
- const { dryRun, verbose, ...commandOptions } = programArgs();
36
-
37
- const templateRootPath = join(__dirname, '../templates');
38
- const configsRootPath = join(__dirname, '../configs');
39
-
40
- if (!existsSync(templateRootPath)) {
41
- console.error('Template is empty!');
42
- process.exit(1);
43
- }
44
-
45
- if (!existsSync(configsRootPath)) {
46
- console.error('Configs is empty!');
47
- process.exit(1);
48
- }
49
-
50
- const generator = new Generator({
51
- dryRun,
52
- verbose,
53
- options: {
54
- ...commandOptions,
55
- templateRootPath,
56
- configsRootPath
57
- }
58
- });
59
-
60
- await generator.generate();
61
- }
62
-
63
- main().catch((err) => {
64
- console.error(err);
65
- process.exit(1);
66
- });
package/dist/index.d.ts DELETED
@@ -1,113 +0,0 @@
1
- import { LoggerInterface } from '@qlover/logger';
2
- import { FeScriptContext } from '@qlover/scripts-context';
3
- import { DistinctQuestion } from 'inquirer';
4
- import ignore from 'ignore';
5
-
6
- type GeneratorPrompt = DistinctQuestion;
7
- type GeneratorOptions = {
8
- prompts?: GeneratorPrompt[];
9
- /**
10
- * template root path
11
- */
12
- templateRootPath: string;
13
- /**
14
- * configs root path
15
- */
16
- configsRootPath: string;
17
- /**
18
- * whether to copy config files
19
- */
20
- config?: boolean;
21
- };
22
- interface GeneratorContext extends GeneratorOptions {
23
- /**
24
- * project name
25
- */
26
- projectName: string;
27
- /**
28
- * choose template name
29
- *
30
- * mayby is pack-app
31
- */
32
- template: string;
33
- /**
34
- * choose sub packages
35
- *
36
- * mayby is ['node-lib', 'react-app']
37
- */
38
- subPackages?: string[];
39
- /**
40
- * @default `packages`
41
- */
42
- packagesNames?: string;
43
- /**
44
- * Generated project path
45
- * @default `./`
46
- */
47
- targetPath?: string;
48
- /**
49
- * release path
50
- * @default `src`
51
- */
52
- releasePath?: string;
53
- }
54
- type TaskOptions = {
55
- templateFiles: TemplateFile[];
56
- result: GeneratorContext;
57
- };
58
- type TemplateFile = {
59
- path: string;
60
- content: string;
61
- };
62
-
63
- declare class Generator {
64
- private ora;
65
- protected context: FeScriptContext<GeneratorOptions>;
66
- private subPackages;
67
- private copyer;
68
- private compose;
69
- constructor(context: Partial<FeScriptContext<GeneratorOptions>>);
70
- get logger(): LoggerInterface;
71
- steps(prompts: GeneratorPrompt[]): Promise<GeneratorContext>;
72
- action({ label, task }: {
73
- label: string;
74
- task: (() => Promise<unknown>) | (() => unknown);
75
- }): Promise<unknown>;
76
- private isPackageTemplate;
77
- private getGeneratorContext;
78
- generate(): Promise<void>;
79
- generateConfigs(context: GeneratorContext, targetPath: string, configName: string): Promise<void>;
80
- generateTemplateDir(context: GeneratorContext): Promise<void>;
81
- generateSubPackages(context: GeneratorContext): Promise<void>;
82
- }
83
-
84
- declare const validRequiredString: (value: string, key: string) => string | true;
85
- declare function createDefaultPrompts(templates: string[], packages: string[]): GeneratorPrompt[];
86
- declare function createPackagePrompts(templates: string[]): GeneratorPrompt[];
87
-
88
- type CopyCallback = (sourceFilePath: string, targetFilePath: string) => boolean | Promise<boolean>;
89
- declare class Copyer {
90
- private readonly ignoreTargetPath;
91
- private readonly ignoreFile;
92
- static IGNORE_FILE: string;
93
- constructor(ignoreTargetPath: string, ignoreFile?: string);
94
- getIg(targetDir?: string): ignore.Ignore | undefined;
95
- /**
96
- * Asynchronously copy files from source to target directory.
97
- * @param {string} sourcePath - Source directory.
98
- * @param {string} targetDir - Target directory.
99
- * @param {ignore.Ignore} ig - Ignore rules.
100
- * @returns {Promise<void>} - A promise that resolves when the copy is complete.
101
- * @example
102
- * await copyer.copyFilesPromise('src', 'dest', ignoreInstance);
103
- */
104
- copyFiles(sourcePath: string, targetDir: string, ig?: ignore.Ignore, copyCallback?: CopyCallback): Promise<void>;
105
- copyPaths({ sourcePath, targetPath, copyCallback }: {
106
- sourcePath: string;
107
- targetPath: string;
108
- copyCallback?: CopyCallback;
109
- }): Promise<void>;
110
- }
111
-
112
- export { Copyer, Generator, createDefaultPrompts, createPackagePrompts, validRequiredString };
113
- export type { CopyCallback, GeneratorContext, GeneratorOptions, GeneratorPrompt, TaskOptions, TemplateFile };
package/dist/index.js DELETED
@@ -1 +0,0 @@
1
- import{FeScriptContext as t}from"@qlover/scripts-context";import r from"inquirer";import{join as e,dirname as n}from"path";import{oraPromise as i}from"ora";import{existsSync as o,mkdirSync as u,readFileSync as a,promises as c,writeFileSync as f}from"fs";import s from"ignore";const l=(t,r)=>"string"==typeof t&&""!==t.trim()||`${r} is required`;function p(t,r){return[{type:"input",name:"projectName",message:"Project name",validate:t=>l(t,"Project name")},{type:"list",name:"template",message:"Template name",choices:[...t,...r]}]}function h(t){return[{type:"checkbox",name:"subPackages",message:"Sub package names",choices:t}]}class v{static ensureDir(t){o(t)||u(t,{recursive:!0})}}const{copyFile:g,stat:y}=c;class b{ignoreTargetPath;ignoreFile;static IGNORE_FILE=".gitignore.template";constructor(t,r=b.IGNORE_FILE){this.ignoreTargetPath=t,this.ignoreFile=r}getIg(t=this.ignoreTargetPath){const r=e(t,this.ignoreFile);if(!o(r))return;const n=a(r,"utf8").split("\n").map((t=>t.trim())).filter((t=>t&&!t.startsWith("#")));return s().add(n)}async copyFiles(t,r,i,o){const u=await c.readdir(t);await Promise.all(u.map((async u=>{const a=e(t,u),c=e(r,u);if(i&&i.ignores(u))return;v.ensureDir(n(c));if((await y(a)).isDirectory())await this.copyFiles(a,c,i,o);else{if(o&&await o(a,c))return;await g(a,c)}})))}copyPaths({sourcePath:t,targetPath:r,copyCallback:e}){v.ensureDir(r);const n=this.getIg();return this.copyFiles(t,r,n,e)}}var _,d,m,j,P,w,O,F,x,k,S,T,A,z,N,R,C,E,D,I,J,$,G,U,q,B,L,M,W,V,H,K,Q,X,Y,Z,tt,rt,et,nt,it,ot,ut,at,ct,ft,st,lt,pt,ht,vt,gt,yt,bt,_t,dt,mt,jt,Pt,wt,Ot,Ft,xt,kt,St,Tt,At,zt,Nt,Rt,Ct,Et,Dt,It,Jt,$t,Gt,Ut,qt,Bt,Lt,Mt,Wt,Vt,Ht,Kt,Qt,Xt,Yt,Zt,tr,rr,er,nr,ir,or,ur,ar,cr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function fr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function sr(){if(d)return _;return d=1,_=function(){this.__data__=[],this.size=0}}function lr(){if(j)return m;return j=1,m=function(t,r){return t===r||t!=t&&r!=r}}function pr(){if(w)return P;w=1;var t=lr();return P=function(r,e){for(var n=r.length;n--;)if(t(r[n][0],e))return n;return-1}}function hr(){if(F)return O;F=1;var t=pr(),r=Array.prototype.splice;return O=function(e){var n=this.__data__,i=t(n,e);return!(i<0)&&(i==n.length-1?n.pop():r.call(n,i,1),--this.size,!0)}}function vr(){if(k)return x;k=1;var t=pr();return x=function(r){var e=this.__data__,n=t(e,r);return n<0?void 0:e[n][1]}}function gr(){if(T)return S;T=1;var t=pr();return S=function(r){return t(this.__data__,r)>-1}}function yr(){if(z)return A;z=1;var t=pr();return A=function(r,e){var n=this.__data__,i=t(n,r);return i<0?(++this.size,n.push([r,e])):n[i][1]=e,this}}function br(){if(R)return N;R=1;var t=sr(),r=hr(),e=vr(),n=gr(),i=yr();function o(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=e,o.prototype.has=n,o.prototype.set=i,N=o}function _r(){if(E)return C;E=1;var t=br();return C=function(){this.__data__=new t,this.size=0}}function dr(){if(I)return D;return I=1,D=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e}}function mr(){if($)return J;return $=1,J=function(t){return this.__data__.get(t)}}function jr(){if(U)return G;return U=1,G=function(t){return this.__data__.has(t)}}function Pr(){if(B)return q;B=1;var t="object"==typeof cr&&cr&&cr.Object===Object&&cr;return q=t}function wr(){if(M)return L;M=1;var t=Pr(),r="object"==typeof self&&self&&self.Object===Object&&self,e=t||r||Function("return this")();return L=e}function Or(){if(V)return W;V=1;var t=wr().Symbol;return W=t}function Fr(){if(K)return H;K=1;var t=Or(),r=Object.prototype,e=r.hasOwnProperty,n=r.toString,i=t?t.toStringTag:void 0;return H=function(t){var r=e.call(t,i),o=t[i];try{t[i]=void 0;var u=!0}catch(t){}var a=n.call(t);return u&&(r?t[i]=o:delete t[i]),a}}function xr(){if(X)return Q;X=1;var t=Object.prototype.toString;return Q=function(r){return t.call(r)}}function kr(){if(Z)return Y;Z=1;var t=Or(),r=Fr(),e=xr(),n=t?t.toStringTag:void 0;return Y=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":n&&n in Object(t)?r(t):e(t)}}function Sr(){if(rt)return tt;return rt=1,tt=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}}function Tr(){if(nt)return et;nt=1;var t=kr(),r=Sr();return et=function(e){if(!r(e))return!1;var n=t(e);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}}function Ar(){if(ot)return it;ot=1;var t=wr()["__core-js_shared__"];return it=t}function zr(){if(at)return ut;at=1;var t,r=Ar(),e=(t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return ut=function(t){return!!e&&e in t}}function Nr(){if(ft)return ct;ft=1;var t=Function.prototype.toString;return ct=function(r){if(null!=r){try{return t.call(r)}catch(t){}try{return r+""}catch(t){}}return""}}function Rr(){if(lt)return st;lt=1;var t=Tr(),r=zr(),e=Sr(),n=Nr(),i=/^\[object .+?Constructor\]$/,o=Function.prototype,u=Object.prototype,a=o.toString,c=u.hasOwnProperty,f=RegExp("^"+a.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return st=function(o){return!(!e(o)||r(o))&&(t(o)?f:i).test(n(o))}}function Cr(){if(ht)return pt;return ht=1,pt=function(t,r){return null==t?void 0:t[r]}}function Er(){if(gt)return vt;gt=1;var t=Rr(),r=Cr();return vt=function(e,n){var i=r(e,n);return t(i)?i:void 0}}function Dr(){if(bt)return yt;bt=1;var t=Er()(wr(),"Map");return yt=t}function Ir(){if(dt)return _t;dt=1;var t=Er()(Object,"create");return _t=t}function Jr(){if(jt)return mt;jt=1;var t=Ir();return mt=function(){this.__data__=t?t(null):{},this.size=0}}function $r(){if(wt)return Pt;return wt=1,Pt=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}}function Gr(){if(Ft)return Ot;Ft=1;var t=Ir(),r=Object.prototype.hasOwnProperty;return Ot=function(e){var n=this.__data__;if(t){var i=n[e];return"__lodash_hash_undefined__"===i?void 0:i}return r.call(n,e)?n[e]:void 0}}function Ur(){if(kt)return xt;kt=1;var t=Ir(),r=Object.prototype.hasOwnProperty;return xt=function(e){var n=this.__data__;return t?void 0!==n[e]:r.call(n,e)}}function qr(){if(Tt)return St;Tt=1;var t=Ir();return St=function(r,e){var n=this.__data__;return this.size+=this.has(r)?0:1,n[r]=t&&void 0===e?"__lodash_hash_undefined__":e,this}}function Br(){if(zt)return At;zt=1;var t=Jr(),r=$r(),e=Gr(),n=Ur(),i=qr();function o(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=e,o.prototype.has=n,o.prototype.set=i,At=o}function Lr(){if(Rt)return Nt;Rt=1;var t=Br(),r=br(),e=Dr();return Nt=function(){this.size=0,this.__data__={hash:new t,map:new(e||r),string:new t}}}function Mr(){if(Et)return Ct;return Et=1,Ct=function(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t}}function Wr(){if(It)return Dt;It=1;var t=Mr();return Dt=function(r,e){var n=r.__data__;return t(e)?n["string"==typeof e?"string":"hash"]:n.map}}function Vr(){if($t)return Jt;$t=1;var t=Wr();return Jt=function(r){var e=t(this,r).delete(r);return this.size-=e?1:0,e}}function Hr(){if(Ut)return Gt;Ut=1;var t=Wr();return Gt=function(r){return t(this,r).get(r)}}function Kr(){if(Bt)return qt;Bt=1;var t=Wr();return qt=function(r){return t(this,r).has(r)}}function Qr(){if(Mt)return Lt;Mt=1;var t=Wr();return Lt=function(r,e){var n=t(this,r),i=n.size;return n.set(r,e),this.size+=n.size==i?0:1,this}}function Xr(){if(Vt)return Wt;Vt=1;var t=Lr(),r=Vr(),e=Hr(),n=Kr(),i=Qr();function o(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=e,o.prototype.has=n,o.prototype.set=i,Wt=o}function Yr(){if(Kt)return Ht;Kt=1;var t=br(),r=Dr(),e=Xr();return Ht=function(n,i){var o=this.__data__;if(o instanceof t){var u=o.__data__;if(!r||u.length<199)return u.push([n,i]),this.size=++o.size,this;o=this.__data__=new e(u)}return o.set(n,i),this.size=o.size,this}}function Zr(){if(Xt)return Qt;Xt=1;var t=br(),r=_r(),e=dr(),n=mr(),i=jr(),o=Yr();function u(r){var e=this.__data__=new t(r);this.size=e.size}return u.prototype.clear=r,u.prototype.delete=e,u.prototype.get=n,u.prototype.has=i,u.prototype.set=o,Qt=u}function te(){if(Zt)return Yt;Zt=1;var t=Er(),r=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch(t){}}();return Yt=r}function re(){if(rr)return tr;rr=1;var t=te();return tr=function(r,e,n){"__proto__"==e&&t?t(r,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):r[e]=n}}function ee(){if(nr)return er;nr=1;var t=re(),r=lr();return er=function(e,n,i){(void 0!==i&&!r(e[n],i)||void 0===i&&!(n in e))&&t(e,n,i)}}function ne(){if(or)return ir;return or=1,ir=function(t){return function(r,e,n){for(var i=-1,o=Object(r),u=n(r),a=u.length;a--;){var c=u[t?a:++i];if(!1===e(o[c],c,o))break}return r}}}function ie(){if(ar)return ur;ar=1;var t=ne()();return ur=t}var oe,ue,ae,ce,fe,se,le,pe,he,ve,ge,ye,be,_e,de,me,je,Pe,we,Oe,Fe,xe,ke,Se,Te,Ae,ze,Ne,Re,Ce,Ee,De,Ie,Je={exports:{}};function $e(){return oe||(oe=1,t=Je,r=Je.exports,e=wr(),n=r&&!r.nodeType&&r,i=n&&t&&!t.nodeType&&t,o=i&&i.exports===n?e.Buffer:void 0,u=o?o.allocUnsafe:void 0,t.exports=function(t,r){if(r)return t.slice();var e=t.length,n=u?u(e):new t.constructor(e);return t.copy(n),n}),Je.exports;var t,r,e,n,i,o,u}function Ge(){if(ae)return ue;ae=1;var t=wr().Uint8Array;return ue=t}function Ue(){if(fe)return ce;fe=1;var t=Ge();return ce=function(r){var e=new r.constructor(r.byteLength);return new t(e).set(new t(r)),e}}function qe(){if(le)return se;le=1;var t=Ue();return se=function(r,e){var n=e?t(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.length)}}function Be(){if(he)return pe;return he=1,pe=function(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r}}function Le(){if(ge)return ve;ge=1;var t=Sr(),r=Object.create,e=function(){function e(){}return function(n){if(!t(n))return{};if(r)return r(n);e.prototype=n;var i=new e;return e.prototype=void 0,i}}();return ve=e}function Me(){if(be)return ye;return be=1,ye=function(t,r){return function(e){return t(r(e))}}}function We(){if(de)return _e;de=1;var t=Me()(Object.getPrototypeOf,Object);return _e=t}function Ve(){if(je)return me;je=1;var t=Object.prototype;return me=function(r){var e=r&&r.constructor;return r===("function"==typeof e&&e.prototype||t)}}function He(){if(we)return Pe;we=1;var t=Le(),r=We(),e=Ve();return Pe=function(n){return"function"!=typeof n.constructor||e(n)?{}:t(r(n))}}function Ke(){if(Fe)return Oe;return Fe=1,Oe=function(t){return null!=t&&"object"==typeof t}}function Qe(){if(ke)return xe;ke=1;var t=kr(),r=Ke();return xe=function(e){return r(e)&&"[object Arguments]"==t(e)}}function Xe(){if(Te)return Se;Te=1;var t=Qe(),r=Ke(),e=Object.prototype,n=e.hasOwnProperty,i=e.propertyIsEnumerable,o=t(function(){return arguments}())?t:function(t){return r(t)&&n.call(t,"callee")&&!i.call(t,"callee")};return Se=o}function Ye(){if(ze)return Ae;ze=1;var t=Array.isArray;return Ae=t}function Ze(){if(Re)return Ne;Re=1;return Ne=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function tn(){if(Ee)return Ce;Ee=1;var t=Tr(),r=Ze();return Ce=function(e){return null!=e&&r(e.length)&&!t(e)}}function rn(){if(Ie)return De;Ie=1;var t=tn(),r=Ke();return De=function(e){return r(e)&&t(e)}}var en,nn,on,un,an,cn,fn,sn,ln,pn={exports:{}};function hn(){if(nn)return en;return nn=1,en=function(){return!1}}function vn(){return on||(on=1,function(t,r){var e=wr(),n=hn(),i=r&&!r.nodeType&&r,o=i&&t&&!t.nodeType&&t,u=o&&o.exports===i?e.Buffer:void 0,a=(u?u.isBuffer:void 0)||n;t.exports=a}(pn,pn.exports)),pn.exports}function gn(){if(an)return un;an=1;var t=kr(),r=We(),e=Ke(),n=Function.prototype,i=Object.prototype,o=n.toString,u=i.hasOwnProperty,a=o.call(Object);return un=function(n){if(!e(n)||"[object Object]"!=t(n))return!1;var i=r(n);if(null===i)return!0;var c=u.call(i,"constructor")&&i.constructor;return"function"==typeof c&&c instanceof c&&o.call(c)==a}}function yn(){if(fn)return cn;fn=1;var t=kr(),r=Ze(),e=Ke(),n={};return n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0,n["[object Arguments]"]=n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1,cn=function(i){return e(i)&&r(i.length)&&!!n[t(i)]}}function bn(){if(ln)return sn;return ln=1,sn=function(t){return function(r){return t(r)}}}var _n,dn,mn,jn,Pn,wn,On,Fn,xn,kn,Sn,Tn,An,zn,Nn,Rn,Cn,En,Dn,In,Jn,$n,Gn,Un,qn,Bn,Ln,Mn,Wn,Vn,Hn,Kn,Qn,Xn,Yn,Zn,ti,ri,ei,ni,ii,oi,ui,ai,ci,fi,si,li,pi,hi={exports:{}};function vi(){return _n||(_n=1,t=hi,r=hi.exports,e=Pr(),n=r&&!r.nodeType&&r,i=n&&t&&!t.nodeType&&t,o=i&&i.exports===n&&e.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}(),t.exports=u),hi.exports;var t,r,e,n,i,o,u}function gi(){if(mn)return dn;mn=1;var t=yn(),r=bn(),e=vi(),n=e&&e.isTypedArray,i=n?r(n):t;return dn=i}function yi(){if(Pn)return jn;return Pn=1,jn=function(t,r){if(("constructor"!==r||"function"!=typeof t[r])&&"__proto__"!=r)return t[r]}}function bi(){if(On)return wn;On=1;var t=re(),r=lr(),e=Object.prototype.hasOwnProperty;return wn=function(n,i,o){var u=n[i];e.call(n,i)&&r(u,o)&&(void 0!==o||i in n)||t(n,i,o)}}function _i(){if(xn)return Fn;xn=1;var t=bi(),r=re();return Fn=function(e,n,i,o){var u=!i;i||(i={});for(var a=-1,c=n.length;++a<c;){var f=n[a],s=o?o(i[f],e[f],f,i,e):void 0;void 0===s&&(s=e[f]),u?r(i,f,s):t(i,f,s)}return i}}function di(){if(Sn)return kn;return Sn=1,kn=function(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n}}function mi(){if(An)return Tn;An=1;var t=/^(?:0|[1-9]\d*)$/;return Tn=function(r,e){var n=typeof r;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&t.test(r))&&r>-1&&r%1==0&&r<e}}function ji(){if(Nn)return zn;Nn=1;var t=di(),r=Xe(),e=Ye(),n=vn(),i=mi(),o=gi(),u=Object.prototype.hasOwnProperty;return zn=function(a,c){var f=e(a),s=!f&&r(a),l=!f&&!s&&n(a),p=!f&&!s&&!l&&o(a),h=f||s||l||p,v=h?t(a.length,String):[],g=v.length;for(var y in a)!c&&!u.call(a,y)||h&&("length"==y||l&&("offset"==y||"parent"==y)||p&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||i(y,g))||v.push(y);return v}}function Pi(){if(Cn)return Rn;return Cn=1,Rn=function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}}function wi(){if(Dn)return En;Dn=1;var t=Sr(),r=Ve(),e=Pi(),n=Object.prototype.hasOwnProperty;return En=function(i){if(!t(i))return e(i);var o=r(i),u=[];for(var a in i)("constructor"!=a||!o&&n.call(i,a))&&u.push(a);return u}}function Oi(){if(Jn)return In;Jn=1;var t=ji(),r=wi(),e=tn();return In=function(n){return e(n)?t(n,!0):r(n)}}function Fi(){if(Gn)return $n;Gn=1;var t=_i(),r=Oi();return $n=function(e){return t(e,r(e))}}function xi(){if(qn)return Un;qn=1;var t=ee(),r=$e(),e=qe(),n=Be(),i=He(),o=Xe(),u=Ye(),a=rn(),c=vn(),f=Tr(),s=Sr(),l=gn(),p=gi(),h=yi(),v=Fi();return Un=function(g,y,b,_,d,m,j){var P=h(g,b),w=h(y,b),O=j.get(w);if(O)t(g,b,O);else{var F=m?m(P,w,b+"",g,y,j):void 0,x=void 0===F;if(x){var k=u(w),S=!k&&c(w),T=!k&&!S&&p(w);F=w,k||S||T?u(P)?F=P:a(P)?F=n(P):S?(x=!1,F=r(w,!0)):T?(x=!1,F=e(w,!0)):F=[]:l(w)||o(w)?(F=P,o(P)?F=v(P):s(P)&&!f(P)||(F=i(w))):x=!1}x&&(j.set(w,F),d(F,w,_,m,j),j.delete(w)),t(g,b,F)}}}function ki(){if(Ln)return Bn;Ln=1;var t=Zr(),r=ee(),e=ie(),n=xi(),i=Sr(),o=Oi(),u=yi();return Bn=function a(c,f,s,l,p){c!==f&&e(f,(function(e,o){if(p||(p=new t),i(e))n(c,f,o,s,a,l,p);else{var h=l?l(u(c,o),e,o+"",c,f,p):void 0;void 0===h&&(h=e),r(c,o,h)}}),o)},Bn}function Si(){if(Wn)return Mn;return Wn=1,Mn=function(t){return t}}function Ti(){if(Hn)return Vn;return Hn=1,Vn=function(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}}function Ai(){if(Qn)return Kn;Qn=1;var t=Ti(),r=Math.max;return Kn=function(e,n,i){return n=r(void 0===n?e.length-1:n,0),function(){for(var o=arguments,u=-1,a=r(o.length-n,0),c=Array(a);++u<a;)c[u]=o[n+u];u=-1;for(var f=Array(n+1);++u<n;)f[u]=o[u];return f[n]=i(c),t(e,this,f)}},Kn}function zi(){if(Yn)return Xn;return Yn=1,Xn=function(t){return function(){return t}}}function Ni(){if(ti)return Zn;ti=1;var t=zi(),r=te();return Zn=r?function(e,n){return r(e,"toString",{configurable:!0,enumerable:!1,value:t(n),writable:!0})}:Si()}function Ri(){if(ei)return ri;ei=1;var t=Date.now;return ri=function(r){var e=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++e>=800)return arguments[0]}else e=0;return r.apply(void 0,arguments)}},ri}function Ci(){if(ii)return ni;ii=1;var t=Ni(),r=Ri()(t);return ni=r}function Ei(){if(ui)return oi;ui=1;var t=Si(),r=Ai(),e=Ci();return oi=function(n,i){return e(r(n,i,t),n+"")}}function Di(){if(ci)return ai;ci=1;var t=lr(),r=tn(),e=mi(),n=Sr();return ai=function(i,o,u){if(!n(u))return!1;var a=typeof o;return!!("number"==a?r(u)&&e(o,u.length):"string"==a&&o in u)&&t(u[o],i)}}function Ii(){if(si)return fi;si=1;var t=Ei(),r=Di();return fi=function(e){return t((function(t,n){var i=-1,o=n.length,u=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(u=e.length>3&&"function"==typeof u?(o--,u):void 0,a&&r(n[0],n[1],a)&&(u=o<3?void 0:u,o=1),t=Object(t);++i<o;){var c=n[i];c&&e(t,c,i,u)}return t}))}}function Ji(){if(pi)return li;pi=1;var t=ki(),r=Ii()((function(r,e,n){t(r,e,n)}));return li=r}var $i=fr(Ji());class Gi{constructor(){}isJSONFilePath(t){return t.endsWith(".json")||t.endsWith(".json.template")}isTemplateFilePath(t){return t.endsWith(".template")}getRealTemplateFilePath(t){return t.replace(".template","")}readFile(t){return a(t,"utf-8")}readJSONFile(t){return JSON.parse(this.readFile(t))}writeFile(t,r){f(this.getRealTemplateFilePath(t),r,{encoding:"utf-8"})}replaceFile(t,r){let e=this.readFile(t);return Object.keys(r).forEach((t=>{const n=r[t];e=e.replace(new RegExp(`\\[TPL:${t}\\]`,"g"),"string"==typeof n?n:JSON.stringify(n))})),e}mergeJSONFile(t,r){const e=this.readJSONFile(t),n=$i(r,e);this.writeFile(t,JSON.stringify(n,null,2))}composeConfigFile(t,r,e){if(this.isTemplateFilePath(r)){const n=this.replaceFile(r,t);if(this.isJSONFilePath(r)&&this.isJSONFilePath(e)){const t=this.getRealTemplateFilePath(e);return o(t)?(this.mergeJSONFile(t,JSON.parse(n)),!0):(this.writeFile(t,n),!0)}return this.writeFile(e,n),!0}return!1}}const Ui=["pack-app"];class qi{ora;context;subPackages;copyer;compose;constructor(r){const n=r.options?.templateRootPath;if(!n)throw new Error("template path not exit");if(!o(n))throw new Error("template path not exit");this.ora=i,this.context=new t(r),this.subPackages=["node-lib","react-app"],this.copyer=new b(e(this.context.options.configsRootPath,"_common")),this.compose=new Gi}get logger(){return this.context.logger}async steps(t){try{return await r.prompt(t)}catch(t){throw this.logger.error(t),t}}async action({label:t,task:r}){let e=r();e instanceof Promise||(e=Promise.resolve(e));const n=t;return this.ora(e,n),e}isPackageTemplate(t){return Ui.includes(t)}async getGeneratorContext(){const t=p(this.subPackages,Ui),r=await this.steps(t);if(this.isPackageTemplate(r.template)){const t=h(this.subPackages),e=await this.steps(t);Object.assign(r,e)}return r.targetPath=e(process.cwd(),r.projectName),r.releasePath=r.releasePath||"src",r}async generate(){const t=await this.getGeneratorContext();this.logger.debug("context is:",t,this.context.options.templateRootPath),t.subPackages?await this.action({label:"Generate Directories(subPackages)",task:async()=>{await this.generateTemplateDir(t),await this.generateSubPackages(t),await this.generateConfigs(t,t.targetPath,"_common")}}):await this.action({label:"Generate Directory",task:async()=>{await this.generateTemplateDir(t),await this.generateConfigs(t,t.targetPath,"_common"),await this.generateConfigs(t,t.targetPath,t.template)}})}async generateConfigs(t,r,n){const{configsRootPath:i,config:o}=this.context.options;o?await this.copyer.copyPaths({sourcePath:e(i,n),targetPath:r,copyCallback:(r,e)=>(this.logger.debug("copyCallback",r,e),this.compose.composeConfigFile(t,r,e))}):this.logger.debug("no copy config files")}generateTemplateDir(t){return this.copyer.copyPaths({sourcePath:e(this.context.options.templateRootPath,t.template),targetPath:t.targetPath})}async generateSubPackages(t){const{packagesNames:r="packages",subPackages:n=[],targetPath:i=""}=t,{templateRootPath:o}=this.context.options;for(const t of n){const n=e(o,t),u=e(i,r,t);this.logger.debug("copy sub package",n,u),await this.copyer.copyPaths({sourcePath:n,targetPath:u})}}}export{b as Copyer,qi as Generator,p as createDefaultPrompts,h as createPackagePrompts,l as validRequiredString};