aronrepo 1.3.4 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/index CHANGED
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
- var xi=Object.create;var kt=Object.defineProperty;var bi=Object.getOwnPropertyDescriptor;var Si=Object.getOwnPropertyNames;var wi=Object.getPrototypeOf,vi=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ei=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Si(t))!vi.call(e,i)&&i!==n&&kt(e,i,{get:()=>t[i],enumerable:!(r=bi(t,i))||r.enumerable});return e};var y=(e,t,n)=>(n=e!=null?xi(wi(e)):{},Ei(t||!e||!e.__esModule?kt(n,"default",{value:e,enumerable:!0}):n,e));var Ut=v((Ca,Dt)=>{Dt.exports=Mt;Mt.sync=Ii;var Ft=require("fs");function Pi(e,t){var n=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function Lt(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:Pi(t,n)}function Mt(e,t,n){Ft.stat(e,function(r,i){n(r,r?!1:Lt(i,e,t))})}function Ii(e,t){return Lt(Ft.statSync(e),e,t)}});var Kt=v((Na,Ht)=>{Ht.exports=Wt;Wt.sync=Oi;var qt=require("fs");function Wt(e,t,n){qt.stat(e,function(r,i){n(r,r?!1:zt(i,t))})}function Oi(e,t){return zt(qt.statSync(e),t)}function zt(e,t){return e.isFile()&&Ai(e,t)}function Ai(e,t){var n=e.mode,r=e.uid,i=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),s=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),f=parseInt("001",8),l=a|c,u=n&f||n&c&&i===s||n&a&&r===o||n&l&&o===0;return u}});var Yt=v((Ga,Xt)=>{var ka=require("fs"),ge;process.platform==="win32"||global.TESTING_WINDOWS?ge=Ut():ge=Kt();Xt.exports=Fe;Fe.sync=ji;function Fe(e,t,n){if(typeof t=="function"&&(n=t,t={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,i){Fe(e,t||{},function(o,s){o?i(o):r(s)})})}ge(e,t||{},function(r,i){r&&(r.code==="EACCES"||t&&t.ignoreErrors)&&(r=null,i=!1),n(r,i)})}function ji(e,t){try{return ge.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var nn=v((Ra,tn)=>{var W=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Vt=require("path"),Ci=W?";":":",Jt=Yt(),Zt=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Qt=(e,t)=>{let n=t.colon||Ci,r=e.match(/\//)||W&&e.match(/\\/)?[""]:[...W?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],i=W?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=W?i.split(n):[""];return W&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:r,pathExt:o,pathExtExe:i}},en=(e,t,n)=>{typeof t=="function"&&(n=t,t={}),t||(t={});let{pathEnv:r,pathExt:i,pathExtExe:o}=Qt(e,t),s=[],a=f=>new Promise((l,u)=>{if(f===r.length)return t.all&&s.length?l(s):u(Zt(e));let p=r[f],d=/^".*"$/.test(p)?p.slice(1,-1):p,m=Vt.join(d,e),g=!d&&/^\.[\\\/]/.test(e)?e.slice(0,2)+m:m;l(c(g,f,0))}),c=(f,l,u)=>new Promise((p,d)=>{if(u===i.length)return p(a(l+1));let m=i[u];Jt(f+m,{pathExt:o},(g,h)=>{if(!g&&h)if(t.all)s.push(f+m);else return p(f+m);return p(c(f,l,u+1))})});return n?a(0).then(f=>n(null,f),n):a(0)},Ni=(e,t)=>{t=t||{};let{pathEnv:n,pathExt:r,pathExtExe:i}=Qt(e,t),o=[];for(let s=0;s<n.length;s++){let a=n[s],c=/^".*"$/.test(a)?a.slice(1,-1):a,f=Vt.join(c,e),l=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;for(let u=0;u<r.length;u++){let p=l+r[u];try{if(Jt.sync(p,{pathExt:i}))if(t.all)o.push(p);else return p}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw Zt(e)};tn.exports=en;en.sync=Ni});var on=v(($a,Le)=>{"use strict";var rn=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};Le.exports=rn;Le.exports.default=rn});var un=v((Ba,cn)=>{"use strict";var sn=require("path"),ki=nn(),Gi=on();function an(e,t){let n=e.options.env||process.env,r=process.cwd(),i=e.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let s;try{s=ki.sync(e.command,{path:n[Gi({env:n})],pathExt:t?sn.delimiter:void 0})}catch{}finally{o&&process.chdir(r)}return s&&(s=sn.resolve(i?e.options.cwd:"",s)),s}function Ri(e){return an(e)||an(e,!0)}cn.exports=Ri});var fn=v((Fa,De)=>{"use strict";var Me=/([()\][%!^"`<>&|;, *?])/g;function $i(e){return e=e.replace(Me,"^$1"),e}function Bi(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(Me,"^$1"),t&&(e=e.replace(Me,"^$1")),e}De.exports.command=$i;De.exports.argument=Bi});var dn=v((La,ln)=>{"use strict";ln.exports=/^#!(.*)/});var mn=v((Ma,pn)=>{"use strict";var Fi=dn();pn.exports=(e="")=>{let t=e.match(Fi);if(!t)return null;let[n,r]=t[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return i==="env"?r:r?`${i} ${r}`:i}});var hn=v((Da,gn)=>{"use strict";var Ue=require("fs"),Li=mn();function Mi(e){let n=Buffer.alloc(150),r;try{r=Ue.openSync(e,"r"),Ue.readSync(r,n,0,150,0),Ue.closeSync(r)}catch{}return Li(n.toString())}gn.exports=Mi});var Sn=v((Ua,bn)=>{"use strict";var Di=require("path"),yn=un(),xn=fn(),Ui=hn(),qi=process.platform==="win32",Wi=/\.(?:com|exe)$/i,zi=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Hi(e){e.file=yn(e);let t=e.file&&Ui(e.file);return t?(e.args.unshift(e.file),e.command=t,yn(e)):e.file}function Ki(e){if(!qi)return e;let t=Hi(e),n=!Wi.test(t);if(e.options.forceShell||n){let r=zi.test(t);e.command=Di.normalize(e.command),e.command=xn.command(e.command),e.args=e.args.map(o=>xn.argument(o,r));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Xi(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:Ki(r)}bn.exports=Xi});var En=v((qa,vn)=>{"use strict";var qe=process.platform==="win32";function We(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function Yi(e,t){if(!qe)return;let n=e.emit;e.emit=function(r,i){if(r==="exit"){let o=wn(i,t,"spawn");if(o)return n.call(e,"error",o)}return n.apply(e,arguments)}}function wn(e,t){return qe&&e===1&&!t.file?We(t.original,"spawn"):null}function Vi(e,t){return qe&&e===1&&!t.file?We(t.original,"spawnSync"):null}vn.exports={hookChildProcess:Yi,verifyENOENT:wn,verifyENOENTSync:Vi,notFoundError:We}});var Pn=v((Wa,z)=>{"use strict";var Tn=require("child_process"),ze=Sn(),He=En();function _n(e,t,n){let r=ze(e,t,n),i=Tn.spawn(r.command,r.args,r.options);return He.hookChildProcess(i,r),i}function Ji(e,t,n){let r=ze(e,t,n),i=Tn.spawnSync(r.command,r.args,r.options);return i.error=i.error||He.verifyENOENTSync(i.status,r),i}z.exports=_n;z.exports.spawn=_n;z.exports.sync=Ji;z.exports._parse=ze;z.exports._enoent=He});var Fn=v((fc,be)=>{be.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&be.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&be.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var qn=v((lc,Y)=>{var b=global.process,$=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};$(b)?(Ln=require("assert"),K=Fn(),Mn=/^win/i.test(b.platform),ne=require("events"),typeof ne!="function"&&(ne=ne.EventEmitter),b.__signal_exit_emitter__?E=b.__signal_exit_emitter__:(E=b.__signal_exit_emitter__=new ne,E.count=0,E.emitted={}),E.infinite||(E.setMaxListeners(1/0),E.infinite=!0),Y.exports=function(e,t){if(!$(global.process))return function(){};Ln.equal(typeof e,"function","a callback must be provided for exit handler"),X===!1&&Ze();var n="exit";t&&t.alwaysLast&&(n="afterexit");var r=function(){E.removeListener(n,e),E.listeners("exit").length===0&&E.listeners("afterexit").length===0&&Se()};return E.on(n,e),r},Se=function(){!X||!$(global.process)||(X=!1,K.forEach(function(t){try{b.removeListener(t,we[t])}catch{}}),b.emit=ve,b.reallyExit=Qe,E.count-=1)},Y.exports.unload=Se,B=function(t,n,r){E.emitted[t]||(E.emitted[t]=!0,E.emit(t,n,r))},we={},K.forEach(function(e){we[e]=function(){if($(global.process)){var n=b.listeners(e);n.length===E.count&&(Se(),B("exit",null,e),B("afterexit",null,e),Mn&&e==="SIGHUP"&&(e="SIGINT"),b.kill(b.pid,e))}}}),Y.exports.signals=function(){return K},X=!1,Ze=function(){X||!$(global.process)||(X=!0,E.count+=1,K=K.filter(function(t){try{return b.on(t,we[t]),!0}catch{return!1}}),b.emit=Un,b.reallyExit=Dn)},Y.exports.load=Ze,Qe=b.reallyExit,Dn=function(t){$(global.process)&&(b.exitCode=t||0,B("exit",b.exitCode,null),B("afterexit",b.exitCode,null),Qe.call(b,b.exitCode))},ve=b.emit,Un=function(t,n){if(t==="exit"&&$(global.process)){n!==void 0&&(b.exitCode=n);var r=ve.apply(this,arguments);return B("exit",b.exitCode,null),B("afterexit",b.exitCode,null),r}else return ve.apply(this,arguments)}):Y.exports=function(){return function(){}};var Ln,K,Mn,ne,E,Se,B,we,X,Ze,Qe,Dn,ve,Un});var Qn=v((mc,Zn)=>{"use strict";var{PassThrough:vo}=require("stream");Zn.exports=e=>{e={...e};let{array:t}=e,{encoding:n}=e,r=n==="buffer",i=!1;t?i=!(n||r):n=n||"utf8",r&&(n=null);let o=new vo({objectMode:i});n&&o.setEncoding(n);let s=0,a=[];return o.on("data",c=>{a.push(c),i?s=a.length:s+=c.length}),o.getBufferedValue=()=>t?a:r?Buffer.concat(a,s):a.join(""),o.getBufferedLength=()=>s,o}});var er=v((gc,re)=>{"use strict";var{constants:Eo}=require("buffer"),To=require("stream"),{promisify:_o}=require("util"),Po=Qn(),Io=_o(To.pipeline),Ee=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function et(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};let{maxBuffer:n}=t,r=Po(t);return await new Promise((i,o)=>{let s=a=>{a&&r.getBufferedLength()<=Eo.MAX_LENGTH&&(a.bufferedData=r.getBufferedValue()),o(a)};(async()=>{try{await Io(e,r),i()}catch(a){s(a)}})(),r.on("data",()=>{r.getBufferedLength()>n&&s(new Ee)})}),r.getBufferedValue()}re.exports=et;re.exports.buffer=(e,t)=>et(e,{...t,encoding:"buffer"});re.exports.array=(e,t)=>et(e,{...t,array:!0});re.exports.MaxBufferError=Ee});var nr=v((hc,tr)=>{"use strict";var{PassThrough:Oo}=require("stream");tr.exports=function(){var e=[],t=new Oo({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=r,t.on("unpipe",i),Array.prototype.slice.call(arguments).forEach(n),t;function n(o){return Array.isArray(o)?(o.forEach(n),this):(e.push(o),o.once("end",i.bind(null,o)),o.once("error",t.emit.bind(t,"error")),o.pipe(t,{end:!1}),this)}function r(){return e.length==0}function i(o){e=e.filter(function(s){return s!==o}),!e.length&&t.readable&&t.end()}}});var Tr=v(Er=>{var mt="2.0.1",Sr,Te,wr,ht,yt,V,ae,se,gt,J,_,vr=[].slice,Uo=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},qo={}.hasOwnProperty;ae=require("path");wr=function(e){return typeof e=="function"};ht=function(e){return typeof e=="string"||!!e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object String]"};_=Er;_.VERSION=typeof mt<"u"&&mt!==null?mt:"NO-VERSION";J=function(e){return e=e.replace(/\\/g,"/"),e=e.replace(/(?<!^)\/+/g,"/"),e};for(se in ae)gt=ae[se],wr(gt)?_[se]=function(e){return function(){var t,n;return t=1<=arguments.length?vr.call(arguments,0):[],t=t.map(function(r){return ht(r)?J(r):r}),n=ae[e].apply(ae,t),ht(n)?J(n):n}}(se):_[se]=gt;_.sep="/";Te={toUnix:J,normalizeSafe:function(e){var t;return e=J(e),t=_.normalize(e),e.startsWith("./")&&!t.startsWith("./")&&!t.startsWith("..")?t="./"+t:e.startsWith("//")&&!t.startsWith("//")&&(e.startsWith("//./")?t="//."+t:t="/"+t),t},normalizeTrim:function(e){return e=_.normalizeSafe(e),e.endsWith("/")?e.slice(0,+(e.length-2)+1||9e9):e},joinSafe:function(){var e,t,n;return e=1<=arguments.length?vr.call(arguments,0):[],n=_.join.apply(null,e),e.length>0&&(t=J(e[0]),t.startsWith("./")&&!n.startsWith("./")&&!n.startsWith("..")?n="./"+n:t.startsWith("//")&&!n.startsWith("//")&&(t.startsWith("//./")?n="//."+n:n="/"+n)),n},addExt:function(e,t){return t?(t[0]!=="."&&(t="."+t),e+(e.endsWith(t)?"":t)):e},trimExt:function(e,t,n){var r;return n==null&&(n=7),r=_.extname(e),yt(r,t,n)?e.slice(0,+(e.length-r.length-1)+1||9e9):e},removeExt:function(e,t){return t?(t=t[0]==="."?t:"."+t,_.extname(e)===t?_.trimExt(e,[],t.length):e):e},changeExt:function(e,t,n,r){return r==null&&(r=7),_.trimExt(e,n,r)+(t?t[0]==="."?t:"."+t:"")},defaultExt:function(e,t,n,r){var i;return r==null&&(r=7),i=_.extname(e),yt(i,n,r)?e:_.addExt(e,t)}};yt=function(e,t,n){return t==null&&(t=[]),e&&e.length<=n&&Uo.call(t.map(function(r){return(r&&r[0]!=="."?".":"")+r}),e)<0};for(V in Te)if(qo.call(Te,V)){if(Sr=Te[V],_[V]!==void 0)throw new Error("path."+V+" already exists.");_[V]=Sr}});var Ir=v((Hc,Pr)=>{Pr.exports=function(e,t){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var n=e.length;if(n<=1)return e;var r="";if(n>4&&e[3]==="\\"){var i=e[2];(i==="?"||i===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),r="//")}var o=e.split(/[/\\]+/);return t!==!1&&o[o.length-1]===""&&o.pop(),r+o.join("/")}});var ci=v((ce,Q)=>{var Xo=200,Ot="__lodash_hash_undefined__",ke=1,Lr=2,Mr=9007199254740991,Pe="[object Arguments]",wt="[object Array]",Yo="[object AsyncFunction]",Dr="[object Boolean]",Ur="[object Date]",qr="[object Error]",Wr="[object Function]",Vo="[object GeneratorFunction]",Ie="[object Map]",zr="[object Number]",Jo="[object Null]",Z="[object Object]",Or="[object Promise]",Zo="[object Proxy]",Hr="[object RegExp]",Oe="[object Set]",Kr="[object String]",Qo="[object Symbol]",es="[object Undefined]",vt="[object WeakMap]",Xr="[object ArrayBuffer]",Ae="[object DataView]",ts="[object Float32Array]",ns="[object Float64Array]",rs="[object Int8Array]",is="[object Int16Array]",os="[object Int32Array]",ss="[object Uint8Array]",as="[object Uint8ClampedArray]",cs="[object Uint16Array]",us="[object Uint32Array]",fs=/[\\^$.*+?()[\]{}|]/g,ls=/^\[object .+?Constructor\]$/,ds=/^(?:0|[1-9]\d*)$/,x={};x[ts]=x[ns]=x[rs]=x[is]=x[os]=x[ss]=x[as]=x[cs]=x[us]=!0;x[Pe]=x[wt]=x[Xr]=x[Dr]=x[Ae]=x[Ur]=x[qr]=x[Wr]=x[Ie]=x[zr]=x[Z]=x[Hr]=x[Oe]=x[Kr]=x[vt]=!1;var Yr=typeof global=="object"&&global&&global.Object===Object&&global,ps=typeof self=="object"&&self&&self.Object===Object&&self,N=Yr||ps||Function("return this")(),Vr=typeof ce=="object"&&ce&&!ce.nodeType&&ce,Ar=Vr&&typeof Q=="object"&&Q&&!Q.nodeType&&Q,Jr=Ar&&Ar.exports===Vr,xt=Jr&&Yr.process,jr=function(){try{return xt&&xt.binding&&xt.binding("util")}catch{}}(),Cr=jr&&jr.isTypedArray;function ms(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function gs(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function hs(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ys(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function xs(e){return function(t){return e(t)}}function bs(e,t){return e.has(t)}function Ss(e,t){return e?.[t]}function ws(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function vs(e,t){return function(n){return e(t(n))}}function Es(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Ts=Array.prototype,_s=Function.prototype,Ge=Object.prototype,bt=N["__core-js_shared__"],Zr=_s.toString,j=Ge.hasOwnProperty,Nr=function(){var e=/[^.]+$/.exec(bt&&bt.keys&&bt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Qr=Ge.toString,Ps=RegExp("^"+Zr.call(j).replace(fs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),kr=Jr?N.Buffer:void 0,je=N.Symbol,Gr=N.Uint8Array,ei=Ge.propertyIsEnumerable,Is=Ts.splice,F=je?je.toStringTag:void 0,Rr=Object.getOwnPropertySymbols,Os=kr?kr.isBuffer:void 0,As=vs(Object.keys,Object),Et=ee(N,"DataView"),ue=ee(N,"Map"),Tt=ee(N,"Promise"),_t=ee(N,"Set"),Pt=ee(N,"WeakMap"),fe=ee(Object,"create"),js=D(Et),Cs=D(ue),Ns=D(Tt),ks=D(_t),Gs=D(Pt),$r=je?je.prototype:void 0,St=$r?$r.valueOf:void 0;function L(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Rs(){this.__data__=fe?fe(null):{},this.size=0}function $s(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Bs(e){var t=this.__data__;if(fe){var n=t[e];return n===Ot?void 0:n}return j.call(t,e)?t[e]:void 0}function Fs(e){var t=this.__data__;return fe?t[e]!==void 0:j.call(t,e)}function Ls(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fe&&t===void 0?Ot:t,this}L.prototype.clear=Rs;L.prototype.delete=$s;L.prototype.get=Bs;L.prototype.has=Fs;L.prototype.set=Ls;function k(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ms(){this.__data__=[],this.size=0}function Ds(e){var t=this.__data__,n=Re(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Is.call(t,n,1),--this.size,!0}function Us(e){var t=this.__data__,n=Re(t,e);return n<0?void 0:t[n][1]}function qs(e){return Re(this.__data__,e)>-1}function Ws(e,t){var n=this.__data__,r=Re(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}k.prototype.clear=Ms;k.prototype.delete=Ds;k.prototype.get=Us;k.prototype.has=qs;k.prototype.set=Ws;function M(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zs(){this.size=0,this.__data__={hash:new L,map:new(ue||k),string:new L}}function Hs(e){var t=$e(this,e).delete(e);return this.size-=t?1:0,t}function Ks(e){return $e(this,e).get(e)}function Xs(e){return $e(this,e).has(e)}function Ys(e,t){var n=$e(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}M.prototype.clear=zs;M.prototype.delete=Hs;M.prototype.get=Ks;M.prototype.has=Xs;M.prototype.set=Ys;function Ce(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new M;++t<n;)this.add(e[t])}function Vs(e){return this.__data__.set(e,Ot),this}function Js(e){return this.__data__.has(e)}Ce.prototype.add=Ce.prototype.push=Vs;Ce.prototype.has=Js;function R(e){var t=this.__data__=new k(e);this.size=t.size}function Zs(){this.__data__=new k,this.size=0}function Qs(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ea(e){return this.__data__.get(e)}function ta(e){return this.__data__.has(e)}function na(e,t){var n=this.__data__;if(n instanceof k){var r=n.__data__;if(!ue||r.length<Xo-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new M(r)}return n.set(e,t),this.size=n.size,this}R.prototype.clear=Zs;R.prototype.delete=Qs;R.prototype.get=ea;R.prototype.has=ta;R.prototype.set=na;function ra(e,t){var n=Ne(e),r=!n&&xa(e),i=!n&&!r&&It(e),o=!n&&!r&&!i&&ai(e),s=n||r||i||o,a=s?ys(e.length,String):[],c=a.length;for(var f in e)(t||j.call(e,f))&&!(s&&(f=="length"||i&&(f=="offset"||f=="parent")||o&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||pa(f,c)))&&a.push(f);return a}function Re(e,t){for(var n=e.length;n--;)if(ri(e[n][0],t))return n;return-1}function ia(e,t,n){var r=t(e);return Ne(e)?r:gs(r,n(e))}function de(e){return e==null?e===void 0?es:Jo:F&&F in Object(e)?la(e):ya(e)}function Br(e){return le(e)&&de(e)==Pe}function ti(e,t,n,r,i){return e===t?!0:e==null||t==null||!le(e)&&!le(t)?e!==e&&t!==t:oa(e,t,n,r,ti,i)}function oa(e,t,n,r,i,o){var s=Ne(e),a=Ne(t),c=s?wt:G(e),f=a?wt:G(t);c=c==Pe?Z:c,f=f==Pe?Z:f;var l=c==Z,u=f==Z,p=c==f;if(p&&It(e)){if(!It(t))return!1;s=!0,l=!1}if(p&&!l)return o||(o=new R),s||ai(e)?ni(e,t,n,r,i,o):ua(e,t,c,n,r,i,o);if(!(n&ke)){var d=l&&j.call(e,"__wrapped__"),m=u&&j.call(t,"__wrapped__");if(d||m){var g=d?e.value():e,h=m?t.value():t;return o||(o=new R),i(g,h,n,r,o)}}return p?(o||(o=new R),fa(e,t,n,r,i,o)):!1}function sa(e){if(!si(e)||ga(e))return!1;var t=ii(e)?Ps:ls;return t.test(D(e))}function aa(e){return le(e)&&oi(e.length)&&!!x[de(e)]}function ca(e){if(!ha(e))return As(e);var t=[];for(var n in Object(e))j.call(e,n)&&n!="constructor"&&t.push(n);return t}function ni(e,t,n,r,i,o){var s=n&ke,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var f=o.get(e);if(f&&o.get(t))return f==t;var l=-1,u=!0,p=n&Lr?new Ce:void 0;for(o.set(e,t),o.set(t,e);++l<a;){var d=e[l],m=t[l];if(r)var g=s?r(m,d,l,t,e,o):r(d,m,l,e,t,o);if(g!==void 0){if(g)continue;u=!1;break}if(p){if(!hs(t,function(h,S){if(!bs(p,S)&&(d===h||i(d,h,n,r,o)))return p.push(S)})){u=!1;break}}else if(!(d===m||i(d,m,n,r,o))){u=!1;break}}return o.delete(e),o.delete(t),u}function ua(e,t,n,r,i,o,s){switch(n){case Ae:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Xr:return!(e.byteLength!=t.byteLength||!o(new Gr(e),new Gr(t)));case Dr:case Ur:case zr:return ri(+e,+t);case qr:return e.name==t.name&&e.message==t.message;case Hr:case Kr:return e==t+"";case Ie:var a=ws;case Oe:var c=r&ke;if(a||(a=Es),e.size!=t.size&&!c)return!1;var f=s.get(e);if(f)return f==t;r|=Lr,s.set(e,t);var l=ni(a(e),a(t),r,i,o,s);return s.delete(e),l;case Qo:if(St)return St.call(e)==St.call(t)}return!1}function fa(e,t,n,r,i,o){var s=n&ke,a=Fr(e),c=a.length,f=Fr(t),l=f.length;if(c!=l&&!s)return!1;for(var u=c;u--;){var p=a[u];if(!(s?p in t:j.call(t,p)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var m=!0;o.set(e,t),o.set(t,e);for(var g=s;++u<c;){p=a[u];var h=e[p],S=t[p];if(r)var T=s?r(S,h,p,t,e,o):r(h,S,p,e,t,o);if(!(T===void 0?h===S||i(h,S,n,r,o):T)){m=!1;break}g||(g=p=="constructor")}if(m&&!g){var I=e.constructor,P=t.constructor;I!=P&&"constructor"in e&&"constructor"in t&&!(typeof I=="function"&&I instanceof I&&typeof P=="function"&&P instanceof P)&&(m=!1)}return o.delete(e),o.delete(t),m}function Fr(e){return ia(e,wa,da)}function $e(e,t){var n=e.__data__;return ma(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ee(e,t){var n=Ss(e,t);return sa(n)?n:void 0}function la(e){var t=j.call(e,F),n=e[F];try{e[F]=void 0;var r=!0}catch{}var i=Qr.call(e);return r&&(t?e[F]=n:delete e[F]),i}var da=Rr?function(e){return e==null?[]:(e=Object(e),ms(Rr(e),function(t){return ei.call(e,t)}))}:va,G=de;(Et&&G(new Et(new ArrayBuffer(1)))!=Ae||ue&&G(new ue)!=Ie||Tt&&G(Tt.resolve())!=Or||_t&&G(new _t)!=Oe||Pt&&G(new Pt)!=vt)&&(G=function(e){var t=de(e),n=t==Z?e.constructor:void 0,r=n?D(n):"";if(r)switch(r){case js:return Ae;case Cs:return Ie;case Ns:return Or;case ks:return Oe;case Gs:return vt}return t});function pa(e,t){return t=t??Mr,!!t&&(typeof e=="number"||ds.test(e))&&e>-1&&e%1==0&&e<t}function ma(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ga(e){return!!Nr&&Nr in e}function ha(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Ge;return e===n}function ya(e){return Qr.call(e)}function D(e){if(e!=null){try{return Zr.call(e)}catch{}try{return e+""}catch{}}return""}function ri(e,t){return e===t||e!==e&&t!==t}var xa=Br(function(){return arguments}())?Br:function(e){return le(e)&&j.call(e,"callee")&&!ei.call(e,"callee")},Ne=Array.isArray;function ba(e){return e!=null&&oi(e.length)&&!ii(e)}var It=Os||Ea;function Sa(e,t){return ti(e,t)}function ii(e){if(!si(e))return!1;var t=de(e);return t==Wr||t==Vo||t==Yo||t==Zo}function oi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Mr}function si(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function le(e){return e!=null&&typeof e=="object"}var ai=Cr?xs(Cr):aa;function wa(e){return ba(e)?ra(e):ca(e)}function va(){return[]}function Ea(){return!1}Q.exports=Sa});var Ct=require("commander"),yi=y(require("path"));var Rt=require("commander"),$t=y(require("fast-glob")),Be=y(require("fs-extra")),Bt=y(require("path")),C=y(require("@techor/log"));var Gt=y(require("fs-extra"));function q(e="./package.json"){return Gt.default.readJSONSync(e,{throws:!1})||{}}var Ti=q(),_i={workspaces:Ti.workspaces};Rt.program.command("version <version>").description("Bump to specific version for workspace's packages").option("-p, --prefix <symbol>","Version prefix `^`, `~`, `>`, `>=`, `<`, `<=` ","^").option("-w, --workspaces <paths>","Specific your workspaces",_i.workspaces).option("-ls, --list","List current bumpable dependency tree in workspaces",!1).action((e,{prefix:t,list:n,workspaces:r})=>{let i=t+e,o={},s={},a=r.map(l=>Bt.default.join(l,"*package.json")),c=(l,u)=>{let p=!1;for(let d in l)d in s&&l[d]===""&&(l[d]=i,p=!0);return p};for(let l of $t.default.sync(a)){let u=Be.default.readJSONSync(l);u.private||(o[l]=u,s[u.name]=u,u.version=e)}for(let l in o){let u=o[l],{dependencies:p,peerDependencies:d}=o[l];p&&c(p,"dependencies"),d&&c(d,"peerDependencies"),n||Be.default.writeJSONSync(l,u)}let f={};for(let l in s){let{dependencies:u,peerDependencies:p}=s[l],d=f[(0,C.paint)("**"+l+"**")]={},m=(g,h)=>{if(g){d[h]={};for(let S in g)if(S in s){let T=g[S];d[h][(0,C.paint)("**"+S+"**")]=T===i?null:i}}};m(u,"dependencies"),m(p,"peerDependencies"),Object.keys(f[(0,C.paint)("**"+l+"**")]).length||(f[(0,C.paint)("**"+l+"**")]=null)}C.default`📦`,C.default.tree(f),C.default.success`bump version to +${i}+ for ${Object.keys(s).length} packages in all workspace`});var di=require("commander"),pi=y(require("fast-glob"));var dr=require("node:buffer"),pr=y(require("node:path"),1),st=y(require("node:child_process"),1),ie=y(require("node:process"),1),mr=y(Pn(),1);function Ke(e){let t=typeof e=="string"?`
2
+ var xi=Object.create;var kt=Object.defineProperty;var bi=Object.getOwnPropertyDescriptor;var Si=Object.getOwnPropertyNames;var wi=Object.getPrototypeOf,vi=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ei=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Si(t))!vi.call(e,i)&&i!==n&&kt(e,i,{get:()=>t[i],enumerable:!(r=bi(t,i))||r.enumerable});return e};var y=(e,t,n)=>(n=e!=null?xi(wi(e)):{},Ei(t||!e||!e.__esModule?kt(n,"default",{value:e,enumerable:!0}):n,e));var Ut=v((Ca,Dt)=>{Dt.exports=Mt;Mt.sync=Pi;var Bt=require("fs");function Ii(e,t){var n=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function Lt(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:Ii(t,n)}function Mt(e,t,n){Bt.stat(e,function(r,i){n(r,r?!1:Lt(i,e,t))})}function Pi(e,t){return Lt(Bt.statSync(e),e,t)}});var Kt=v((Na,Ht)=>{Ht.exports=Wt;Wt.sync=Oi;var qt=require("fs");function Wt(e,t,n){qt.stat(e,function(r,i){n(r,r?!1:zt(i,t))})}function Oi(e,t){return zt(qt.statSync(e),t)}function zt(e,t){return e.isFile()&&ji(e,t)}function ji(e,t){var n=e.mode,r=e.uid,i=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),s=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),l=a|c,d=n&u||n&c&&i===s||n&a&&r===o||n&l&&o===0;return d}});var Vt=v((Ga,Xt)=>{var ka=require("fs"),ge;process.platform==="win32"||global.TESTING_WINDOWS?ge=Ut():ge=Kt();Xt.exports=Be;Be.sync=Ai;function Be(e,t,n){if(typeof t=="function"&&(n=t,t={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,i){Be(e,t||{},function(o,s){o?i(o):r(s)})})}ge(e,t||{},function(r,i){r&&(r.code==="EACCES"||t&&t.ignoreErrors)&&(r=null,i=!1),n(r,i)})}function Ai(e,t){try{return ge.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var nn=v((Ra,tn)=>{var W=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Yt=require("path"),Ci=W?";":":",Jt=Vt(),Zt=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Qt=(e,t)=>{let n=t.colon||Ci,r=e.match(/\//)||W&&e.match(/\\/)?[""]:[...W?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],i=W?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=W?i.split(n):[""];return W&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:r,pathExt:o,pathExtExe:i}},en=(e,t,n)=>{typeof t=="function"&&(n=t,t={}),t||(t={});let{pathEnv:r,pathExt:i,pathExtExe:o}=Qt(e,t),s=[],a=u=>new Promise((l,d)=>{if(u===r.length)return t.all&&s.length?l(s):d(Zt(e));let f=r[u],m=/^".*"$/.test(f)?f.slice(1,-1):f,p=Yt.join(m,e),g=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p;l(c(g,u,0))}),c=(u,l,d)=>new Promise((f,m)=>{if(d===i.length)return f(a(l+1));let p=i[d];Jt(u+p,{pathExt:o},(g,h)=>{if(!g&&h)if(t.all)s.push(u+p);else return f(u+p);return f(c(u,l,d+1))})});return n?a(0).then(u=>n(null,u),n):a(0)},Ni=(e,t)=>{t=t||{};let{pathEnv:n,pathExt:r,pathExtExe:i}=Qt(e,t),o=[];for(let s=0;s<n.length;s++){let a=n[s],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=Yt.join(c,e),l=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let d=0;d<r.length;d++){let f=l+r[d];try{if(Jt.sync(f,{pathExt:i}))if(t.all)o.push(f);else return f}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw Zt(e)};tn.exports=en;en.sync=Ni});var on=v(($a,Le)=>{"use strict";var rn=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};Le.exports=rn;Le.exports.default=rn});var un=v((Fa,cn)=>{"use strict";var sn=require("path"),ki=nn(),Gi=on();function an(e,t){let n=e.options.env||process.env,r=process.cwd(),i=e.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let s;try{s=ki.sync(e.command,{path:n[Gi({env:n})],pathExt:t?sn.delimiter:void 0})}catch{}finally{o&&process.chdir(r)}return s&&(s=sn.resolve(i?e.options.cwd:"",s)),s}function Ri(e){return an(e)||an(e,!0)}cn.exports=Ri});var fn=v((Ba,De)=>{"use strict";var Me=/([()\][%!^"`<>&|;, *?])/g;function $i(e){return e=e.replace(Me,"^$1"),e}function Fi(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(Me,"^$1"),t&&(e=e.replace(Me,"^$1")),e}De.exports.command=$i;De.exports.argument=Fi});var dn=v((La,ln)=>{"use strict";ln.exports=/^#!(.*)/});var mn=v((Ma,pn)=>{"use strict";var Bi=dn();pn.exports=(e="")=>{let t=e.match(Bi);if(!t)return null;let[n,r]=t[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return i==="env"?r:r?`${i} ${r}`:i}});var hn=v((Da,gn)=>{"use strict";var Ue=require("fs"),Li=mn();function Mi(e){let n=Buffer.alloc(150),r;try{r=Ue.openSync(e,"r"),Ue.readSync(r,n,0,150,0),Ue.closeSync(r)}catch{}return Li(n.toString())}gn.exports=Mi});var Sn=v((Ua,bn)=>{"use strict";var Di=require("path"),yn=un(),xn=fn(),Ui=hn(),qi=process.platform==="win32",Wi=/\.(?:com|exe)$/i,zi=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Hi(e){e.file=yn(e);let t=e.file&&Ui(e.file);return t?(e.args.unshift(e.file),e.command=t,yn(e)):e.file}function Ki(e){if(!qi)return e;let t=Hi(e),n=!Wi.test(t);if(e.options.forceShell||n){let r=zi.test(t);e.command=Di.normalize(e.command),e.command=xn.command(e.command),e.args=e.args.map(o=>xn.argument(o,r));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Xi(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:Ki(r)}bn.exports=Xi});var En=v((qa,vn)=>{"use strict";var qe=process.platform==="win32";function We(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function Vi(e,t){if(!qe)return;let n=e.emit;e.emit=function(r,i){if(r==="exit"){let o=wn(i,t,"spawn");if(o)return n.call(e,"error",o)}return n.apply(e,arguments)}}function wn(e,t){return qe&&e===1&&!t.file?We(t.original,"spawn"):null}function Yi(e,t){return qe&&e===1&&!t.file?We(t.original,"spawnSync"):null}vn.exports={hookChildProcess:Vi,verifyENOENT:wn,verifyENOENTSync:Yi,notFoundError:We}});var In=v((Wa,z)=>{"use strict";var Tn=require("child_process"),ze=Sn(),He=En();function _n(e,t,n){let r=ze(e,t,n),i=Tn.spawn(r.command,r.args,r.options);return He.hookChildProcess(i,r),i}function Ji(e,t,n){let r=ze(e,t,n),i=Tn.spawnSync(r.command,r.args,r.options);return i.error=i.error||He.verifyENOENTSync(i.status,r),i}z.exports=_n;z.exports.spawn=_n;z.exports.sync=Ji;z.exports._parse=ze;z.exports._enoent=He});var Bn=v((fc,be)=>{be.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&be.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&be.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var qn=v((lc,V)=>{var b=global.process,F=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};F(b)?(Ln=require("assert"),K=Bn(),Mn=/^win/i.test(b.platform),ne=require("events"),typeof ne!="function"&&(ne=ne.EventEmitter),b.__signal_exit_emitter__?T=b.__signal_exit_emitter__:(T=b.__signal_exit_emitter__=new ne,T.count=0,T.emitted={}),T.infinite||(T.setMaxListeners(1/0),T.infinite=!0),V.exports=function(e,t){if(!F(global.process))return function(){};Ln.equal(typeof e,"function","a callback must be provided for exit handler"),X===!1&&Ze();var n="exit";t&&t.alwaysLast&&(n="afterexit");var r=function(){T.removeListener(n,e),T.listeners("exit").length===0&&T.listeners("afterexit").length===0&&Se()};return T.on(n,e),r},Se=function(){!X||!F(global.process)||(X=!1,K.forEach(function(t){try{b.removeListener(t,we[t])}catch{}}),b.emit=ve,b.reallyExit=Qe,T.count-=1)},V.exports.unload=Se,B=function(t,n,r){T.emitted[t]||(T.emitted[t]=!0,T.emit(t,n,r))},we={},K.forEach(function(e){we[e]=function(){if(F(global.process)){var n=b.listeners(e);n.length===T.count&&(Se(),B("exit",null,e),B("afterexit",null,e),Mn&&e==="SIGHUP"&&(e="SIGINT"),b.kill(b.pid,e))}}}),V.exports.signals=function(){return K},X=!1,Ze=function(){X||!F(global.process)||(X=!0,T.count+=1,K=K.filter(function(t){try{return b.on(t,we[t]),!0}catch{return!1}}),b.emit=Un,b.reallyExit=Dn)},V.exports.load=Ze,Qe=b.reallyExit,Dn=function(t){F(global.process)&&(b.exitCode=t||0,B("exit",b.exitCode,null),B("afterexit",b.exitCode,null),Qe.call(b,b.exitCode))},ve=b.emit,Un=function(t,n){if(t==="exit"&&F(global.process)){n!==void 0&&(b.exitCode=n);var r=ve.apply(this,arguments);return B("exit",b.exitCode,null),B("afterexit",b.exitCode,null),r}else return ve.apply(this,arguments)}):V.exports=function(){return function(){}};var Ln,K,Mn,ne,T,Se,B,we,X,Ze,Qe,Dn,ve,Un});var Qn=v((mc,Zn)=>{"use strict";var{PassThrough:vo}=require("stream");Zn.exports=e=>{e={...e};let{array:t}=e,{encoding:n}=e,r=n==="buffer",i=!1;t?i=!(n||r):n=n||"utf8",r&&(n=null);let o=new vo({objectMode:i});n&&o.setEncoding(n);let s=0,a=[];return o.on("data",c=>{a.push(c),i?s=a.length:s+=c.length}),o.getBufferedValue=()=>t?a:r?Buffer.concat(a,s):a.join(""),o.getBufferedLength=()=>s,o}});var er=v((gc,re)=>{"use strict";var{constants:Eo}=require("buffer"),To=require("stream"),{promisify:_o}=require("util"),Io=Qn(),Po=_o(To.pipeline),Ee=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function et(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};let{maxBuffer:n}=t,r=Io(t);return await new Promise((i,o)=>{let s=a=>{a&&r.getBufferedLength()<=Eo.MAX_LENGTH&&(a.bufferedData=r.getBufferedValue()),o(a)};(async()=>{try{await Po(e,r),i()}catch(a){s(a)}})(),r.on("data",()=>{r.getBufferedLength()>n&&s(new Ee)})}),r.getBufferedValue()}re.exports=et;re.exports.buffer=(e,t)=>et(e,{...t,encoding:"buffer"});re.exports.array=(e,t)=>et(e,{...t,array:!0});re.exports.MaxBufferError=Ee});var nr=v((hc,tr)=>{"use strict";var{PassThrough:Oo}=require("stream");tr.exports=function(){var e=[],t=new Oo({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=r,t.on("unpipe",i),Array.prototype.slice.call(arguments).forEach(n),t;function n(o){return Array.isArray(o)?(o.forEach(n),this):(e.push(o),o.once("end",i.bind(null,o)),o.once("error",t.emit.bind(t,"error")),o.pipe(t,{end:!1}),this)}function r(){return e.length==0}function i(o){e=e.filter(function(s){return s!==o}),!e.length&&t.readable&&t.end()}}});var Tr=v(Er=>{var mt="2.0.1",Sr,Te,wr,ht,yt,Y,ae,se,gt,J,_,vr=[].slice,Uo=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},qo={}.hasOwnProperty;ae=require("path");wr=function(e){return typeof e=="function"};ht=function(e){return typeof e=="string"||!!e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object String]"};_=Er;_.VERSION=typeof mt<"u"&&mt!==null?mt:"NO-VERSION";J=function(e){return e=e.replace(/\\/g,"/"),e=e.replace(/(?<!^)\/+/g,"/"),e};for(se in ae)gt=ae[se],wr(gt)?_[se]=function(e){return function(){var t,n;return t=1<=arguments.length?vr.call(arguments,0):[],t=t.map(function(r){return ht(r)?J(r):r}),n=ae[e].apply(ae,t),ht(n)?J(n):n}}(se):_[se]=gt;_.sep="/";Te={toUnix:J,normalizeSafe:function(e){var t;return e=J(e),t=_.normalize(e),e.startsWith("./")&&!t.startsWith("./")&&!t.startsWith("..")?t="./"+t:e.startsWith("//")&&!t.startsWith("//")&&(e.startsWith("//./")?t="//."+t:t="/"+t),t},normalizeTrim:function(e){return e=_.normalizeSafe(e),e.endsWith("/")?e.slice(0,+(e.length-2)+1||9e9):e},joinSafe:function(){var e,t,n;return e=1<=arguments.length?vr.call(arguments,0):[],n=_.join.apply(null,e),e.length>0&&(t=J(e[0]),t.startsWith("./")&&!n.startsWith("./")&&!n.startsWith("..")?n="./"+n:t.startsWith("//")&&!n.startsWith("//")&&(t.startsWith("//./")?n="//."+n:n="/"+n)),n},addExt:function(e,t){return t?(t[0]!=="."&&(t="."+t),e+(e.endsWith(t)?"":t)):e},trimExt:function(e,t,n){var r;return n==null&&(n=7),r=_.extname(e),yt(r,t,n)?e.slice(0,+(e.length-r.length-1)+1||9e9):e},removeExt:function(e,t){return t?(t=t[0]==="."?t:"."+t,_.extname(e)===t?_.trimExt(e,[],t.length):e):e},changeExt:function(e,t,n,r){return r==null&&(r=7),_.trimExt(e,n,r)+(t?t[0]==="."?t:"."+t:"")},defaultExt:function(e,t,n,r){var i;return r==null&&(r=7),i=_.extname(e),yt(i,n,r)?e:_.addExt(e,t)}};yt=function(e,t,n){return t==null&&(t=[]),e&&e.length<=n&&Uo.call(t.map(function(r){return(r&&r[0]!=="."?".":"")+r}),e)<0};for(Y in Te)if(qo.call(Te,Y)){if(Sr=Te[Y],_[Y]!==void 0)throw new Error("path."+Y+" already exists.");_[Y]=Sr}});var Pr=v((Hc,Ir)=>{Ir.exports=function(e,t){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var n=e.length;if(n<=1)return e;var r="";if(n>4&&e[3]==="\\"){var i=e[2];(i==="?"||i===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),r="//")}var o=e.split(/[/\\]+/);return t!==!1&&o[o.length-1]===""&&o.pop(),r+o.join("/")}});var ci=v((ce,Q)=>{var Xo=200,Ot="__lodash_hash_undefined__",ke=1,Lr=2,Mr=9007199254740991,Ie="[object Arguments]",wt="[object Array]",Vo="[object AsyncFunction]",Dr="[object Boolean]",Ur="[object Date]",qr="[object Error]",Wr="[object Function]",Yo="[object GeneratorFunction]",Pe="[object Map]",zr="[object Number]",Jo="[object Null]",Z="[object Object]",Or="[object Promise]",Zo="[object Proxy]",Hr="[object RegExp]",Oe="[object Set]",Kr="[object String]",Qo="[object Symbol]",es="[object Undefined]",vt="[object WeakMap]",Xr="[object ArrayBuffer]",je="[object DataView]",ts="[object Float32Array]",ns="[object Float64Array]",rs="[object Int8Array]",is="[object Int16Array]",os="[object Int32Array]",ss="[object Uint8Array]",as="[object Uint8ClampedArray]",cs="[object Uint16Array]",us="[object Uint32Array]",fs=/[\\^$.*+?()[\]{}|]/g,ls=/^\[object .+?Constructor\]$/,ds=/^(?:0|[1-9]\d*)$/,x={};x[ts]=x[ns]=x[rs]=x[is]=x[os]=x[ss]=x[as]=x[cs]=x[us]=!0;x[Ie]=x[wt]=x[Xr]=x[Dr]=x[je]=x[Ur]=x[qr]=x[Wr]=x[Pe]=x[zr]=x[Z]=x[Hr]=x[Oe]=x[Kr]=x[vt]=!1;var Vr=typeof global=="object"&&global&&global.Object===Object&&global,ps=typeof self=="object"&&self&&self.Object===Object&&self,N=Vr||ps||Function("return this")(),Yr=typeof ce=="object"&&ce&&!ce.nodeType&&ce,jr=Yr&&typeof Q=="object"&&Q&&!Q.nodeType&&Q,Jr=jr&&jr.exports===Yr,xt=Jr&&Vr.process,Ar=function(){try{return xt&&xt.binding&&xt.binding("util")}catch{}}(),Cr=Ar&&Ar.isTypedArray;function ms(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function gs(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function hs(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ys(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function xs(e){return function(t){return e(t)}}function bs(e,t){return e.has(t)}function Ss(e,t){return e?.[t]}function ws(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function vs(e,t){return function(n){return e(t(n))}}function Es(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Ts=Array.prototype,_s=Function.prototype,Ge=Object.prototype,bt=N["__core-js_shared__"],Zr=_s.toString,A=Ge.hasOwnProperty,Nr=function(){var e=/[^.]+$/.exec(bt&&bt.keys&&bt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Qr=Ge.toString,Is=RegExp("^"+Zr.call(A).replace(fs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),kr=Jr?N.Buffer:void 0,Ae=N.Symbol,Gr=N.Uint8Array,ei=Ge.propertyIsEnumerable,Ps=Ts.splice,L=Ae?Ae.toStringTag:void 0,Rr=Object.getOwnPropertySymbols,Os=kr?kr.isBuffer:void 0,js=vs(Object.keys,Object),Et=ee(N,"DataView"),ue=ee(N,"Map"),Tt=ee(N,"Promise"),_t=ee(N,"Set"),It=ee(N,"WeakMap"),fe=ee(Object,"create"),As=U(Et),Cs=U(ue),Ns=U(Tt),ks=U(_t),Gs=U(It),$r=Ae?Ae.prototype:void 0,St=$r?$r.valueOf:void 0;function M(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Rs(){this.__data__=fe?fe(null):{},this.size=0}function $s(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Fs(e){var t=this.__data__;if(fe){var n=t[e];return n===Ot?void 0:n}return A.call(t,e)?t[e]:void 0}function Bs(e){var t=this.__data__;return fe?t[e]!==void 0:A.call(t,e)}function Ls(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fe&&t===void 0?Ot:t,this}M.prototype.clear=Rs;M.prototype.delete=$s;M.prototype.get=Fs;M.prototype.has=Bs;M.prototype.set=Ls;function k(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ms(){this.__data__=[],this.size=0}function Ds(e){var t=this.__data__,n=Re(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Ps.call(t,n,1),--this.size,!0}function Us(e){var t=this.__data__,n=Re(t,e);return n<0?void 0:t[n][1]}function qs(e){return Re(this.__data__,e)>-1}function Ws(e,t){var n=this.__data__,r=Re(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}k.prototype.clear=Ms;k.prototype.delete=Ds;k.prototype.get=Us;k.prototype.has=qs;k.prototype.set=Ws;function D(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zs(){this.size=0,this.__data__={hash:new M,map:new(ue||k),string:new M}}function Hs(e){var t=$e(this,e).delete(e);return this.size-=t?1:0,t}function Ks(e){return $e(this,e).get(e)}function Xs(e){return $e(this,e).has(e)}function Vs(e,t){var n=$e(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}D.prototype.clear=zs;D.prototype.delete=Hs;D.prototype.get=Ks;D.prototype.has=Xs;D.prototype.set=Vs;function Ce(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new D;++t<n;)this.add(e[t])}function Ys(e){return this.__data__.set(e,Ot),this}function Js(e){return this.__data__.has(e)}Ce.prototype.add=Ce.prototype.push=Ys;Ce.prototype.has=Js;function R(e){var t=this.__data__=new k(e);this.size=t.size}function Zs(){this.__data__=new k,this.size=0}function Qs(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ea(e){return this.__data__.get(e)}function ta(e){return this.__data__.has(e)}function na(e,t){var n=this.__data__;if(n instanceof k){var r=n.__data__;if(!ue||r.length<Xo-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new D(r)}return n.set(e,t),this.size=n.size,this}R.prototype.clear=Zs;R.prototype.delete=Qs;R.prototype.get=ea;R.prototype.has=ta;R.prototype.set=na;function ra(e,t){var n=Ne(e),r=!n&&xa(e),i=!n&&!r&&Pt(e),o=!n&&!r&&!i&&ai(e),s=n||r||i||o,a=s?ys(e.length,String):[],c=a.length;for(var u in e)(t||A.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||pa(u,c)))&&a.push(u);return a}function Re(e,t){for(var n=e.length;n--;)if(ri(e[n][0],t))return n;return-1}function ia(e,t,n){var r=t(e);return Ne(e)?r:gs(r,n(e))}function de(e){return e==null?e===void 0?es:Jo:L&&L in Object(e)?la(e):ya(e)}function Fr(e){return le(e)&&de(e)==Ie}function ti(e,t,n,r,i){return e===t?!0:e==null||t==null||!le(e)&&!le(t)?e!==e&&t!==t:oa(e,t,n,r,ti,i)}function oa(e,t,n,r,i,o){var s=Ne(e),a=Ne(t),c=s?wt:G(e),u=a?wt:G(t);c=c==Ie?Z:c,u=u==Ie?Z:u;var l=c==Z,d=u==Z,f=c==u;if(f&&Pt(e)){if(!Pt(t))return!1;s=!0,l=!1}if(f&&!l)return o||(o=new R),s||ai(e)?ni(e,t,n,r,i,o):ua(e,t,c,n,r,i,o);if(!(n&ke)){var m=l&&A.call(e,"__wrapped__"),p=d&&A.call(t,"__wrapped__");if(m||p){var g=m?e.value():e,h=p?t.value():t;return o||(o=new R),i(g,h,n,r,o)}}return f?(o||(o=new R),fa(e,t,n,r,i,o)):!1}function sa(e){if(!si(e)||ga(e))return!1;var t=ii(e)?Is:ls;return t.test(U(e))}function aa(e){return le(e)&&oi(e.length)&&!!x[de(e)]}function ca(e){if(!ha(e))return js(e);var t=[];for(var n in Object(e))A.call(e,n)&&n!="constructor"&&t.push(n);return t}function ni(e,t,n,r,i,o){var s=n&ke,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var l=-1,d=!0,f=n&Lr?new Ce:void 0;for(o.set(e,t),o.set(t,e);++l<a;){var m=e[l],p=t[l];if(r)var g=s?r(p,m,l,t,e,o):r(m,p,l,e,t,o);if(g!==void 0){if(g)continue;d=!1;break}if(f){if(!hs(t,function(h,S){if(!bs(f,S)&&(m===h||i(m,h,n,r,o)))return f.push(S)})){d=!1;break}}else if(!(m===p||i(m,p,n,r,o))){d=!1;break}}return o.delete(e),o.delete(t),d}function ua(e,t,n,r,i,o,s){switch(n){case je:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Xr:return!(e.byteLength!=t.byteLength||!o(new Gr(e),new Gr(t)));case Dr:case Ur:case zr:return ri(+e,+t);case qr:return e.name==t.name&&e.message==t.message;case Hr:case Kr:return e==t+"";case Pe:var a=ws;case Oe:var c=r&ke;if(a||(a=Es),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=Lr,s.set(e,t);var l=ni(a(e),a(t),r,i,o,s);return s.delete(e),l;case Qo:if(St)return St.call(e)==St.call(t)}return!1}function fa(e,t,n,r,i,o){var s=n&ke,a=Br(e),c=a.length,u=Br(t),l=u.length;if(c!=l&&!s)return!1;for(var d=c;d--;){var f=a[d];if(!(s?f in t:A.call(t,f)))return!1}var m=o.get(e);if(m&&o.get(t))return m==t;var p=!0;o.set(e,t),o.set(t,e);for(var g=s;++d<c;){f=a[d];var h=e[f],S=t[f];if(r)var E=s?r(S,h,f,t,e,o):r(h,S,f,e,t,o);if(!(E===void 0?h===S||i(h,S,n,r,o):E)){p=!1;break}g||(g=f=="constructor")}if(p&&!g){var P=e.constructor,I=t.constructor;P!=I&&"constructor"in e&&"constructor"in t&&!(typeof P=="function"&&P instanceof P&&typeof I=="function"&&I instanceof I)&&(p=!1)}return o.delete(e),o.delete(t),p}function Br(e){return ia(e,wa,da)}function $e(e,t){var n=e.__data__;return ma(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ee(e,t){var n=Ss(e,t);return sa(n)?n:void 0}function la(e){var t=A.call(e,L),n=e[L];try{e[L]=void 0;var r=!0}catch{}var i=Qr.call(e);return r&&(t?e[L]=n:delete e[L]),i}var da=Rr?function(e){return e==null?[]:(e=Object(e),ms(Rr(e),function(t){return ei.call(e,t)}))}:va,G=de;(Et&&G(new Et(new ArrayBuffer(1)))!=je||ue&&G(new ue)!=Pe||Tt&&G(Tt.resolve())!=Or||_t&&G(new _t)!=Oe||It&&G(new It)!=vt)&&(G=function(e){var t=de(e),n=t==Z?e.constructor:void 0,r=n?U(n):"";if(r)switch(r){case As:return je;case Cs:return Pe;case Ns:return Or;case ks:return Oe;case Gs:return vt}return t});function pa(e,t){return t=t??Mr,!!t&&(typeof e=="number"||ds.test(e))&&e>-1&&e%1==0&&e<t}function ma(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ga(e){return!!Nr&&Nr in e}function ha(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Ge;return e===n}function ya(e){return Qr.call(e)}function U(e){if(e!=null){try{return Zr.call(e)}catch{}try{return e+""}catch{}}return""}function ri(e,t){return e===t||e!==e&&t!==t}var xa=Fr(function(){return arguments}())?Fr:function(e){return le(e)&&A.call(e,"callee")&&!ei.call(e,"callee")},Ne=Array.isArray;function ba(e){return e!=null&&oi(e.length)&&!ii(e)}var Pt=Os||Ea;function Sa(e,t){return ti(e,t)}function ii(e){if(!si(e))return!1;var t=de(e);return t==Wr||t==Yo||t==Vo||t==Zo}function oi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Mr}function si(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function le(e){return e!=null&&typeof e=="object"}var ai=Cr?xs(Cr):aa;function wa(e){return ba(e)?ra(e):ca(e)}function va(){return[]}function Ea(){return!1}Q.exports=Sa});var Ct=require("commander"),yi=y(require("path"));var Rt=require("commander"),$t=y(require("fast-glob")),Fe=y(require("fs-extra")),Ft=y(require("path")),C=y(require("@techor/log"));var Gt=y(require("fs-extra"));function q(e="./package.json"){return Gt.default.readJSONSync(e,{throws:!1})||{}}var Ti=q(),_i={workspaces:Ti.workspaces};Rt.program.command("version <version>").description("Bump to specific version for workspace's packages").option("-p, --prefix <symbol>","Version prefix `^`, `~`, `>`, `>=`, `<`, `<=` ","^").option("-w, --workspaces <paths>","Specific your workspaces",_i.workspaces).option("-ls, --list","List current bumpable dependency tree in workspaces",!1).action((e,{prefix:t,list:n,workspaces:r})=>{let i=t+e,o={},s={},a=r.map(l=>Ft.default.join(l,"*package.json")),c=(l,d)=>{let f=!1;for(let m in l)m in s&&l[m]===""&&(l[m]=i,f=!0);return f};for(let l of $t.default.sync(a)){let d=Fe.default.readJSONSync(l);d.private||(o[l]=d,s[d.name]=d,d.version=e)}for(let l in o){let d=o[l],{dependencies:f,peerDependencies:m}=o[l];f&&c(f,"dependencies"),m&&c(m,"peerDependencies"),n||Fe.default.writeJSONSync(l,d)}let u={};for(let l in s){let{dependencies:d,peerDependencies:f}=s[l],m=u[(0,C.paint)("**"+l+"**")]={},p=(g,h)=>{if(g){m[h]={};for(let S in g)if(S in s){let E=g[S];m[h][(0,C.paint)("**"+S+"**")]=E===i?null:i}}};p(d,"dependencies"),p(f,"peerDependencies"),Object.keys(u[(0,C.paint)("**"+l+"**")]).length||(u[(0,C.paint)("**"+l+"**")]=null)}C.default`📦`,C.default.tree(u),C.default.success`bump version to +${i}+ for ${Object.keys(s).length} packages in all workspace`});var di=require("commander"),pi=y(require("fast-glob"));var dr=require("node:buffer"),pr=y(require("node:path"),1),st=y(require("node:child_process"),1),ie=y(require("node:process"),1),mr=y(In(),1);function Ke(e){let t=typeof e=="string"?`
3
3
  `:`
4
- `.charCodeAt(),n=typeof e=="string"?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===n&&(e=e.slice(0,-1)),e}var te=y(require("node:process"),1),H=y(require("node:path"),1),In=y(require("node:url"),1);function he(e={}){let{env:t=process.env,platform:n=process.platform}=e;return n!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"}function Zi(e={}){let{cwd:t=te.default.cwd(),path:n=te.default.env[he()],execPath:r=te.default.execPath}=e,i,o=t instanceof URL?In.default.fileURLToPath(t):t,s=H.default.resolve(o),a=[];for(;i!==s;)a.push(H.default.join(s,"node_modules/.bin")),i=s,s=H.default.resolve(s,"..");return a.push(H.default.resolve(o,r,"..")),[...a,n].join(H.default.delimiter)}function On({env:e=te.default.env,...t}={}){e={...e};let n=he({env:e});return t.path=e[n],e[n]=Zi(t),e}var Qi=(e,t,n,r)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let i=Object.getOwnPropertyDescriptor(e,n),o=Object.getOwnPropertyDescriptor(t,n);!eo(i,o)&&r||Object.defineProperty(e,n,o)},eo=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},to=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},no=(e,t)=>`/* Wrapped ${e}*/
5
- ${t}`,ro=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),io=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),oo=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,i=no.bind(null,r,t.toString());Object.defineProperty(i,"name",io),Object.defineProperty(e,"toString",{...ro,value:i})};function Xe(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let i of Reflect.ownKeys(t))Qi(e,t,i,n);return to(e,t),oo(e,t,r),e}var ye=new WeakMap,An=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,r=0,i=e.displayName||e.name||"<anonymous>",o=function(...s){if(ye.set(o,++r),r===1)n=e.apply(this,s),e=null;else if(t.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return n};return Xe(o,e),ye.set(o,r),o};An.callCount=e=>{if(!ye.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return ye.get(e)};var jn=An;var Rn=require("os");var Cn=function(){let e=Ye-Nn+1;return Array.from({length:e},so)},so=function(e,t){return{name:`SIGRT${t+1}`,number:Nn+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},Nn=34,Ye=64;var Gn=require("os");var kn=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var Ve=function(){let e=Cn();return[...kn,...e].map(ao)},ao=function({name:e,number:t,description:n,action:r,forced:i=!1,standard:o}){let{signals:{[e]:s}}=Gn.constants,a=s!==void 0;return{name:e,number:a?s:t,description:n,supported:a,action:r,forced:i,standard:o}};var co=function(){return Ve().reduce(uo,{})},uo=function(e,{name:t,number:n,description:r,supported:i,action:o,forced:s,standard:a}){return{...e,[t]:{name:t,number:n,description:r,supported:i,action:o,forced:s,standard:a}}},$n=co(),fo=function(){let e=Ve(),t=64+1,n=Array.from({length:t},(r,i)=>lo(i,e));return Object.assign({},...n)},lo=function(e,t){let n=po(e,t);if(n===void 0)return{};let{name:r,description:i,supported:o,action:s,forced:a,standard:c}=n;return{[e]:{name:r,number:e,description:i,supported:o,action:s,forced:a,standard:c}}},po=function(e,t){let n=t.find(({name:r})=>Rn.constants.signals[r]===e);return n!==void 0?n:t.find(r=>r.number===e)},oc=fo();var mo=({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:i,exitCode:o,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":n!==void 0?`failed with ${n}`:r!==void 0?`was killed with ${r} (${i})`:o!==void 0?`failed with exit code ${o}`:"failed",Je=({stdout:e,stderr:t,all:n,error:r,signal:i,exitCode:o,command:s,escapedCommand:a,timedOut:c,isCanceled:f,killed:l,parsed:{options:{timeout:u}}})=>{o=o===null?void 0:o,i=i===null?void 0:i;let p=i===void 0?void 0:$n[i].description,d=r&&r.code,g=`Command ${mo({timedOut:c,timeout:u,errorCode:d,signal:i,signalDescription:p,exitCode:o,isCanceled:f})}: ${s}`,h=Object.prototype.toString.call(r)==="[object Error]",S=h?`${g}
6
- ${r.message}`:g,T=[S,t,e].filter(Boolean).join(`
7
- `);return h?(r.originalMessage=r.message,r.message=T):r=new Error(T),r.shortMessage=S,r.command=s,r.escapedCommand=a,r.exitCode=o,r.signal=i,r.signalDescription=p,r.stdout=e,r.stderr=t,n!==void 0&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=Boolean(c),r.isCanceled=f,r.killed=l&&!c,r};var xe=["stdin","stdout","stderr"],go=e=>xe.some(t=>e[t]!==void 0),Bn=e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return xe.map(r=>e[r]);if(go(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xe.map(r=>`\`${r}\``).join(", ")}`);if(typeof t=="string")return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let n=Math.max(t.length,xe.length);return Array.from({length:n},(r,i)=>t[i])};var Wn=y(require("node:os"),1),zn=y(qn(),1),ho=1e3*5,Hn=(e,t="SIGTERM",n={})=>{let r=e(t);return yo(e,t,n,r),r},yo=(e,t,n,r)=>{if(!xo(t,n,r))return;let i=So(n),o=setTimeout(()=>{e("SIGKILL")},i);o.unref&&o.unref()},xo=(e,{forceKillAfterTimeout:t},n)=>bo(e)&&t!==!1&&n,bo=e=>e===Wn.default.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",So=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return ho;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Kn=(e,t)=>{e.kill()&&(t.isCanceled=!0)},wo=(e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))},Xn=(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(t===0||t===void 0)return r;let i,o=new Promise((a,c)=>{i=setTimeout(()=>{wo(e,n,c)},t)}),s=r.finally(()=>{clearTimeout(i)});return Promise.race([o,s])},Yn=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},Vn=async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;let i=(0,zn.default)(()=>{e.kill()});return r.finally(()=>{i()})};function Jn(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"}var rt=y(er(),1),rr=y(nr(),1),ir=(e,t)=>{t===void 0||e.stdin===void 0||(Jn(t)?t.pipe(e.stdin):e.stdin.end(t))},or=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let n=(0,rr.default)();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},tt=async(e,t)=>{if(e){e.destroy();try{return await t}catch(n){return n.bufferedData}}},nt=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(!(!e||!n))return t?(0,rt.default)(e,{encoding:t,maxBuffer:r}):rt.default.buffer(e,{maxBuffer:r})},sr=async({stdout:e,stderr:t,all:n},{encoding:r,buffer:i,maxBuffer:o},s)=>{let a=nt(e,{encoding:r,buffer:i,maxBuffer:o}),c=nt(t,{encoding:r,buffer:i,maxBuffer:o}),f=nt(n,{encoding:r,buffer:i,maxBuffer:o*2});try{return await Promise.all([s,a,c,f])}catch(l){return Promise.all([{error:l,signal:l.signal,timedOut:l.timedOut},tt(e,a),tt(t,c),tt(n,f)])}};var Ao=(async()=>{})().constructor.prototype,jo=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ao,e)]),it=(e,t)=>{for(let[n,r]of jo){let i=typeof t=="function"?(...o)=>Reflect.apply(r.value,t(),o):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:i})}return e},ar=e=>new Promise((t,n)=>{e.on("exit",(r,i)=>{t({exitCode:r,signal:i})}),e.on("error",r=>{n(r)}),e.stdin&&e.stdin.on("error",r=>{n(r)})});var cr=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Co=/^[\w.-]+$/,No=/"/g,ko=e=>typeof e!="string"||Co.test(e)?e:`"${e.replace(No,'\\"')}"`,ur=(e,t)=>cr(e,t).join(" "),fr=(e,t)=>cr(e,t).map(n=>ko(n)).join(" "),Go=/ +/g,lr=e=>{let t=[];for(let n of e.trim().split(Go)){let r=t[t.length-1];r&&r.endsWith("\\")?t[t.length-1]=`${r.slice(0,-1)} ${n}`:t.push(n)}return t};var Ro=1e3*1e3*100,$o=({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:i})=>{let o=t?{...ie.default.env,...e}:e;return n?On({env:o,cwd:r,execPath:i}):o},Bo=(e,t,n={})=>{let r=mr.default._parse(e,t,n);return e=r.command,t=r.args,n=r.options,n={maxBuffer:Ro,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n.cwd||ie.default.cwd(),execPath:ie.default.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n},n.env=$o(n),n.stdio=Bn(n),ie.default.platform==="win32"&&pr.default.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:n,parsed:r}},ot=(e,t,n)=>typeof t!="string"&&!dr.Buffer.isBuffer(t)?n===void 0?void 0:"":e.stripFinalNewline?Ke(t):t;function Fo(e,t,n){let r=Bo(e,t,n),i=ur(e,t),o=fr(e,t);Yn(r.options);let s;try{s=st.default.spawn(r.file,r.args,r.options)}catch(d){let m=new st.default.ChildProcess,g=Promise.reject(Je({error:d,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return it(m,g)}let a=ar(s),c=Xn(s,r.options,a),f=Vn(s,r.options,c),l={isCanceled:!1};s.kill=Hn.bind(null,s.kill.bind(s)),s.cancel=Kn.bind(null,s,l);let p=jn(async()=>{let[{error:d,exitCode:m,signal:g,timedOut:h},S,T,I]=await sr(s,r.options,f),P=ot(r.options,S),A=ot(r.options,T),me=ot(r.options,I);if(d||m!==0||g!==null){let Nt=Je({error:d,exitCode:m,signal:g,stdout:P,stderr:A,all:me,command:i,escapedCommand:o,parsed:r,timedOut:h,isCanceled:l.isCanceled||(r.options.signal?r.options.signal.aborted:!1),killed:s.killed});if(!r.options.reject)return Nt;throw Nt}return{command:i,escapedCommand:o,exitCode:0,stdout:P,stderr:A,all:me,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return ir(s,r.options.input),s.all=or(s,r.options),it(s,p)}function gr(e,t){let[n,...r]=lr(e);return Fo(n,r,t)}var mi=require("esbuild");function at(e,t=1,n={}){let{indent:r=" ",includeEmptyLines:i=!1}=n;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if(typeof r!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r}\``);if(t===0)return e;let o=i?/^/gm:/^(?!\s*$)/gm;return e.replace(o,r.repeat(t))}var ut=y(require("os"),1);function ct(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var hr=/\s+at.*[(\s](.*)\)?/,Lo=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,Mo=typeof ut.default.homedir>"u"?"":ut.default.homedir().replace(/\\/g,"/");function ft(e,{pretty:t=!1,basePath:n}={}){let r=n&&new RegExp(`(at | \\()${ct(n.replace(/\\/g,"/"))}`,"g");if(typeof e=="string")return e.replace(/\\/g,"/").split(`
4
+ `.charCodeAt(),n=typeof e=="string"?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===n&&(e=e.slice(0,-1)),e}var te=y(require("node:process"),1),H=y(require("node:path"),1),Pn=y(require("node:url"),1);function he(e={}){let{env:t=process.env,platform:n=process.platform}=e;return n!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"}function Zi(e={}){let{cwd:t=te.default.cwd(),path:n=te.default.env[he()],execPath:r=te.default.execPath}=e,i,o=t instanceof URL?Pn.default.fileURLToPath(t):t,s=H.default.resolve(o),a=[];for(;i!==s;)a.push(H.default.join(s,"node_modules/.bin")),i=s,s=H.default.resolve(s,"..");return a.push(H.default.resolve(o,r,"..")),[...a,n].join(H.default.delimiter)}function On({env:e=te.default.env,...t}={}){e={...e};let n=he({env:e});return t.path=e[n],e[n]=Zi(t),e}var Qi=(e,t,n,r)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let i=Object.getOwnPropertyDescriptor(e,n),o=Object.getOwnPropertyDescriptor(t,n);!eo(i,o)&&r||Object.defineProperty(e,n,o)},eo=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},to=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},no=(e,t)=>`/* Wrapped ${e}*/
5
+ ${t}`,ro=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),io=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),oo=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,i=no.bind(null,r,t.toString());Object.defineProperty(i,"name",io),Object.defineProperty(e,"toString",{...ro,value:i})};function Xe(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let i of Reflect.ownKeys(t))Qi(e,t,i,n);return to(e,t),oo(e,t,r),e}var ye=new WeakMap,jn=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,r=0,i=e.displayName||e.name||"<anonymous>",o=function(...s){if(ye.set(o,++r),r===1)n=e.apply(this,s),e=null;else if(t.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return n};return Xe(o,e),ye.set(o,r),o};jn.callCount=e=>{if(!ye.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return ye.get(e)};var An=jn;var Rn=require("os");var Cn=function(){let e=Ve-Nn+1;return Array.from({length:e},so)},so=function(e,t){return{name:`SIGRT${t+1}`,number:Nn+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},Nn=34,Ve=64;var Gn=require("os");var kn=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var Ye=function(){let e=Cn();return[...kn,...e].map(ao)},ao=function({name:e,number:t,description:n,action:r,forced:i=!1,standard:o}){let{signals:{[e]:s}}=Gn.constants,a=s!==void 0;return{name:e,number:a?s:t,description:n,supported:a,action:r,forced:i,standard:o}};var co=function(){return Ye().reduce(uo,{})},uo=function(e,{name:t,number:n,description:r,supported:i,action:o,forced:s,standard:a}){return{...e,[t]:{name:t,number:n,description:r,supported:i,action:o,forced:s,standard:a}}},$n=co(),fo=function(){let e=Ye(),t=64+1,n=Array.from({length:t},(r,i)=>lo(i,e));return Object.assign({},...n)},lo=function(e,t){let n=po(e,t);if(n===void 0)return{};let{name:r,description:i,supported:o,action:s,forced:a,standard:c}=n;return{[e]:{name:r,number:e,description:i,supported:o,action:s,forced:a,standard:c}}},po=function(e,t){let n=t.find(({name:r})=>Rn.constants.signals[r]===e);return n!==void 0?n:t.find(r=>r.number===e)},oc=fo();var mo=({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:i,exitCode:o,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":n!==void 0?`failed with ${n}`:r!==void 0?`was killed with ${r} (${i})`:o!==void 0?`failed with exit code ${o}`:"failed",Je=({stdout:e,stderr:t,all:n,error:r,signal:i,exitCode:o,command:s,escapedCommand:a,timedOut:c,isCanceled:u,killed:l,parsed:{options:{timeout:d}}})=>{o=o===null?void 0:o,i=i===null?void 0:i;let f=i===void 0?void 0:$n[i].description,m=r&&r.code,g=`Command ${mo({timedOut:c,timeout:d,errorCode:m,signal:i,signalDescription:f,exitCode:o,isCanceled:u})}: ${s}`,h=Object.prototype.toString.call(r)==="[object Error]",S=h?`${g}
6
+ ${r.message}`:g,E=[S,t,e].filter(Boolean).join(`
7
+ `);return h?(r.originalMessage=r.message,r.message=E):r=new Error(E),r.shortMessage=S,r.command=s,r.escapedCommand=a,r.exitCode=o,r.signal=i,r.signalDescription=f,r.stdout=e,r.stderr=t,n!==void 0&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=Boolean(c),r.isCanceled=u,r.killed=l&&!c,r};var xe=["stdin","stdout","stderr"],go=e=>xe.some(t=>e[t]!==void 0),Fn=e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return xe.map(r=>e[r]);if(go(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xe.map(r=>`\`${r}\``).join(", ")}`);if(typeof t=="string")return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let n=Math.max(t.length,xe.length);return Array.from({length:n},(r,i)=>t[i])};var Wn=y(require("node:os"),1),zn=y(qn(),1),ho=1e3*5,Hn=(e,t="SIGTERM",n={})=>{let r=e(t);return yo(e,t,n,r),r},yo=(e,t,n,r)=>{if(!xo(t,n,r))return;let i=So(n),o=setTimeout(()=>{e("SIGKILL")},i);o.unref&&o.unref()},xo=(e,{forceKillAfterTimeout:t},n)=>bo(e)&&t!==!1&&n,bo=e=>e===Wn.default.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",So=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return ho;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Kn=(e,t)=>{e.kill()&&(t.isCanceled=!0)},wo=(e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))},Xn=(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(t===0||t===void 0)return r;let i,o=new Promise((a,c)=>{i=setTimeout(()=>{wo(e,n,c)},t)}),s=r.finally(()=>{clearTimeout(i)});return Promise.race([o,s])},Vn=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},Yn=async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;let i=(0,zn.default)(()=>{e.kill()});return r.finally(()=>{i()})};function Jn(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"}var rt=y(er(),1),rr=y(nr(),1),ir=(e,t)=>{t===void 0||e.stdin===void 0||(Jn(t)?t.pipe(e.stdin):e.stdin.end(t))},or=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let n=(0,rr.default)();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},tt=async(e,t)=>{if(e){e.destroy();try{return await t}catch(n){return n.bufferedData}}},nt=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(!(!e||!n))return t?(0,rt.default)(e,{encoding:t,maxBuffer:r}):rt.default.buffer(e,{maxBuffer:r})},sr=async({stdout:e,stderr:t,all:n},{encoding:r,buffer:i,maxBuffer:o},s)=>{let a=nt(e,{encoding:r,buffer:i,maxBuffer:o}),c=nt(t,{encoding:r,buffer:i,maxBuffer:o}),u=nt(n,{encoding:r,buffer:i,maxBuffer:o*2});try{return await Promise.all([s,a,c,u])}catch(l){return Promise.all([{error:l,signal:l.signal,timedOut:l.timedOut},tt(e,a),tt(t,c),tt(n,u)])}};var jo=(async()=>{})().constructor.prototype,Ao=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(jo,e)]),it=(e,t)=>{for(let[n,r]of Ao){let i=typeof t=="function"?(...o)=>Reflect.apply(r.value,t(),o):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:i})}return e},ar=e=>new Promise((t,n)=>{e.on("exit",(r,i)=>{t({exitCode:r,signal:i})}),e.on("error",r=>{n(r)}),e.stdin&&e.stdin.on("error",r=>{n(r)})});var cr=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Co=/^[\w.-]+$/,No=/"/g,ko=e=>typeof e!="string"||Co.test(e)?e:`"${e.replace(No,'\\"')}"`,ur=(e,t)=>cr(e,t).join(" "),fr=(e,t)=>cr(e,t).map(n=>ko(n)).join(" "),Go=/ +/g,lr=e=>{let t=[];for(let n of e.trim().split(Go)){let r=t[t.length-1];r&&r.endsWith("\\")?t[t.length-1]=`${r.slice(0,-1)} ${n}`:t.push(n)}return t};var Ro=1e3*1e3*100,$o=({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:i})=>{let o=t?{...ie.default.env,...e}:e;return n?On({env:o,cwd:r,execPath:i}):o},Fo=(e,t,n={})=>{let r=mr.default._parse(e,t,n);return e=r.command,t=r.args,n=r.options,n={maxBuffer:Ro,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n.cwd||ie.default.cwd(),execPath:ie.default.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n},n.env=$o(n),n.stdio=Fn(n),ie.default.platform==="win32"&&pr.default.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:n,parsed:r}},ot=(e,t,n)=>typeof t!="string"&&!dr.Buffer.isBuffer(t)?n===void 0?void 0:"":e.stripFinalNewline?Ke(t):t;function Bo(e,t,n){let r=Fo(e,t,n),i=ur(e,t),o=fr(e,t);Vn(r.options);let s;try{s=st.default.spawn(r.file,r.args,r.options)}catch(m){let p=new st.default.ChildProcess,g=Promise.reject(Je({error:m,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return it(p,g)}let a=ar(s),c=Xn(s,r.options,a),u=Yn(s,r.options,c),l={isCanceled:!1};s.kill=Hn.bind(null,s.kill.bind(s)),s.cancel=Kn.bind(null,s,l);let f=An(async()=>{let[{error:m,exitCode:p,signal:g,timedOut:h},S,E,P]=await sr(s,r.options,u),I=ot(r.options,S),j=ot(r.options,E),me=ot(r.options,P);if(m||p!==0||g!==null){let Nt=Je({error:m,exitCode:p,signal:g,stdout:I,stderr:j,all:me,command:i,escapedCommand:o,parsed:r,timedOut:h,isCanceled:l.isCanceled||(r.options.signal?r.options.signal.aborted:!1),killed:s.killed});if(!r.options.reject)return Nt;throw Nt}return{command:i,escapedCommand:o,exitCode:0,stdout:I,stderr:j,all:me,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return ir(s,r.options.input),s.all=or(s,r.options),it(s,f)}function gr(e,t){let[n,...r]=lr(e);return Bo(n,r,t)}var mi=require("esbuild");function at(e,t=1,n={}){let{indent:r=" ",includeEmptyLines:i=!1}=n;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if(typeof r!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r}\``);if(t===0)return e;let o=i?/^/gm:/^(?!\s*$)/gm;return e.replace(o,r.repeat(t))}var ut=y(require("os"),1);function ct(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var hr=/\s+at.*[(\s](.*)\)?/,Lo=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,Mo=typeof ut.default.homedir>"u"?"":ut.default.homedir().replace(/\\/g,"/");function ft(e,{pretty:t=!1,basePath:n}={}){let r=n&&new RegExp(`(at | \\()${ct(n.replace(/\\/g,"/"))}`,"g");if(typeof e=="string")return e.replace(/\\/g,"/").split(`
8
8
  `).filter(i=>{let o=i.match(hr);if(o===null||!o[1])return!0;let s=o[1];return s.includes(".app/Contents/Resources/electron.asar")||s.includes(".app/Contents/Resources/default_app.asar")||s.includes("node_modules/electron/dist/resources/electron.asar")||s.includes("node_modules/electron/dist/resources/default_app.asar")?!1:!Lo.test(s)}).filter(i=>i.trim()!=="").map(i=>(r&&(i=i.replace(r,"$1")),t&&(i=i.replace(hr,(o,s)=>o.replace(s,s.replace(Mo,"~")))),i)).join(`
9
9
  `)}var Do=e=>e.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,""),oe=class extends Error{#e;name="AggregateError";constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);t=t.map(r=>r instanceof Error?r:r!==null&&typeof r=="object"?Object.assign(new Error(r.message),r):new Error(r));let n=t.map(r=>typeof r.stack=="string"&&r.stack.length>0?Do(ft(r.stack)):String(r)).join(`
10
10
  `);n=`
11
- `+at(n,4),super(n),this.#e=t}get errors(){return this.#e.slice()}};var lt=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t}},yr=e=>globalThis.DOMException===void 0?new lt(e):new DOMException(e),xr=e=>{let t=e.reason===void 0?yr("This operation was aborted."):e.reason;return t instanceof Error?t:yr(t)};async function dt(e,t,{concurrency:n=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:i}={}){return new Promise((o,s)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(n)||n===Number.POSITIVE_INFINITY)&&n>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);let a=[],c=[],f=new Map,l=!1,u=!1,p=!1,d=0,m=0,g=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),h=T=>{l=!0,u=!0,s(T)};i&&(i.aborted&&h(xr(i)),i.addEventListener("abort",()=>{h(xr(i))}));let S=async()=>{if(u)return;let T=await g.next(),I=m;if(m++,T.done){if(p=!0,d===0&&!u){if(!r&&c.length>0){h(new oe(c));return}if(u=!0,f.size===0){o(a);return}let P=[];for(let[A,me]of a.entries())f.get(A)!==br&&P.push(me);o(P)}return}d++,(async()=>{try{let P=await T.value;if(u)return;let A=await t(P,I);A===br&&f.set(I,A),a[I]=A,d--,await S()}catch(P){if(r)h(P);else{c.push(P),d--;try{await S()}catch(A){h(A)}}}})()};(async()=>{for(let T=0;T<n;T++){try{await S()}catch(I){h(I);break}if(p||l)break}})()})}var br=Symbol("skip");async function pt(e,t){return dt(e,n=>n(),t)}var O=y(require("@techor/log")),U=y(Tr());var pe=y(require("to-line"));var Wo=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],zo=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Ho=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Ko=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],_r=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function _e(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,...t};let n=t.bits?t.binary?Ko:Ho:t.binary?zo:Wo;if(t.signed&&e===0)return` 0 ${n[0]}`;let r=e<0,i=r?"-":t.signed?"+":"";r&&(e=-e);let o;if(t.minimumFractionDigits!==void 0&&(o={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(o={maximumFractionDigits:t.maximumFractionDigits,...o}),e<1){let f=_r(e,t.locale,o);return i+f+" "+n[0]}let s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,o||(e=e.toPrecision(3));let a=_r(Number(e),t.locale,o),c=n[s];return i+a+" "+c}var gi=y(Ir()),At=y(require("fs")),hi=y(ci());var ui=["sourcemap","legalComments","sourceRoot","sourcesContent","format","globalName","target","supported","platform","mangleProps","reserveProps","mangleQuoted","mangleCache","drop","minify","minifyWhitespace","minifyIdentifiers","minifySyntax","charset","treeShaking","ignoreAnnotations","jsx","jsxFactory","jsxFragment","jsxImportSource","jsxDev","jsxSideEffects","define","pure","keepNames","color","logLevel","logLimit","logOverride","bundle","splitting","preserveSymlinks","outfile","metafile","outdir","outbase","external","packages","alias","loader","resolveExtensions","mainFields","conditions","write","allowOverwrite","tsconfig","outExtension","publicPath","entryNames","chunkNames","assetNames","inject","banner","footer","incremental","entryPoints","stdin","plugins","absWorkingDir","nodePaths","watch"];var Ta={js:"iife",cjs:"cjs",mjs:"esm",css:"css"},w=q(),{dependencies:fi,peerDependencies:li}=w,jt=[];fi&&jt.push(...Object.keys(fi));li&&jt.push(...Object.keys(li));di.program.command("pack [entryPaths...]").option("-f, --format [formats...]","The output format for the generated JavaScript files `iife`, `cjs`, `esm`",["cjs","esm"]).option("-w, --watch","Rebuild whenever a file changes",!1).option("-s, --sourcemap","Emit a source map",!0).option("-p, --platform <node,browser,neutral>","Platform target","browser").option("-t, --type","Emit typescript declarations",w.types).option("-o, --outdir <dir>","The output directory for the build operation","dist").option("-e, --external <packages...>","External packages to exclude from the build",jt).option("-ee, --extra-external <packages...>","Extra external packages to exclude from the build",[]).option("-kn, --keep-names","Keep JavaScript function/class names",!1).option("--srcdir <dir>","The source directory","src").option("--target","This sets the target environment for the generated JavaScript and/or CSS code.","esnext").option("--mangle-props","Pass a regular expression to esbuild to tell esbuild to automatically rename all properties that match this regular expression","^_").option("--resolve-extensions","The resolution algorithm used by node supports implicit file extensions",[".tsx",".ts",".jsx",".js",".mjs",".cjs",".css",".json"]).option("--no-bundle","No inline any imported dependencies into the file itself",!0).option("--no-minify","The generated code will not be minified instead of pretty-printed").option("--no-clean","No clean up the previous output directory before the build starts").action(async function(e,t,n){t.clean&&At.default.existsSync(t.outdir)&&(At.default.rmSync(t.outdir,{force:!0,recursive:!0}),console.log(""),O.default.d`Cleaned up the **${t.outdir}** output directory`);let r=[],i=(a,c)=>U.default.changeExt(U.default.join(t.srcdir,U.default.relative(t.outdir,a)),c),o=async(a,c)=>{let f=c.format==="css",l=c.outFile?U.default.extname(c.outFile):"",u={...t,outExtension:f?{".css":".css"}:{".js":l||{cjs:".cjs",esm:".mjs",iife:".js"}[c.format]},external:[...t.external,...t.extraExternal],watch:t.watch?{onRebuild(d,m){}}:!1,logLevel:"silent",outbase:t.srcdir,platform:c.platform||t.platform,metafile:!0,format:f?void 0:c.format,keepNames:t.keepNames,mangleProps:t.mangleProps?new RegExp(t.mangleProps):void 0,resolveExtensions:t.resolveExtensions,target:t.target,sourcemap:t.sourcemap};for(let d in u)ui.includes(d)||delete u[d];u.entryPoints=pi.default.sync([...new Set(a)].map(d=>(0,gi.default)(d))).filter(d=>!r.find(m=>m.options.entryPoints.includes(d)&&m.options.format===u.format&&(0,hi.default)(m.options.outExtension,u.outExtension)));let p={options:u,run:async()=>{let{metafile:d}=await(0,mi.build)(u);if(d){console.log(""),p.metafile=d;for(let m in d.outputs){let g=d.outputs[m],h=_e(g.bytes).replace(/ /g,""),S=d.outputs[m].format=c.format;O.default`${O.chalk.dim("\u2502")} $t [${S}] **${m}** ${h} (${Object.keys(g.inputs).length} inputs)`}O.default.tree({entries:u.entryPoints,external:u.external,outdir:u.outdir,format:u.format,platform:u.platform,[Object.keys(u).filter(m=>u[m]===!0).map(m=>O.chalk.green("\u2713 ")+m).join(", ")]:null})}}};u.entryPoints.length&&r.push(p)};if(w.style&&o([i(w.main,".css")],{format:"css"}),w.main&&!w.main.endsWith(".css")&&o([i(w.main,".{js,ts,jsx,tsx}")],{format:"cjs",outFile:w.main}),w.module&&o([i(w.module,".{js,ts,jsx,tsx}")],{format:"esm",outFile:w.module}),w.browser&&o([i(w.browser,".{js,ts,jsx,tsx}")],{format:"iife",platform:"browser",outFile:w.browser}),w.bin)if(typeof w.bin=="string")o([i(w.bin,".{js,ts,jsx,tsx}")],{format:"cjs",platform:"node",outFile:w.bin});else for(let a in w.bin){let c=w.bin[a];o([i(c,".{js,ts,jsx,tsx}")],{format:"cjs",platform:"node",outFile:c})}w.exports&&function a(c,f,l){if(typeof c=="string"){let u=U.default.extname(c);o([i(c,".{js,ts,jsx,tsx}")],{format:l.format||Ta[u],outFile:l.outFile||c,platform:l.platform})}else for(let u in c){let p=c[u],d,m;switch(f){case"node":m="node";break;case"browser":m="browser";break;case"require":d="cjs";break;case"import":d="esm";break}if(u.startsWith("."))a(p,u);else switch(u){case"node":a(p,u,{platform:"node",format:d});break;case"browser":a(p,u,{platform:"browser",format:d});break;case"default":a(p,u,{platform:m,format:d});break;case"require":a(p,u,{platform:m,format:"cjs"});break;case"import":a(p,u,{platform:m,format:"esm"});break}}}(w.exports,""),e.length&&(e.find(c=>c.includes(".css"))?o(e,{format:"css"}):t.format.map(c=>o(e,{format:c}))),r.length||t.format.map(a=>o([U.default.join(t.srcdir,"index.ts")],{format:a}));let s;t.type&&(s={outFile:"declarations",options:{platform:"type",format:"dts"},run:()=>new Promise(a=>{let c=()=>gr(pe.default`
11
+ `+at(n,4),super(n),this.#e=t}get errors(){return this.#e.slice()}};var lt=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t}},yr=e=>globalThis.DOMException===void 0?new lt(e):new DOMException(e),xr=e=>{let t=e.reason===void 0?yr("This operation was aborted."):e.reason;return t instanceof Error?t:yr(t)};async function dt(e,t,{concurrency:n=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:i}={}){return new Promise((o,s)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(n)||n===Number.POSITIVE_INFINITY)&&n>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);let a=[],c=[],u=new Map,l=!1,d=!1,f=!1,m=0,p=0,g=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),h=E=>{l=!0,d=!0,s(E)};i&&(i.aborted&&h(xr(i)),i.addEventListener("abort",()=>{h(xr(i))}));let S=async()=>{if(d)return;let E=await g.next(),P=p;if(p++,E.done){if(f=!0,m===0&&!d){if(!r&&c.length>0){h(new oe(c));return}if(d=!0,u.size===0){o(a);return}let I=[];for(let[j,me]of a.entries())u.get(j)!==br&&I.push(me);o(I)}return}m++,(async()=>{try{let I=await E.value;if(d)return;let j=await t(I,P);j===br&&u.set(P,j),a[P]=j,m--,await S()}catch(I){if(r)h(I);else{c.push(I),m--;try{await S()}catch(j){h(j)}}}})()};(async()=>{for(let E=0;E<n;E++){try{await S()}catch(P){h(P);break}if(f||l)break}})()})}var br=Symbol("skip");async function pt(e,t){return dt(e,n=>n(),t)}var O=y(require("@techor/log")),$=y(Tr());var pe=y(require("to-line"));var Wo=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],zo=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Ho=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Ko=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],_r=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function _e(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,...t};let n=t.bits?t.binary?Ko:Ho:t.binary?zo:Wo;if(t.signed&&e===0)return` 0 ${n[0]}`;let r=e<0,i=r?"-":t.signed?"+":"";r&&(e=-e);let o;if(t.minimumFractionDigits!==void 0&&(o={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(o={maximumFractionDigits:t.maximumFractionDigits,...o}),e<1){let u=_r(e,t.locale,o);return i+u+" "+n[0]}let s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,o||(e=e.toPrecision(3));let a=_r(Number(e),t.locale,o),c=n[s];return i+a+" "+c}var gi=y(Pr()),jt=y(require("fs")),hi=y(ci());var ui=["sourcemap","legalComments","sourceRoot","sourcesContent","format","globalName","target","supported","platform","mangleProps","reserveProps","mangleQuoted","mangleCache","drop","minify","minifyWhitespace","minifyIdentifiers","minifySyntax","charset","treeShaking","ignoreAnnotations","jsx","jsxFactory","jsxFragment","jsxImportSource","jsxDev","jsxSideEffects","define","pure","keepNames","color","logLevel","logLimit","logOverride","bundle","splitting","preserveSymlinks","outfile","metafile","outdir","outbase","external","packages","alias","loader","resolveExtensions","mainFields","conditions","write","allowOverwrite","tsconfig","outExtension","publicPath","entryNames","chunkNames","assetNames","inject","banner","footer","incremental","entryPoints","stdin","plugins","absWorkingDir","nodePaths","watch"];var Ta={js:"iife",cjs:"cjs",mjs:"esm",css:"css"},w=q(),{dependencies:fi,peerDependencies:li}=w,At=[];fi&&At.push(...Object.keys(fi));li&&At.push(...Object.keys(li));di.program.command("pack [entryPaths...]").option("-f, --format [formats...]","The output format for the generated JavaScript files `iife`, `cjs`, `esm`",["cjs","esm"]).option("-w, --watch","Rebuild whenever a file changes",!1).option("-s, --sourcemap","Emit a source map",process.env.NODE_ENV==="production").option("-p, --platform <node,browser,neutral>","Platform target","browser").option("-t, --type","Emit typescript declarations",w.types).option("-o, --outdir <dir>","The output directory for the build operation","dist").option("-e, --external <packages...>","External packages to exclude from the build",At).option("-ee, --extra-external <packages...>","Extra external packages to exclude from the build",[]).option("-kn, --keep-names","Keep JavaScript function/class names",!1).option("--srcdir <dir>","The source directory","src").option("--target","This sets the target environment for the generated JavaScript and/or CSS code.","esnext").option("--mangle-props","Pass a regular expression to esbuild to tell esbuild to automatically rename all properties that match this regular expression","^_").option("--resolve-extensions","The resolution algorithm used by node supports implicit file extensions",[".tsx",".ts",".jsx",".js",".mjs",".cjs",".css",".json"]).option("--no-bundle","OFF: Inline any imported dependencies into the file itself",!0).option("--no-minify","OFF: Minify the generated code").option("--no-clean","OFF: Clean up the previous output directory before the build starts").option("--no-author","OFF: Clean up the previous output directory before the build starts").option("--no-soft-bundle","OFF: Bundle only IIFE and node_modules instead of ESM and CJS source files").action(async function(e,t,n){t.clean&&jt.default.existsSync(t.outdir)&&(jt.default.rmSync(t.outdir,{force:!0,recursive:!0}),console.log(""),O.default.d`Cleaned up the **${t.outdir}** output directory`);let r=[],i=(a,c)=>$.default.changeExt($.default.join(t.srcdir,$.default.relative(t.outdir,a)),c),o=async(a,c)=>{let u=c.format==="css",l=c.outFile?$.default.extname(c.outFile):"",d=[...t.external,...t.extraExternal];t.softBundle,(c.format==="esm"||c.format==="cjs")&&d.push("./"+$.default.join(t.srcdir,"*"));let f={...t,outExtension:u?{".css":".css"}:{".js":l||{cjs:".cjs",esm:".mjs",iife:".js"}[c.format]},external:d,watch:t.watch?{onRebuild(p,g){}}:!1,logLevel:"silent",outbase:t.srcdir,platform:c.platform||t.platform,metafile:!0,format:u?void 0:c.format,keepNames:t.keepNames,mangleProps:t.mangleProps?new RegExp(t.mangleProps):void 0,resolveExtensions:t.resolveExtensions,target:t.target,sourcemap:t.sourcemap};for(let p in f)ui.includes(p)||delete f[p];f.entryPoints=pi.default.sync([...new Set(a)].map(p=>(0,gi.default)(p))).filter(p=>!r.find(g=>g.options.entryPoints.includes(p)&&g.options.format===f.format&&(0,hi.default)(g.options.outExtension,f.outExtension)));let m={options:f,run:async()=>{let{metafile:p}=await(0,mi.build)(f);if(p){console.log(""),m.metafile=p;for(let g in p.outputs){let h=p.outputs[g],S=_e(h.bytes).replace(/ /g,""),E=p.outputs[g].format=c.format;O.default`${O.chalk.dim("\u2502")} $t [${E}] **${g}** ${S} (${Object.keys(h.inputs).length} inputs)`}O.default.tree({entries:f.entryPoints,external:f.external,outdir:f.outdir,format:f.format,platform:f.platform,[Object.keys(f).filter(g=>f[g]===!0).map(g=>O.chalk.green("\u2713 ")+g).join(", ")]:null})}}};f.entryPoints.length&&r.push(m)};if(w.style&&o([i(w.main,".css")],{format:"css"}),w.main&&!w.main.endsWith(".css")&&o([i(w.main,".{js,ts,jsx,tsx}")],{format:"cjs",outFile:w.main}),w.module&&o([i(w.module,".{js,ts,jsx,tsx}")],{format:"esm",outFile:w.module}),w.browser&&o([i(w.browser,".{js,ts,jsx,tsx}")],{format:"iife",platform:"browser",outFile:w.browser}),w.bin)if(typeof w.bin=="string")o([i(w.bin,".{js,ts,jsx,tsx}")],{format:"cjs",platform:"node",outFile:w.bin});else for(let a in w.bin){let c=w.bin[a];o([i(c,".{js,ts,jsx,tsx}")],{format:"cjs",platform:"node",outFile:c})}w.exports&&function a(c,u,l){if(typeof c=="string"){let d=$.default.extname(c);o([i(c,".{js,ts,jsx,tsx}")],{format:l.format||Ta[d],outFile:l.outFile||c,platform:l.platform})}else for(let d in c){let f=c[d],m,p;switch(u){case"node":p="node";break;case"browser":p="browser";break;case"require":m="cjs";break;case"import":m="esm";break}if(d.startsWith("."))a(f,d);else switch(d){case"node":a(f,d,{platform:"node",format:m});break;case"browser":a(f,d,{platform:"browser",format:m});break;case"default":a(f,d,{platform:p,format:m});break;case"require":a(f,d,{platform:p,format:"cjs"});break;case"import":a(f,d,{platform:p,format:"esm"});break}}}(w.exports,""),e.length&&(e.find(c=>c.includes(".css"))?o(e,{format:"css"}):t.format.map(c=>o(e,{format:c}))),r.length||t.format.map(a=>o([$.default.join(t.srcdir,"index.ts")],{format:a}));let s;t.type&&(s={outFile:"declarations",options:{platform:"type",format:"dts"},run:()=>new Promise(a=>{let c=()=>gr(pe.default`
12
12
  npx tsc --emitDeclarationOnly --preserveWatchOutput --declaration
13
13
  --outDir ${t.outdir}
14
14
  ${t.watch&&"--watch"}
15
- `,{stdio:"inherit",stripFinalNewline:!1}).catch(f=>{process.exit()}).finally(a);t.watch?setTimeout(c,100):c()})},t.watch||r.push(s)),await pt(r.map(({run:a})=>a)),console.log(""),t.watch&&s&&r.push(s);for(let a of r)a.metafile?Object.keys(a.metafile.outputs).forEach(c=>{let f=a.metafile.outputs[c],l=_e(f.bytes).replace(/ /g,""),u=f.format;O.default.ok(pe.l`[${a.options.platform}] **${c}** ${l} (${u})`)}):O.default.ok(pe.l`[${a.options.format}] **${a.outFile}** (${a.options.format})`);console.log(""),t.watch?O.default`Start watching ${r.length} build tasks`:O.default.success`${r.length} build tasks`,console.log(""),t.watch&&s&&await s.run()});var{version:_a,name:Pa,description:Ia}=q(yi.default.join(__dirname,"../../package.json"));Ct.program.name(Pa).description(Ia).version(_a);Ct.program.parse();
15
+ `,{stdio:"inherit",stripFinalNewline:!1}).catch(u=>{process.exit()}).finally(a);t.watch?setTimeout(c,100):c()})},t.watch||r.push(s)),await pt(r.map(({run:a})=>a)),console.log(""),t.watch&&s&&r.push(s);for(let a of r)a.metafile?Object.keys(a.metafile.outputs).forEach(c=>{let u=a.metafile.outputs[c],l=_e(u.bytes).replace(/ /g,""),d=u.format;O.default.ok(pe.l`[${a.options.platform}] **${c}** ${l} (${d})`)}):O.default.ok(pe.l`[${a.options.format}] **${a.outFile}** (${a.options.format})`);console.log(""),t.watch?O.default`Start watching ${r.length} build tasks`:O.default.success`${r.length} build tasks`,console.log(""),t.watch&&s&&await s.run()});var{version:_a,name:Ia,description:Pa}=q(yi.default.join(__dirname,"../../package.json"));Ct.program.name(Ia).description(Pa).version(_a);Ct.program.parse();
16
16
  /*! Bundled license information:
17
17
 
18
18
  normalize-path/index.js: