You need to sign in or sign up before continuing.

aronrepo 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/index CHANGED
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
- var yi=Object.create;var Rt=Object.defineProperty;var bi=Object.getOwnPropertyDescriptor;var xi=Object.getOwnPropertyNames;var wi=Object.getPrototypeOf,Si=Object.prototype.hasOwnProperty;var S=(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 xi(t))!Si.call(e,i)&&i!==n&&Rt(e,i,{get:()=>t[i],enumerable:!(r=bi(t,i))||r.enumerable});return e};var y=(e,t,n)=>(n=e!=null?yi(wi(e)):{},Ei(t||!e||!e.__esModule?Rt(n,"default",{value:e,enumerable:!0}):n,e));var Ut=S((Ca,Dt)=>{Dt.exports=Mt;Mt.sync=Ii;var Ft=require("fs");function _i(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:_i(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=S((ja,Ht)=>{Ht.exports=Wt;Wt.sync=Pi;var qt=require("fs");function Wt(e,t,n){qt.stat(e,function(r,i){n(r,r?!1:zt(i,t))})}function Pi(e,t){return zt(qt.statSync(e),t)}function zt(e,t){return e.isFile()&&Oi(e,t)}function Oi(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),f=parseInt("010",8),u=parseInt("001",8),c=a|f,p=n&u||n&f&&i===s||n&a&&r===o||n&c&&o===0;return p}});var Yt=S((Ra,Xt)=>{var Ga=require("fs"),ge;process.platform==="win32"||global.TESTING_WINDOWS?ge=Ut():ge=Kt();Xt.exports=Fe;Fe.sync=Ai;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 Ai(e,t){try{return ge.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var nn=S((Na,tn)=>{var W=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Vt=require("path"),Ci=W?";":":",Zt=Yt(),Jt=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((c,p)=>{if(u===r.length)return t.all&&s.length?c(s):p(Jt(e));let l=r[u],d=/^".*"$/.test(l)?l.slice(1,-1):l,m=Vt.join(d,e),g=!d&&/^\.[\\\/]/.test(e)?e.slice(0,2)+m:m;c(f(g,u,0))}),f=(u,c,p)=>new Promise((l,d)=>{if(p===i.length)return l(a(c+1));let m=i[p];Zt(u+m,{pathExt:o},(g,h)=>{if(!g&&h)if(t.all)s.push(u+m);else return l(u+m);return l(f(u,c,p+1))})});return n?a(0).then(u=>n(null,u),n):a(0)},ji=(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],f=/^".*"$/.test(a)?a.slice(1,-1):a,u=Vt.join(f,e),c=!f&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let p=0;p<r.length;p++){let l=c+r[p];try{if(Zt.sync(l,{pathExt:i}))if(t.all)o.push(l);else return l}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw Jt(e)};tn.exports=en;en.sync=ji});var on=S(($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=S((ka,cn)=>{"use strict";var sn=require("path"),Gi=nn(),Ri=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=Gi.sync(e.command,{path:n[Ri({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 Ni(e){return an(e)||an(e,!0)}cn.exports=Ni});var fn=S((Ba,De)=>{"use strict";var Me=/([()\][%!^"`<>&|;, *?])/g;function $i(e){return e=e.replace(Me,"^$1"),e}function ki(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=ki});var dn=S((Fa,ln)=>{"use strict";ln.exports=/^#!(.*)/});var mn=S((La,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=S((Ma,gn)=>{"use strict";var Ue=require("fs"),Fi=mn();function Li(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 Fi(n.toString())}gn.exports=Li});var wn=S((Da,xn)=>{"use strict";var Mi=require("path"),yn=un(),bn=fn(),Di=hn(),Ui=process.platform==="win32",qi=/\.(?:com|exe)$/i,Wi=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function zi(e){e.file=yn(e);let t=e.file&&Di(e.file);return t?(e.args.unshift(e.file),e.command=t,yn(e)):e.file}function Hi(e){if(!Ui)return e;let t=zi(e),n=!qi.test(t);if(e.options.forceShell||n){let r=Wi.test(t);e.command=Mi.normalize(e.command),e.command=bn.command(e.command),e.args=e.args.map(o=>bn.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 Ki(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:Hi(r)}xn.exports=Ki});var vn=S((Ua,En)=>{"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 Xi(e,t){if(!qe)return;let n=e.emit;e.emit=function(r,i){if(r==="exit"){let o=Sn(i,t,"spawn");if(o)return n.call(e,"error",o)}return n.apply(e,arguments)}}function Sn(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}En.exports={hookChildProcess:Xi,verifyENOENT:Sn,verifyENOENTSync:Yi,notFoundError:We}});var In=S((qa,z)=>{"use strict";var Tn=require("child_process"),ze=wn(),He=vn();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 Vi(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=Vi;z.exports._parse=ze;z.exports._enoent=He});var Fn=S((uc,xe)=>{xe.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&xe.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&xe.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var qn=S((fc,Y)=>{var x=global.process,B=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(x)?(Ln=require("assert"),K=Fn(),Mn=/^win/i.test(x.platform),ne=require("events"),typeof ne!="function"&&(ne=ne.EventEmitter),x.__signal_exit_emitter__?v=x.__signal_exit_emitter__:(v=x.__signal_exit_emitter__=new ne,v.count=0,v.emitted={}),v.infinite||(v.setMaxListeners(1/0),v.infinite=!0),Y.exports=function(e,t){if(!B(global.process))return function(){};Ln.equal(typeof e,"function","a callback must be provided for exit handler"),X===!1&&Je();var n="exit";t&&t.alwaysLast&&(n="afterexit");var r=function(){v.removeListener(n,e),v.listeners("exit").length===0&&v.listeners("afterexit").length===0&&we()};return v.on(n,e),r},we=function(){!X||!B(global.process)||(X=!1,K.forEach(function(t){try{x.removeListener(t,Se[t])}catch{}}),x.emit=Ee,x.reallyExit=Qe,v.count-=1)},Y.exports.unload=we,F=function(t,n,r){v.emitted[t]||(v.emitted[t]=!0,v.emit(t,n,r))},Se={},K.forEach(function(e){Se[e]=function(){if(B(global.process)){var n=x.listeners(e);n.length===v.count&&(we(),F("exit",null,e),F("afterexit",null,e),Mn&&e==="SIGHUP"&&(e="SIGINT"),x.kill(x.pid,e))}}}),Y.exports.signals=function(){return K},X=!1,Je=function(){X||!B(global.process)||(X=!0,v.count+=1,K=K.filter(function(t){try{return x.on(t,Se[t]),!0}catch{return!1}}),x.emit=Un,x.reallyExit=Dn)},Y.exports.load=Je,Qe=x.reallyExit,Dn=function(t){B(global.process)&&(x.exitCode=t||0,F("exit",x.exitCode,null),F("afterexit",x.exitCode,null),Qe.call(x,x.exitCode))},Ee=x.emit,Un=function(t,n){if(t==="exit"&&B(global.process)){n!==void 0&&(x.exitCode=n);var r=Ee.apply(this,arguments);return F("exit",x.exitCode,null),F("afterexit",x.exitCode,null),r}else return Ee.apply(this,arguments)}):Y.exports=function(){return function(){}};var Ln,K,Mn,ne,v,we,F,Se,X,Je,Qe,Dn,Ee,Un});var Qn=S((pc,Jn)=>{"use strict";var{PassThrough:So}=require("stream");Jn.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 So({objectMode:i});n&&o.setEncoding(n);let s=0,a=[];return o.on("data",f=>{a.push(f),i?s=a.length:s+=f.length}),o.getBufferedValue=()=>t?a:r?Buffer.concat(a,s):a.join(""),o.getBufferedLength=()=>s,o}});var er=S((mc,re)=>{"use strict";var{constants:Eo}=require("buffer"),vo=require("stream"),{promisify:To}=require("util"),_o=Qn(),Io=To(vo.pipeline),ve=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=_o(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 ve)})}),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=ve});var nr=S((gc,tr)=>{"use strict";var{PassThrough:Po}=require("stream");tr.exports=function(){var e=[],t=new Po({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=S(vr=>{var mt="2.0.1",wr,Te,Sr,ht,yt,V,ae,se,gt,Z,_,Er=[].slice,Do=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},Uo={}.hasOwnProperty;ae=require("path");Sr=function(e){return typeof e=="function"};ht=function(e){return typeof e=="string"||!!e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object String]"};_=vr;_.VERSION=typeof mt<"u"&&mt!==null?mt:"NO-VERSION";Z=function(e){return e=e.replace(/\\/g,"/"),e=e.replace(/(?<!^)\/+/g,"/"),e};for(se in ae)gt=ae[se],Sr(gt)?_[se]=function(e){return function(){var t,n;return t=1<=arguments.length?Er.call(arguments,0):[],t=t.map(function(r){return ht(r)?Z(r):r}),n=ae[e].apply(ae,t),ht(n)?Z(n):n}}(se):_[se]=gt;_.sep="/";Te={toUnix:Z,normalizeSafe:function(e){var t;return e=Z(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?Er.call(arguments,0):[],n=_.join.apply(null,e),e.length>0&&(t=Z(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&&Do.call(t.map(function(r){return(r&&r[0]!=="."?".":"")+r}),e)<0};for(V in Te)if(Uo.call(Te,V)){if(wr=Te[V],_[V]!==void 0)throw new Error("path."+V+" already exists.");_[V]=wr}});var Pr=S((zc,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=S((ce,Q)=>{var Ko=200,Ot="__lodash_hash_undefined__",Re=1,Lr=2,Mr=9007199254740991,Ie="[object Arguments]",St="[object Array]",Xo="[object AsyncFunction]",Dr="[object Boolean]",Ur="[object Date]",qr="[object Error]",Wr="[object Function]",Yo="[object GeneratorFunction]",Pe="[object Map]",zr="[object Number]",Vo="[object Null]",J="[object Object]",Or="[object Promise]",Zo="[object Proxy]",Hr="[object RegExp]",Oe="[object Set]",Kr="[object String]",Jo="[object Symbol]",Qo="[object Undefined]",Et="[object WeakMap]",Xr="[object ArrayBuffer]",Ae="[object DataView]",es="[object Float32Array]",ts="[object Float64Array]",ns="[object Int8Array]",rs="[object Int16Array]",is="[object Int32Array]",os="[object Uint8Array]",ss="[object Uint8ClampedArray]",as="[object Uint16Array]",cs="[object Uint32Array]",us=/[\\^$.*+?()[\]{}|]/g,fs=/^\[object .+?Constructor\]$/,ls=/^(?:0|[1-9]\d*)$/,b={};b[es]=b[ts]=b[ns]=b[rs]=b[is]=b[os]=b[ss]=b[as]=b[cs]=!0;b[Ie]=b[St]=b[Xr]=b[Dr]=b[Ae]=b[Ur]=b[qr]=b[Wr]=b[Pe]=b[zr]=b[J]=b[Hr]=b[Oe]=b[Kr]=b[Et]=!1;var Yr=typeof global=="object"&&global&&global.Object===Object&&global,ds=typeof self=="object"&&self&&self.Object===Object&&self,G=Yr||ds||Function("return this")(),Vr=typeof ce=="object"&&ce&&!ce.nodeType&&ce,Ar=Vr&&typeof Q=="object"&&Q&&!Q.nodeType&&Q,Zr=Ar&&Ar.exports===Vr,bt=Zr&&Yr.process,Cr=function(){try{return bt&&bt.binding&&bt.binding("util")}catch{}}(),jr=Cr&&Cr.isTypedArray;function ps(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 ms(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function gs(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 hs(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function ys(e){return function(t){return e(t)}}function bs(e,t){return e.has(t)}function xs(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 Ss(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 vs=Array.prototype,Ts=Function.prototype,Ne=Object.prototype,xt=G["__core-js_shared__"],Jr=Ts.toString,A=Ne.hasOwnProperty,Gr=function(){var e=/[^.]+$/.exec(xt&&xt.keys&&xt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Qr=Ne.toString,_s=RegExp("^"+Jr.call(A).replace(us,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rr=Zr?G.Buffer:void 0,Ce=G.Symbol,Nr=G.Uint8Array,ei=Ne.propertyIsEnumerable,Is=vs.splice,L=Ce?Ce.toStringTag:void 0,$r=Object.getOwnPropertySymbols,Ps=Rr?Rr.isBuffer:void 0,Os=Ss(Object.keys,Object),vt=ee(G,"DataView"),ue=ee(G,"Map"),Tt=ee(G,"Promise"),_t=ee(G,"Set"),It=ee(G,"WeakMap"),fe=ee(Object,"create"),As=U(vt),Cs=U(ue),js=U(Tt),Gs=U(_t),Rs=U(It),kr=Ce?Ce.prototype:void 0,wt=kr?kr.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 Ns(){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 ks(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 Fs(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=Ns;M.prototype.delete=$s;M.prototype.get=ks;M.prototype.has=Bs;M.prototype.set=Fs;function R(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 Ls(){this.__data__=[],this.size=0}function Ms(e){var t=this.__data__,n=$e(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 Ds(e){var t=this.__data__,n=$e(t,e);return n<0?void 0:t[n][1]}function Us(e){return $e(this.__data__,e)>-1}function qs(e,t){var n=this.__data__,r=$e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}R.prototype.clear=Ls;R.prototype.delete=Ms;R.prototype.get=Ds;R.prototype.has=Us;R.prototype.set=qs;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 Ws(){this.size=0,this.__data__={hash:new M,map:new(ue||R),string:new M}}function zs(e){var t=ke(this,e).delete(e);return this.size-=t?1:0,t}function Hs(e){return ke(this,e).get(e)}function Ks(e){return ke(this,e).has(e)}function Xs(e,t){var n=ke(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}D.prototype.clear=Ws;D.prototype.delete=zs;D.prototype.get=Hs;D.prototype.has=Ks;D.prototype.set=Xs;function je(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 Vs(e){return this.__data__.has(e)}je.prototype.add=je.prototype.push=Ys;je.prototype.has=Vs;function $(e){var t=this.__data__=new R(e);this.size=t.size}function Zs(){this.__data__=new R,this.size=0}function Js(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Qs(e){return this.__data__.get(e)}function ea(e){return this.__data__.has(e)}function ta(e,t){var n=this.__data__;if(n instanceof R){var r=n.__data__;if(!ue||r.length<Ko-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}$.prototype.clear=Zs;$.prototype.delete=Js;$.prototype.get=Qs;$.prototype.has=ea;$.prototype.set=ta;function na(e,t){var n=Ge(e),r=!n&&ya(e),i=!n&&!r&&Pt(e),o=!n&&!r&&!i&&ai(e),s=n||r||i||o,a=s?hs(e.length,String):[],f=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")||da(u,f)))&&a.push(u);return a}function $e(e,t){for(var n=e.length;n--;)if(ri(e[n][0],t))return n;return-1}function ra(e,t,n){var r=t(e);return Ge(e)?r:ms(r,n(e))}function de(e){return e==null?e===void 0?Qo:Vo:L&&L in Object(e)?fa(e):ha(e)}function Br(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:ia(e,t,n,r,ti,i)}function ia(e,t,n,r,i,o){var s=Ge(e),a=Ge(t),f=s?St:N(e),u=a?St:N(t);f=f==Ie?J:f,u=u==Ie?J:u;var c=f==J,p=u==J,l=f==u;if(l&&Pt(e)){if(!Pt(t))return!1;s=!0,c=!1}if(l&&!c)return o||(o=new $),s||ai(e)?ni(e,t,n,r,i,o):ca(e,t,f,n,r,i,o);if(!(n&Re)){var d=c&&A.call(e,"__wrapped__"),m=p&&A.call(t,"__wrapped__");if(d||m){var g=d?e.value():e,h=m?t.value():t;return o||(o=new $),i(g,h,n,r,o)}}return l?(o||(o=new $),ua(e,t,n,r,i,o)):!1}function oa(e){if(!si(e)||ma(e))return!1;var t=ii(e)?_s:fs;return t.test(U(e))}function sa(e){return le(e)&&oi(e.length)&&!!b[de(e)]}function aa(e){if(!ga(e))return Os(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&Re,a=e.length,f=t.length;if(a!=f&&!(s&&f>a))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,p=!0,l=n&Lr?new je:void 0;for(o.set(e,t),o.set(t,e);++c<a;){var d=e[c],m=t[c];if(r)var g=s?r(m,d,c,t,e,o):r(d,m,c,e,t,o);if(g!==void 0){if(g)continue;p=!1;break}if(l){if(!gs(t,function(h,E){if(!bs(l,E)&&(d===h||i(d,h,n,r,o)))return l.push(E)})){p=!1;break}}else if(!(d===m||i(d,m,n,r,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function ca(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 Nr(e),new Nr(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 f=r&Re;if(a||(a=Es),e.size!=t.size&&!f)return!1;var u=s.get(e);if(u)return u==t;r|=Lr,s.set(e,t);var c=ni(a(e),a(t),r,i,o,s);return s.delete(e),c;case Jo:if(wt)return wt.call(e)==wt.call(t)}return!1}function ua(e,t,n,r,i,o){var s=n&Re,a=Fr(e),f=a.length,u=Fr(t),c=u.length;if(f!=c&&!s)return!1;for(var p=f;p--;){var l=a[p];if(!(s?l in t:A.call(t,l)))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;++p<f;){l=a[p];var h=e[l],E=t[l];if(r)var T=s?r(E,h,l,t,e,o):r(h,E,l,e,t,o);if(!(T===void 0?h===E||i(h,E,n,r,o):T)){m=!1;break}g||(g=l=="constructor")}if(m&&!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)&&(m=!1)}return o.delete(e),o.delete(t),m}function Fr(e){return ra(e,wa,la)}function ke(e,t){var n=e.__data__;return pa(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ee(e,t){var n=xs(e,t);return oa(n)?n:void 0}function fa(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 la=$r?function(e){return e==null?[]:(e=Object(e),ps($r(e),function(t){return ei.call(e,t)}))}:Sa,N=de;(vt&&N(new vt(new ArrayBuffer(1)))!=Ae||ue&&N(new ue)!=Pe||Tt&&N(Tt.resolve())!=Or||_t&&N(new _t)!=Oe||It&&N(new It)!=Et)&&(N=function(e){var t=de(e),n=t==J?e.constructor:void 0,r=n?U(n):"";if(r)switch(r){case As:return Ae;case Cs:return Pe;case js:return Or;case Gs:return Oe;case Rs:return Et}return t});function da(e,t){return t=t??Mr,!!t&&(typeof e=="number"||ls.test(e))&&e>-1&&e%1==0&&e<t}function pa(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ma(e){return!!Gr&&Gr in e}function ga(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Ne;return e===n}function ha(e){return Qr.call(e)}function U(e){if(e!=null){try{return Jr.call(e)}catch{}try{return e+""}catch{}}return""}function ri(e,t){return e===t||e!==e&&t!==t}var ya=Br(function(){return arguments}())?Br:function(e){return le(e)&&A.call(e,"callee")&&!ei.call(e,"callee")},Ge=Array.isArray;function ba(e){return e!=null&&oi(e.length)&&!ii(e)}var Pt=Ps||Ea;function xa(e,t){return ti(e,t)}function ii(e){if(!si(e))return!1;var t=de(e);return t==Wr||t==Yo||t==Xo||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=jr?ys(jr):sa;function wa(e){return ba(e)?na(e):aa(e)}function Sa(){return[]}function Ea(){return!1}Q.exports=xa});var jt=require("commander"),hi=y(require("path"));var $t=require("commander"),kt=y(require("fast-glob")),Be=y(require("fs-extra")),Bt=y(require("path")),j=y(require("@techor/log"));var Nt=y(require("fs-extra"));function q(e="./package.json"){return Nt.default.readJSONSync(e,{throws:!1})||{}}var vi=q(),Ti={workspaces:vi.workspaces};$t.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",Ti.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(c=>Bt.default.join(c,"*package.json")),f=(c,p)=>{let l=!1;for(let d in c)d in s&&c[d]===""&&(c[d]=i,l=!0);return l};for(let c of kt.default.sync(a)){let p=Be.default.readJSONSync(c);p.private||(o[c]=p,s[p.name]=p,p.version=e)}for(let c in o){let p=o[c],{dependencies:l,peerDependencies:d}=o[c];l&&f(l,"dependencies"),d&&f(d,"peerDependencies"),n||Be.default.writeJSONSync(c,p)}let u={};for(let c in s){let{dependencies:p,peerDependencies:l}=s[c],d=u[(0,j.paint)("**"+c+"**")]={},m=(g,h)=>{if(g){d[h]={};for(let E in g)if(E in s){let T=g[E];d[h][(0,j.paint)("**"+E+"**")]=T===i?null:i}}};m(p,"dependencies"),m(l,"peerDependencies"),Object.keys(u[(0,j.paint)("**"+c+"**")]).length||(u[(0,j.paint)("**"+c+"**")]=null)}j.default`📦`,j.default.tree(u),j.default.success`bump version to +${i}+ for ${Object.keys(s).length} packages in all workspace`});var li=require("commander"),di=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"?`
2
+ var bi=Object.create;var Gt=Object.defineProperty;var xi=Object.getOwnPropertyDescriptor;var wi=Object.getOwnPropertyNames;var Si=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 wi(t))!vi.call(e,i)&&i!==n&&Gt(e,i,{get:()=>t[i],enumerable:!(r=xi(t,i))||r.enumerable});return e};var y=(e,t,n)=>(n=e!=null?bi(Si(e)):{},Ei(t||!e||!e.__esModule?Gt(n,"default",{value:e,enumerable:!0}):n,e));var Ut=v((ja,Dt)=>{Dt.exports=Mt;Mt.sync=Pi;var Ft=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){Ft.stat(e,function(r,i){n(r,r?!1:Lt(i,e,t))})}function Pi(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((Ra,Xt)=>{var Ga=require("fs"),ge;process.platform==="win32"||global.TESTING_WINDOWS?ge=Ut():ge=Kt();Xt.exports=Fe;Fe.sync=Ci;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 Ci(e,t){try{return ge.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var nn=v((ka,tn)=>{var W=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Vt=require("path"),ji=W?";":":",Jt=Yt(),Zt=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Qt=(e,t)=>{let n=t.colon||ji,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"),Gi=nn(),Ri=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=Gi.sync(e.command,{path:n[Ri({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 ki(e){return an(e)||an(e,!0)}cn.exports=ki});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 wn=v((Ua,xn)=>{"use strict";var Di=require("path"),yn=un(),bn=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=bn.command(e.command),e.args=e.args.map(o=>bn.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)}xn.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=Sn(i,t,"spawn");if(o)return n.call(e,"error",o)}return n.apply(e,arguments)}}function Sn(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:Sn,verifyENOENTSync:Vi,notFoundError:We}});var In=v((Wa,z)=>{"use strict";var Tn=require("child_process"),ze=wn(),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,xe)=>{xe.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&xe.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&xe.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var qn=v((lc,Y)=>{var x=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"};$(x)?(Ln=require("assert"),K=Fn(),Mn=/^win/i.test(x.platform),ne=require("events"),typeof ne!="function"&&(ne=ne.EventEmitter),x.__signal_exit_emitter__?E=x.__signal_exit_emitter__:(E=x.__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&&we()};return E.on(n,e),r},we=function(){!X||!$(global.process)||(X=!1,K.forEach(function(t){try{x.removeListener(t,Se[t])}catch{}}),x.emit=ve,x.reallyExit=Qe,E.count-=1)},Y.exports.unload=we,B=function(t,n,r){E.emitted[t]||(E.emitted[t]=!0,E.emit(t,n,r))},Se={},K.forEach(function(e){Se[e]=function(){if($(global.process)){var n=x.listeners(e);n.length===E.count&&(we(),B("exit",null,e),B("afterexit",null,e),Mn&&e==="SIGHUP"&&(e="SIGINT"),x.kill(x.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 x.on(t,Se[t]),!0}catch{return!1}}),x.emit=Un,x.reallyExit=Dn)},Y.exports.load=Ze,Qe=x.reallyExit,Dn=function(t){$(global.process)&&(x.exitCode=t||0,B("exit",x.exitCode,null),B("afterexit",x.exitCode,null),Qe.call(x,x.exitCode))},ve=x.emit,Un=function(t,n){if(t==="exit"&&$(global.process)){n!==void 0&&(x.exitCode=n);var r=ve.apply(this,arguments);return B("exit",x.exitCode,null),B("afterexit",x.exitCode,null),r}else return ve.apply(this,arguments)}):Y.exports=function(){return function(){}};var Ln,K,Mn,ne,E,we,B,Se,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",wr,Te,Sr,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");Sr=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],Sr(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(wr=Te[V],_[V]!==void 0)throw new Error("path."+V+" already exists.");_[V]=wr}});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__",Ge=1,Lr=2,Mr=9007199254740991,Ie="[object Arguments]",St="[object Array]",Yo="[object AsyncFunction]",Dr="[object Boolean]",Ur="[object Date]",qr="[object Error]",Wr="[object Function]",Vo="[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]",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*)$/,b={};b[ts]=b[ns]=b[rs]=b[is]=b[os]=b[ss]=b[as]=b[cs]=b[us]=!0;b[Ie]=b[St]=b[Xr]=b[Dr]=b[Ae]=b[Ur]=b[qr]=b[Wr]=b[Pe]=b[zr]=b[Z]=b[Hr]=b[Oe]=b[Kr]=b[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,bt=Jr&&Yr.process,Cr=function(){try{return bt&&bt.binding&&bt.binding("util")}catch{}}(),jr=Cr&&Cr.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 bs(e){return function(t){return e(t)}}function xs(e,t){return e.has(t)}function ws(e,t){return e?.[t]}function Ss(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,Re=Object.prototype,xt=N["__core-js_shared__"],Zr=_s.toString,A=Re.hasOwnProperty,Nr=function(){var e=/[^.]+$/.exec(xt&&xt.keys&&xt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Qr=Re.toString,Is=RegExp("^"+Zr.call(A).replace(fs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gr=Jr?N.Buffer:void 0,Ce=N.Symbol,Rr=N.Uint8Array,ei=Re.propertyIsEnumerable,Ps=Ts.splice,F=Ce?Ce.toStringTag:void 0,kr=Object.getOwnPropertySymbols,Os=Gr?Gr.isBuffer:void 0,As=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"),Cs=D(Et),js=D(ue),Ns=D(Tt),Gs=D(_t),Rs=D(It),$r=Ce?Ce.prototype:void 0,wt=$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 ks(){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 A.call(t,e)?t[e]:void 0}function Fs(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}L.prototype.clear=ks;L.prototype.delete=$s;L.prototype.get=Bs;L.prototype.has=Fs;L.prototype.set=Ls;function G(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=ke(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=ke(t,e);return n<0?void 0:t[n][1]}function qs(e){return ke(this.__data__,e)>-1}function Ws(e,t){var n=this.__data__,r=ke(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}G.prototype.clear=Ms;G.prototype.delete=Ds;G.prototype.get=Us;G.prototype.has=qs;G.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||G),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 je(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)}je.prototype.add=je.prototype.push=Vs;je.prototype.has=Js;function k(e){var t=this.__data__=new G(e);this.size=t.size}function Zs(){this.__data__=new G,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 G){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}k.prototype.clear=Zs;k.prototype.delete=Qs;k.prototype.get=ea;k.prototype.has=ta;k.prototype.set=na;function ra(e,t){var n=Ne(e),r=!n&&ba(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 f in e)(t||A.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 ke(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)==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?St:R(e),f=a?St:R(t);c=c==Ie?Z:c,f=f==Ie?Z:f;var l=c==Z,u=f==Z,p=c==f;if(p&&Pt(e)){if(!Pt(t))return!1;s=!0,l=!1}if(p&&!l)return o||(o=new k),s||ai(e)?ni(e,t,n,r,i,o):ua(e,t,c,n,r,i,o);if(!(n&Ge)){var d=l&&A.call(e,"__wrapped__"),m=u&&A.call(t,"__wrapped__");if(d||m){var g=d?e.value():e,h=m?t.value():t;return o||(o=new k),i(g,h,n,r,o)}}return p?(o||(o=new k),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(D(e))}function aa(e){return le(e)&&oi(e.length)&&!!b[de(e)]}function ca(e){if(!ha(e))return As(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&Ge,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 je: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,w){if(!xs(p,w)&&(d===h||i(d,h,n,r,o)))return p.push(w)})){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 Rr(e),new Rr(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=Ss;case Oe:var c=r&Ge;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(wt)return wt.call(e)==wt.call(t)}return!1}function fa(e,t,n,r,i,o){var s=n&Ge,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:A.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],w=t[p];if(r)var T=s?r(w,h,p,t,e,o):r(h,w,p,e,t,o);if(!(T===void 0?h===w||i(h,w,n,r,o):T)){m=!1;break}g||(g=p=="constructor")}if(m&&!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)&&(m=!1)}return o.delete(e),o.delete(t),m}function Fr(e){return ia(e,Sa,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=ws(e,t);return sa(n)?n:void 0}function la(e){var t=A.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=kr?function(e){return e==null?[]:(e=Object(e),ms(kr(e),function(t){return ei.call(e,t)}))}:va,R=de;(Et&&R(new Et(new ArrayBuffer(1)))!=Ae||ue&&R(new ue)!=Pe||Tt&&R(Tt.resolve())!=Or||_t&&R(new _t)!=Oe||It&&R(new It)!=vt)&&(R=function(e){var t=de(e),n=t==Z?e.constructor:void 0,r=n?D(n):"";if(r)switch(r){case Cs:return Ae;case js:return Pe;case Ns:return Or;case Gs:return Oe;case Rs: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||Re;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 ba=Br(function(){return arguments}())?Br:function(e){return le(e)&&A.call(e,"callee")&&!ei.call(e,"callee")},Ne=Array.isArray;function xa(e){return e!=null&&oi(e.length)&&!ii(e)}var Pt=Os||Ea;function wa(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=jr?bs(jr):aa;function Sa(e){return xa(e)?ra(e):ca(e)}function va(){return[]}function Ea(){return!1}Q.exports=wa});var jt=require("commander"),yi=y(require("path"));var kt=require("commander"),$t=y(require("fast-glob")),Be=y(require("fs-extra")),Bt=y(require("path")),j=y(require("@techor/log"));var Rt=y(require("fs-extra"));function q(e="./package.json"){return Rt.default.readJSONSync(e,{throws:!1})||{}}var Ti=q(),_i={workspaces:Ti.workspaces};kt.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,j.paint)("**"+l+"**")]={},m=(g,h)=>{if(g){d[h]={};for(let w in g)if(w in s){let T=g[w];d[h][(0,j.paint)("**"+w+"**")]=T===i?null:i}}};m(u,"dependencies"),m(p,"peerDependencies"),Object.keys(f[(0,j.paint)("**"+l+"**")]).length||(f[(0,j.paint)("**"+l+"**")]=null)}j.default`📦`,j.default.tree(f),j.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),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 Ji=(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);!Qi(i,o)&&r||Object.defineProperty(e,n,o)},Qi=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)},eo=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},to=(e,t)=>`/* Wrapped ${e}*/
5
- ${t}`,no=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),ro=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),io=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,i=to.bind(null,r,t.toString());Object.defineProperty(i,"name",ro),Object.defineProperty(e,"toString",{...no,value:i})};function Xe(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let i of Reflect.ownKeys(t))Ji(e,t,i,n);return eo(e,t),io(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 Cn=An;var $n=require("os");var jn=function(){let e=Ye-Gn+1;return Array.from({length:e},oo)},oo=function(e,t){return{name:`SIGRT${t+1}`,number:Gn+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},Gn=34,Ye=64;var Nn=require("os");var Rn=[{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=jn();return[...Rn,...e].map(so)},so=function({name:e,number:t,description:n,action:r,forced:i=!1,standard:o}){let{signals:{[e]:s}}=Nn.constants,a=s!==void 0;return{name:e,number:a?s:t,description:n,supported:a,action:r,forced:i,standard:o}};var ao=function(){return Ve().reduce(co,{})},co=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}}},kn=ao(),uo=function(){let e=Ve(),t=64+1,n=Array.from({length:t},(r,i)=>fo(i,e));return Object.assign({},...n)},fo=function(e,t){let n=lo(e,t);if(n===void 0)return{};let{name:r,description:i,supported:o,action:s,forced:a,standard:f}=n;return{[e]:{name:r,number:e,description:i,supported:o,action:s,forced:a,standard:f}}},lo=function(e,t){let n=t.find(({name:r})=>$n.constants.signals[r]===e);return n!==void 0?n:t.find(r=>r.number===e)},ic=uo();var po=({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",Ze=({stdout:e,stderr:t,all:n,error:r,signal:i,exitCode:o,command:s,escapedCommand:a,timedOut:f,isCanceled:u,killed:c,parsed:{options:{timeout:p}}})=>{o=o===null?void 0:o,i=i===null?void 0:i;let l=i===void 0?void 0:kn[i].description,d=r&&r.code,g=`Command ${po({timedOut:f,timeout:p,errorCode:d,signal:i,signalDescription:l,exitCode:o,isCanceled:u})}: ${s}`,h=Object.prototype.toString.call(r)==="[object Error]",E=h?`${g}
6
- ${r.message}`:g,T=[E,t,e].filter(Boolean).join(`
7
- `);return h?(r.originalMessage=r.message,r.message=T):r=new Error(T),r.shortMessage=E,r.command=s,r.escapedCommand=a,r.exitCode=o,r.signal=i,r.signalDescription=l,r.stdout=e,r.stderr=t,n!==void 0&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=Boolean(f),r.isCanceled=u,r.killed=c&&!f,r};var be=["stdin","stdout","stderr"],mo=e=>be.some(t=>e[t]!==void 0),Bn=e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return be.map(r=>e[r]);if(mo(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${be.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,be.length);return Array.from({length:n},(r,i)=>t[i])};var Wn=y(require("node:os"),1),zn=y(qn(),1),go=1e3*5,Hn=(e,t="SIGTERM",n={})=>{let r=e(t);return ho(e,t,n,r),r},ho=(e,t,n,r)=>{if(!yo(t,n,r))return;let i=xo(n),o=setTimeout(()=>{e("SIGKILL")},i);o.unref&&o.unref()},yo=(e,{forceKillAfterTimeout:t},n)=>bo(e)&&t!==!1&&n,bo=e=>e===Wn.default.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",xo=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return go;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,f)=>{i=setTimeout(()=>{wo(e,n,f)},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 Zn(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||(Zn(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}),f=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,f,u])}catch(c){return Promise.all([{error:c,signal:c.signal,timedOut:c.timedOut},tt(e,a),tt(t,f),tt(n,u)])}};var Oo=(async()=>{})().constructor.prototype,Ao=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Oo,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.-]+$/,jo=/"/g,Go=e=>typeof e!="string"||Co.test(e)?e:`"${e.replace(jo,'\\"')}"`,ur=(e,t)=>cr(e,t).join(" "),fr=(e,t)=>cr(e,t).map(n=>Go(n)).join(" "),Ro=/ +/g,lr=e=>{let t=[];for(let n of e.trim().split(Ro)){let r=t[t.length-1];r&&r.endsWith("\\")?t[t.length-1]=`${r.slice(0,-1)} ${n}`:t.push(n)}return t};var No=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},ko=(e,t,n={})=>{let r=mr.default._parse(e,t,n);return e=r.command,t=r.args,n=r.options,n={maxBuffer:No,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 Bo(e,t,n){let r=ko(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(Ze({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),f=Xn(s,r.options,a),u=Vn(s,r.options,f),c={isCanceled:!1};s.kill=Hn.bind(null,s.kill.bind(s)),s.cancel=Kn.bind(null,s,c);let l=Cn(async()=>{let[{error:d,exitCode:m,signal:g,timedOut:h},E,T,P]=await sr(s,r.options,u),I=ot(r.options,E),O=ot(r.options,T),me=ot(r.options,P);if(d||m!==0||g!==null){let Gt=Ze({error:d,exitCode:m,signal:g,stdout:I,stderr:O,all:me,command:i,escapedCommand:o,parsed:r,timedOut:h,isCanceled:c.isCanceled||(r.options.signal?r.options.signal.aborted:!1),killed:s.killed});if(!r.options.reject)return Gt;throw Gt}return{command:i,escapedCommand:o,exitCode:0,stdout:I,stderr:O,all:me,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return ir(s,r.options.input),s.all=or(s,r.options),it(s,l)}function gr(e,t){let[n,...r]=lr(e);return Bo(n,r,t)}var pi=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](.*)\)?/,Fo=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,Lo=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
- `).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:!Fo.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(Lo,"~")))),i)).join(`
9
- `)}var Mo=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?Mo(ft(r.stack)):String(r)).join(`
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,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 Cn=An;var kn=require("os");var jn=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 Rn=require("os");var Gn=[{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=jn();return[...Gn,...e].map(ao)},ao=function({name:e,number:t,description:n,action:r,forced:i=!1,standard:o}){let{signals:{[e]:s}}=Rn.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})=>kn.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]",w=h?`${g}
6
+ ${r.message}`:g,T=[w,t,e].filter(Boolean).join(`
7
+ `);return h?(r.originalMessage=r.message,r.message=T):r=new Error(T),r.shortMessage=w,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 be=["stdin","stdout","stderr"],go=e=>be.some(t=>e[t]!==void 0),Bn=e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return be.map(r=>e[r]);if(go(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${be.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,be.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(!bo(t,n,r))return;let i=wo(n),o=setTimeout(()=>{e("SIGKILL")},i);o.unref&&o.unref()},bo=(e,{forceKillAfterTimeout:t},n)=>xo(e)&&t!==!1&&n,xo=e=>e===Wn.default.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",wo=({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)},So=(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(()=>{So(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,Co=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ao,e)]),it=(e,t)=>{for(let[n,r]of Co){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],jo=/^[\w.-]+$/,No=/"/g,Go=e=>typeof e!="string"||jo.test(e)?e:`"${e.replace(No,'\\"')}"`,ur=(e,t)=>cr(e,t).join(" "),fr=(e,t)=>cr(e,t).map(n=>Go(n)).join(" "),Ro=/ +/g,lr=e=>{let t=[];for(let n of e.trim().split(Ro)){let r=t[t.length-1];r&&r.endsWith("\\")?t[t.length-1]=`${r.slice(0,-1)} ${n}`:t.push(n)}return t};var ko=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:ko,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=Cn(async()=>{let[{error:d,exitCode:m,signal:g,timedOut:h},w,T,P]=await sr(s,r.options,f),I=ot(r.options,w),O=ot(r.options,T),me=ot(r.options,P);if(d||m!==0||g!==null){let Nt=Je({error:d,exitCode:m,signal:g,stdout:I,stderr:O,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:O,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(`
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
+ `)}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),br=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=[],f=[],u=new Map,c=!1,p=!1,l=!1,d=0,m=0,g=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),h=T=>{c=!0,p=!0,s(T)};i&&(i.aborted&&h(br(i)),i.addEventListener("abort",()=>{h(br(i))}));let E=async()=>{if(p)return;let T=await g.next(),P=m;if(m++,T.done){if(l=!0,d===0&&!p){if(!r&&f.length>0){h(new oe(f));return}if(p=!0,u.size===0){o(a);return}let I=[];for(let[O,me]of a.entries())u.get(O)!==xr&&I.push(me);o(I)}return}d++,(async()=>{try{let I=await T.value;if(p)return;let O=await t(I,P);O===xr&&u.set(P,O),a[P]=O,d--,await E()}catch(I){if(r)h(I);else{f.push(I),d--;try{await E()}catch(O){h(O)}}}})()};(async()=>{for(let T=0;T<n;T++){try{await E()}catch(P){h(P);break}if(l||c)break}})()})}var xr=Symbol("skip");async function pt(e,t){return dt(e,n=>n(),t)}var C=y(require("@techor/log")),k=y(Tr());var pe=y(require("to-line"));var qo=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Wo=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],zo=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Ho=["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?Ho:zo:t.binary?Wo:qo;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),f=n[s];return i+a+" "+f}var mi=y(Pr()),At=y(require("fs")),gi=y(ci()),va={js:"iife",cjs:"cjs",mjs:"esm",css:"css"},w=q(),{dependencies:ui,peerDependencies:fi}=w,Ct=[];ui&&Ct.push(...Object.keys(ui));fi&&Ct.push(...Object.keys(fi));li.program.command("pack [entryPaths...]").allowUnknownOption().option("-f, --format [formats...]","The output format for the generated JavaScript files `iife`, `cjs`, `esm`",["cjs","esm"]).option("-b, --bundle","To bundle a file means to inline any imported dependencies into the file itself",!0).option("-m, --minify","The generated code will be minified instead of pretty-printed",!0).option("-w, --watch","Rebuild whenever a file changes",!1).option("-s, --sourcemap","Emit a source map").option("-p, --platform <node,browser,neutral>","Platform target","node").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",Ct).option("-ee, --extra-external <packages...>","Extra external packages to exclude from the build",[]).option("--srcdir <dir>","The source directory","src").option("--no-clean","Don't clean up the previous output directory before the build starts").option("--no-tree-shakable","Deeply export by `srcdir` to make the module tree-shakable").action(async function(e){let t=this.opts();t.clean&&At.default.existsSync(t.outdir)&&(At.default.rmSync(t.outdir,{force:!0,recursive:!0}),console.log(""),C.default.d`Cleaned up the **${t.outdir}** output directory`);let n=[],r=(s,a)=>k.default.changeExt(k.default.join(t.srcdir,k.default.relative(t.outdir,s)),a),i=async(s,a)=>{let f=a.format==="css",u=a.outFile?k.default.extname(a.outFile):"",c={outExtension:f?{".css":".css"}:{".js":u||{cjs:".cjs",esm:".mjs",iife:".js"}[a.format]},external:[...t.external,...t.extraExternal],watch:t.watch?{onRebuild(l,d){}}:!1,logLevel:"silent",outdir:t.outdir,outbase:t.srcdir,bundle:t.bundle,minify:t.minify,sourcemap:t.sourcemap,platform:a.platform||t.platform,metafile:!0,format:f?void 0:a.format};c.entryPoints=di.default.sync([...new Set(s)].map(l=>(0,mi.default)(l))).filter(l=>!n.find(d=>d.options.entryPoints.includes(l)&&d.options.format===c.format&&(0,gi.default)(d.options.outExtension,c.outExtension)));let p={options:c,run:async()=>{let{metafile:l}=await(0,pi.build)(c);if(l){console.log(""),p.metafile=l;for(let d in l.outputs){let m=l.outputs[d],g=_e(m.bytes).replace(/ /g,""),h=l.outputs[d].format=a.format;C.default`${C.chalk.dim("\u2502")} $t [${h}] **${d}** ${g} (${Object.keys(m.inputs).length} inputs)`}C.default.tree({entries:c.entryPoints,external:c.external,outdir:c.outdir,bundle:c.bundle,minify:c.minify,format:c.format,platform:c.platform})}}};c.entryPoints.length&&n.push(p)};if(w.style&&i([r(w.main,".css")],{format:"css"}),w.main&&!w.main.endsWith(".css")&&i([r(w.main,".{js,ts,jsx,tsx}")],{format:"cjs",outFile:w.main}),w.module&&i([r(w.module,".{js,ts,jsx,tsx}")],{format:"esm",outFile:w.module}),w.browser&&i([r(w.browser,".{js,ts,jsx,tsx}")],{format:"iife",platform:"browser",outFile:w.browser}),w.bin)if(typeof w.bin=="string")i([r(w.bin,".{js,ts,jsx,tsx}")],{format:"cjs",platform:"node",outFile:w.bin});else for(let s in w.bin){let a=w.bin[s];i([r(a,".{js,ts,jsx,tsx}")],{format:"cjs",platform:"node",outFile:a})}w.exports&&function s(a,f,u){if(typeof a=="string"){let c=k.default.extname(a);i([r(a,".{js,ts,jsx,tsx}")],{format:u.format||va[c],outFile:u.outFile||a,platform:u.platform})}else for(let c in a){let p=a[c],l,d;switch(f){case"node":d="node";break;case"browser":d="browser";break;case"require":l="cjs";break;case"import":l="esm";break}if(c.startsWith("."))s(p,c);else switch(c){case"node":s(p,c,{platform:"node",format:l});break;case"browser":s(p,c,{platform:"browser",format:l});break;case"default":s(p,c,{platform:d,format:l});break;case"require":s(p,c,{platform:d,format:"cjs"});break;case"import":s(p,c,{platform:d,format:"esm"});break}}}(w.exports,""),t.treeShakable&&e.push(k.default.join(t.srcdir,"**/*.{js,ts,jsx,tsx}")),e.length&&(e.find(a=>a.includes(".css"))?i(e,{format:"css"}):t.format.map(a=>i(e,{format:a}))),n.length||t.format.map(s=>i([k.default.join(t.srcdir,"index.ts")],{format:s}));let o;t.type&&(o={outFile:"declarations",options:{platform:"type",format:"dts"},run:()=>new Promise(s=>{let a=()=>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),br=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(br(i)),i.addEventListener("abort",()=>{h(br(i))}));let w=async()=>{if(u)return;let T=await g.next(),P=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 I=[];for(let[O,me]of a.entries())f.get(O)!==xr&&I.push(me);o(I)}return}d++,(async()=>{try{let I=await T.value;if(u)return;let O=await t(I,P);O===xr&&f.set(P,O),a[P]=O,d--,await w()}catch(I){if(r)h(I);else{c.push(I),d--;try{await w()}catch(O){h(O)}}}})()};(async()=>{for(let T=0;T<n;T++){try{await w()}catch(P){h(P);break}if(p||l)break}})()})}var xr=Symbol("skip");async function pt(e,t){return dt(e,n=>n(),t)}var C=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(Pr()),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"},S=q(),{dependencies:fi,peerDependencies:li}=S,Ct=[];fi&&Ct.push(...Object.keys(fi));li&&Ct.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("-b, --bundle","To bundle a file means to inline any imported dependencies into the file itself",!0).option("-m, --minify","The generated code will be minified instead of pretty-printed",!0).option("-w, --watch","Rebuild whenever a file changes",!1).option("-s, --sourcemap","Emit a source map").option("-p, --platform <node,browser,neutral>","Platform target","browser").option("-t, --type","Emit typescript declarations",S.types).option("-o, --outdir <dir>","The output directory for the build operation","dist").option("-e, --external <packages...>","External packages to exclude from the build",Ct).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("--no-clean","Don't 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(""),C.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};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,""),w=d.outputs[m].format=c.format;C.default`${C.chalk.dim("\u2502")} $t [${w}] **${m}** ${h} (${Object.keys(g.inputs).length} inputs)`}C.default.tree({entries:u.entryPoints,external:u.external,outdir:u.outdir,format:u.format,platform:u.platform,[Object.keys(u).filter(m=>typeof u[m]=="boolean").join(", ")]:null})}}};u.entryPoints.length&&r.push(p)};if(S.style&&o([i(S.main,".css")],{format:"css"}),S.main&&!S.main.endsWith(".css")&&o([i(S.main,".{js,ts,jsx,tsx}")],{format:"cjs",outFile:S.main}),S.module&&o([i(S.module,".{js,ts,jsx,tsx}")],{format:"esm",outFile:S.module}),S.browser&&o([i(S.browser,".{js,ts,jsx,tsx}")],{format:"iife",platform:"browser",outFile:S.browser}),S.bin)if(typeof S.bin=="string")o([i(S.bin,".{js,ts,jsx,tsx}")],{format:"cjs",platform:"node",outFile:S.bin});else for(let a in S.bin){let c=S.bin[a];o([i(c,".{js,ts,jsx,tsx}")],{format:"cjs",platform:"node",outFile:c})}S.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}}}(S.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`
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(s);t.watch?setTimeout(a,100):a()})},t.watch||n.push(o)),await pt(n.map(({run:s})=>s)),console.log(""),t.watch&&o&&n.push(o);for(let s of n)s.metafile?Object.keys(s.metafile.outputs).forEach(a=>{let f=s.metafile.outputs[a],u=_e(f.bytes).replace(/ /g,""),c=f.format;C.default.ok(pe.l`[${s.options.platform}] **${a}** ${u} (${c})`)}):C.default.ok(pe.l`[${s.options.format}] **${s.outFile}** (${s.options.format})`);console.log(""),t.watch?C.default`Start watching ${n.length} build tasks`:C.default.success`${n.length} build tasks`,console.log(""),t.watch&&o&&await o.run()});var{version:Ta,name:_a,description:Ia}=q(hi.default.join(__dirname,"../../package.json"));jt.program.name(_a).description(Ia).version(Ta);jt.program.parse();
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;C.default.ok(pe.l`[${a.options.platform}] **${c}** ${l} (${u})`)}):C.default.ok(pe.l`[${a.options.format}] **${a.outFile}** (${a.options.format})`);console.log(""),t.watch?C.default`Start watching ${r.length} build tasks`:C.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"));jt.program.name(Ia).description(Pa).version(_a);jt.program.parse();
16
16
  /*! Bundled license information:
17
17
 
18
18
  normalize-path/index.js: