@holistics/cli-core 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/commands.js +2 -3
  2. package/package.json +1 -1
package/dist/commands.js CHANGED
@@ -84,7 +84,7 @@ __p += '`;if(p2)U0+=`' +
84
84
  function print() { __p += __j.call(arguments, '') }
85
85
  `:`;
86
86
  `)+U0+`return __p
87
- }`;var P2=Dj(function(){return t2(R,d0+"return "+U0).apply(Z,m)});if(P2.source=U0,pH(P2))throw P2;return P2}function J80(z){return q3(z).toLowerCase()}function Q80(z){return q3(z).toUpperCase()}function X80(z,H,M){if(z=q3(z),z&&(M||H===Z))return PC(z);if(!z||!(H=w6(H)))return z;var F=k5(z),N=k5(H),R=mC(F,N),m=OC(F,N)+1;return r1(F,R,m).join("")}function q80(z,H,M){if(z=q3(z),z&&(M||H===Z))return z.slice(0,AC(z)+1);if(!z||!(H=w6(H)))return z;var F=k5(z),N=OC(F,k5(H))+1;return r1(F,0,N).join("")}function $80(z,H,M){if(z=q3(z),z&&(M||H===Z))return z.replace(pG,"");if(!z||!(H=w6(H)))return z;var F=k5(z),N=mC(F,k5(H));return r1(F,N).join("")}function Y80(z,H){var M=S,F=k;if(g3(H)){var N="separator"in H?H.separator:N;M="length"in H?j2(H.length):M,F="omission"in H?w6(H.omission):F}z=q3(z);var R=z.length;if(Dx(z)){var m=k5(z);R=m.length}if(M>=R)return z;var I=M-Fx(F);if(I<1)return F;var p=m?r1(m,0,I).join(""):z.slice(0,I);if(N===Z)return p+F;if(m)I+=p.length-I;if(yH(N)){if(z.slice(I).search(N)){var W0,G0=p;if(!N.global)N=JH(N.source,q3(sN.exec(N))+"g");N.lastIndex=0;while(W0=N.exec(G0))var U0=W0.index;p=p.slice(0,U0===Z?I:U0)}}else if(z.indexOf(w6(N),I)!=I){var E0=p.lastIndexOf(N);if(E0>-1)p=p.slice(0,E0)}return p+F}function K80(z){return z=q3(z),z&&Fn.test(z)?z.replace(lN,br):z}var z80=jx(function(z,H,M){return z+(M?" ":"")+H.toUpperCase()}),gH=Fw("toUpperCase");function Bj(z,H,M){if(z=q3(z),H=M?Z:H,H===Z)return Tr(z)?yr(z):wr(z);return z.match(H)||[]}var Dj=m2(function(z,H){try{return N6(z,Z,H)}catch(M){return pH(M)?M:new D2(M)}}),W80=K1(function(z,H){return Z5(H,function(M){M=_7(M),$1(z,M,bH(z[M],z))}),z});function G80(z){var H=z==null?0:z.length,M=e0();return z=!H?[]:E3(z,function(F){if(typeof F[1]!="function")throw new x5(X);return[M(F[0]),F[1]]}),m2(function(F){var N=-1;while(++N<H){var R=z[N];if(N6(R[0],this,F))return N6(R[1],this,F)}})}function H80(z){return bt(Q5(z,W))}function dH(z){return function(){return z}}function V80(z,H){return z==null||z!==z?H:z}var U80=Lw(),M80=Lw(!0);function x6(z){return z}function lH(z){return nC(typeof z=="function"?z:Q5(z,W))}function B80(z){return tC(Q5(z,W))}function D80(z,H){return eC(z,Q5(H,W))}var F80=m2(function(z,H){return function(M){return SQ(M,z,H)}}),_80=m2(function(z,H){return function(M){return SQ(z,M,H)}});function iH(z,H,M){var F=E8(H),N=y$(H,F);if(M==null&&!(g3(H)&&(N.length||!F.length)))M=H,H=z,z=this,N=y$(H,E8(H));var R=!(g3(M)&&("chain"in M))||!!M.chain,m=W1(z);return Z5(N,function(I){var p=H[I];if(z[I]=p,m)z.prototype[I]=function(){var W0=this.__chain__;if(R||W0){var G0=z(this.__wrapped__),U0=G0.__actions__=t4(this.__actions__);return U0.push({func:p,args:arguments,thisArg:z}),G0.__chain__=W0,G0}return p.apply(z,d1([this.value()],arguments))}}),z}function L80(){if(v8._===this)v8._=ir;return this}function oH(){}function N80(z){return z=j2(z),m2(function(H){return Zw(H,z)})}var C80=jH(E3),w80=jH(NC),j80=jH(aG);function Fj(z){return SH(z)?nG(_7(z)):Ze(z)}function R80(z){return function(H){return z==null?Z:i9(z,H)}}var P80=Cw(),m80=Cw(!0);function sH(){return[]}function aH(){return!1}function O80(){return{}}function I80(){return""}function A80(){return!0}function S80(z,H){if(z=j2(z),z<1||z>Y0)return[];var M=I2,F=D4(z,I2);H=e0(H),z-=I2;var N=eG(F,H);while(++M<z)H(M);return N}function T80(z){if(L2(z))return E3(z,_7);return j6(z)?[z]:t4(cw(q3(z)))}function f80(z){var H=++dr;return q3(z)+H}var v80=i$(function(z,H){return z+H},0),E80=RH("ceil"),k80=i$(function(z,H){return z/H},1),b80=RH("floor");function c80(z){return z&&z.length?p$(z,x6,WH):Z}function p80(z,H){return z&&z.length?p$(z,e0(H,2),WH):Z}function y80(z){return jC(z,x6)}function h80(z,H){return jC(z,e0(H,2))}function u80(z){return z&&z.length?p$(z,x6,UH):Z}function g80(z,H){return z&&z.length?p$(z,e0(H,2),UH):Z}var d80=i$(function(z,H){return z*H},1),l80=RH("round"),i80=i$(function(z,H){return z-H},0);function o80(z){return z&&z.length?tG(z,x6):0}function s80(z,H){return z&&z.length?tG(z,e0(H,2)):0}if(j.after=B20,j.ary=aw,j.assign=Q30,j.assignIn=zj,j.assignInWith=qY,j.assignWith=X30,j.at=q30,j.before=nw,j.bind=bH,j.bindAll=W80,j.bindKey=rw,j.castArray=O20,j.chain=iw,j.chunk=be,j.compact=ce,j.concat=pe,j.cond=G80,j.conforms=H80,j.constant=dH,j.countBy=o00,j.create=$30,j.curry=tw,j.curryRight=ew,j.debounce=Zj,j.defaults=Y30,j.defaultsDeep=K30,j.defer=D20,j.delay=F20,j.difference=ye,j.differenceBy=he,j.differenceWith=ue,j.drop=ge,j.dropRight=de,j.dropRightWhile=le,j.dropWhile=ie,j.fill=oe,j.filter=a00,j.flatMap=t00,j.flatMapDeep=e00,j.flatMapDepth=Z20,j.flatten=uw,j.flattenDeep=se,j.flattenDepth=ae,j.flip=_20,j.flow=U80,j.flowRight=M80,j.fromPairs=ne,j.functions=M30,j.functionsIn=B30,j.groupBy=x20,j.initial=te,j.intersection=ee,j.intersectionBy=Z00,j.intersectionWith=x00,j.invert=F30,j.invertBy=_30,j.invokeMap=Q20,j.iteratee=lH,j.keyBy=X20,j.keys=E8,j.keysIn=Z6,j.map=e$,j.mapKeys=N30,j.mapValues=C30,j.matches=B80,j.matchesProperty=D80,j.memoize=xY,j.merge=w30,j.mergeWith=Wj,j.method=F80,j.methodOf=_80,j.mixin=iH,j.negate=JY,j.nthArg=N80,j.omit=j30,j.omitBy=R30,j.once=L20,j.orderBy=q20,j.over=C80,j.overArgs=N20,j.overEvery=w80,j.overSome=j80,j.partial=cH,j.partialRight=xj,j.partition=$20,j.pick=P30,j.pickBy=Gj,j.property=Fj,j.propertyOf=R80,j.pull=q00,j.pullAll=dw,j.pullAllBy=$00,j.pullAllWith=Y00,j.pullAt=K00,j.range=P80,j.rangeRight=m80,j.rearg=C20,j.reject=z20,j.remove=z00,j.rest=w20,j.reverse=EH,j.sampleSize=G20,j.set=O30,j.setWith=I30,j.shuffle=H20,j.slice=W00,j.sortBy=M20,j.sortedUniq=D00,j.sortedUniqBy=F00,j.split=t30,j.spread=j20,j.tail=_00,j.take=L00,j.takeRight=N00,j.takeRightWhile=C00,j.takeWhile=w00,j.tap=c00,j.throttle=R20,j.thru=t$,j.toArray=$j,j.toPairs=Hj,j.toPairsIn=Vj,j.toPath=T80,j.toPlainObject=Kj,j.transform=A30,j.unary=P20,j.union=j00,j.unionBy=R00,j.unionWith=P00,j.uniq=m00,j.uniqBy=O00,j.uniqWith=I00,j.unset=S30,j.unzip=kH,j.unzipWith=lw,j.update=T30,j.updateWith=f30,j.values=mx,j.valuesIn=v30,j.without=A00,j.words=Bj,j.wrap=m20,j.xor=S00,j.xorBy=T00,j.xorWith=f00,j.zip=v00,j.zipObject=E00,j.zipObjectDeep=k00,j.zipWith=b00,j.entries=Hj,j.entriesIn=Vj,j.extend=zj,j.extendWith=qY,iH(j,j),j.add=v80,j.attempt=Dj,j.camelCase=c30,j.capitalize=Uj,j.ceil=E80,j.clamp=E30,j.clone=I20,j.cloneDeep=S20,j.cloneDeepWith=T20,j.cloneWith=A20,j.conformsTo=f20,j.deburr=Mj,j.defaultTo=V80,j.divide=k80,j.endsWith=p30,j.eq=c5,j.escape=y30,j.escapeRegExp=h30,j.every=s00,j.find=n00,j.findIndex=yw,j.findKey=z30,j.findLast=r00,j.findLastIndex=hw,j.findLastKey=W30,j.floor=b80,j.forEach=ow,j.forEachRight=sw,j.forIn=G30,j.forInRight=H30,j.forOwn=V30,j.forOwnRight=U30,j.get=hH,j.gt=v20,j.gte=E20,j.has=D30,j.hasIn=uH,j.head=gw,j.identity=x6,j.includes=J20,j.indexOf=re,j.inRange=k30,j.invoke=L30,j.isArguments=a9,j.isArray=L2,j.isArrayBuffer=k20,j.isArrayLike=e4,j.isArrayLikeObject=J8,j.isBoolean=b20,j.isBuffer=t1,j.isDate=c20,j.isElement=p20,j.isEmpty=y20,j.isEqual=h20,j.isEqualWith=u20,j.isError=pH,j.isFinite=g20,j.isFunction=W1,j.isInteger=Jj,j.isLength=QY,j.isMap=Qj,j.isMatch=d20,j.isMatchWith=l20,j.isNaN=i20,j.isNative=o20,j.isNil=a20,j.isNull=s20,j.isNumber=Xj,j.isObject=g3,j.isObjectLike=s3,j.isPlainObject=bQ,j.isRegExp=yH,j.isSafeInteger=n20,j.isSet=qj,j.isString=XY,j.isSymbol=j6,j.isTypedArray=Px,j.isUndefined=r20,j.isWeakMap=t20,j.isWeakSet=e20,j.join=J00,j.kebabCase=u30,j.last=q5,j.lastIndexOf=Q00,j.lowerCase=g30,j.lowerFirst=d30,j.lt=Z30,j.lte=x30,j.max=c80,j.maxBy=p80,j.mean=y80,j.meanBy=h80,j.min=u80,j.minBy=g80,j.stubArray=sH,j.stubFalse=aH,j.stubObject=O80,j.stubString=I80,j.stubTrue=A80,j.multiply=d80,j.nth=X00,j.noConflict=L80,j.noop=oH,j.now=ZY,j.pad=l30,j.padEnd=i30,j.padStart=o30,j.parseInt=s30,j.random=b30,j.reduce=Y20,j.reduceRight=K20,j.repeat=a30,j.replace=n30,j.result=m30,j.round=l80,j.runInContext=b,j.sample=W20,j.size=V20,j.snakeCase=r30,j.some=U20,j.sortedIndex=G00,j.sortedIndexBy=H00,j.sortedIndexOf=V00,j.sortedLastIndex=U00,j.sortedLastIndexBy=M00,j.sortedLastIndexOf=B00,j.startCase=e30,j.startsWith=Z80,j.subtract=i80,j.sum=o80,j.sumBy=s80,j.template=x80,j.times=S80,j.toFinite=G1,j.toInteger=j2,j.toLength=Yj,j.toLower=J80,j.toNumber=$5,j.toSafeInteger=J30,j.toString=q3,j.toUpper=Q80,j.trim=X80,j.trimEnd=q80,j.trimStart=$80,j.truncate=Y80,j.unescape=K80,j.uniqueId=f80,j.upperCase=z80,j.upperFirst=gH,j.each=ow,j.eachRight=sw,j.first=gw,iH(j,function(){var z={};return D7(j,function(H,M){if(!G3.call(j.prototype,M))z[M]=H}),z}(),{chain:!1}),j.VERSION=x,Z5(["bind","bindKey","curry","curryRight","partial","partialRight"],function(z){j[z].placeholder=j}),Z5(["drop","take"],function(z,H){E2.prototype[z]=function(M){M=M===Z?1:P8(j2(M),0);var F=this.__filtered__&&!H?new E2(this):this.clone();if(F.__filtered__)F.__takeCount__=D4(M,F.__takeCount__);else F.__views__.push({size:D4(M,I2),type:z+(F.__dir__<0?"Right":"")});return F},E2.prototype[z+"Right"]=function(M){return this.reverse()[z](M).reverse()}}),Z5(["filter","map","takeWhile"],function(z,H){var M=H+1,F=M==x2||M==R2;E2.prototype[z]=function(N){var R=this.clone();return R.__iteratees__.push({iteratee:e0(N,3),type:M}),R.__filtered__=R.__filtered__||F,R}}),Z5(["head","last"],function(z,H){var M="take"+(H?"Right":"");E2.prototype[z]=function(){return this[M](1).value()[0]}}),Z5(["initial","tail"],function(z,H){var M="drop"+(H?"":"Right");E2.prototype[z]=function(){return this.__filtered__?new E2(this):this[M](1)}}),E2.prototype.compact=function(){return this.filter(x6)},E2.prototype.find=function(z){return this.filter(z).head()},E2.prototype.findLast=function(z){return this.reverse().find(z)},E2.prototype.invokeMap=m2(function(z,H){if(typeof z=="function")return new E2(this);return this.map(function(M){return SQ(M,z,H)})}),E2.prototype.reject=function(z){return this.filter(JY(e0(z)))},E2.prototype.slice=function(z,H){z=j2(z);var M=this;if(M.__filtered__&&(z>0||H<0))return new E2(M);if(z<0)M=M.takeRight(-z);else if(z)M=M.drop(z);if(H!==Z)H=j2(H),M=H<0?M.dropRight(-H):M.take(H-z);return M},E2.prototype.takeRightWhile=function(z){return this.reverse().takeWhile(z).reverse()},E2.prototype.toArray=function(){return this.take(I2)},D7(E2.prototype,function(z,H){var M=/^(?:filter|find|map|reject)|While$/.test(H),F=/^(?:head|last)$/.test(H),N=j[F?"take"+(H=="last"?"Right":""):H],R=F||/^find/.test(H);if(!N)return;j.prototype[H]=function(){var m=this.__wrapped__,I=F?[1]:arguments,p=m instanceof E2,W0=I[0],G0=p||L2(m),U0=function(f2){var p2=N.apply(j,d1([f2],I));return F&&E0?p2[0]:p2};if(G0&&M&&typeof W0=="function"&&W0.length!=1)p=G0=!1;var E0=this.__chain__,d0=!!this.__actions__.length,Q2=R&&!E0,P2=p&&!d0;if(!R&&G0){m=P2?m:new E2(this);var X2=z.apply(m,I);return X2.__actions__.push({func:t$,args:[U0],thisArg:Z}),new J5(X2,E0)}if(Q2&&P2)return z.apply(this,I);return X2=this.thru(U0),Q2?F?X2.value()[0]:X2.value():X2}}),Z5(["pop","push","shift","sort","splice","unshift"],function(z){var H=j$[z],M=/^(?:push|sort|unshift)$/.test(z)?"tap":"thru",F=/^(?:pop|shift)$/.test(z);j.prototype[z]=function(){var N=arguments;if(F&&!this.__chain__){var R=this.value();return H.apply(L2(R)?R:[],N)}return this[M](function(m){return H.apply(L2(m)?m:[],N)})}}),D7(E2.prototype,function(z,H){var M=j[H];if(M){var F=M.name+"";if(!G3.call(Nx,F))Nx[F]=[];Nx[F].push({name:H,func:M})}}),Nx[l$(Z,_).name]=[{name:"wrapper",func:Z}],E2.prototype.clone=Kt,E2.prototype.reverse=zt,E2.prototype.value=Wt,j.prototype.at=p00,j.prototype.chain=y00,j.prototype.commit=h00,j.prototype.next=u00,j.prototype.plant=d00,j.prototype.reverse=l00,j.prototype.toJSON=j.prototype.valueOf=j.prototype.value=i00,j.prototype.first=j.prototype.head,jQ)j.prototype[jQ]=g00;return j},i1=hr();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)v8._=i1,define(function(){return i1});else if(h9)(h9.exports=i1)._=i1,lG._=i1;else v8._=i1}).call(Dq)});var Lj="0.2.5";var pj=n9(cj(),1),{program:ca0,createCommand:pa0,createArgument:ya0,createOption:ha0,CommanderError:ua0,InvalidArgumentError:ga0,InvalidOptionArgumentError:da0,Command:Y5,Argument:la0,Option:ia0,Help:oa0}=pj.default;import NQ0 from"fs";var $R=n9(tj(),1);var yQ=(Z)=>{if(typeof Z!=="string")throw new TypeError("invalid pattern");if(Z.length>65536)throw new TypeError("pattern is too long")};var t40={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},hQ=(Z)=>Z.replace(/[[\]\\-]/g,"\\$&"),e40=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ej=(Z)=>Z.join(""),ZR=(Z,x)=>{let J=x;if(Z.charAt(J)!=="[")throw new Error("not in a brace expression");let Q=[],X=[],q=J+1,$=!1,Y=!1,K=!1,W=!1,G=J,V="";Z:while(q<Z.length){let _=Z.charAt(q);if((_==="!"||_==="^")&&q===J+1){W=!0,q++;continue}if(_==="]"&&$&&!K){G=q+1;break}if($=!0,_==="\\"){if(!K){K=!0,q++;continue}}if(_==="["&&!K){for(let[w,[P,E,t]]of Object.entries(t40))if(Z.startsWith(w,q)){if(V)return["$.",!1,Z.length-J,!0];if(q+=w.length,t)X.push(P);else Q.push(P);Y=Y||E;continue Z}}if(K=!1,V){if(_>V)Q.push(hQ(V)+"-"+hQ(_));else if(_===V)Q.push(hQ(_));V="",q++;continue}if(Z.startsWith("-]",q+1)){Q.push(hQ(_+"-")),q+=2;continue}if(Z.startsWith("-",q+1)){V=_,q+=2;continue}Q.push(hQ(_)),q++}if(G<q)return["",!1,0,!1];if(!Q.length&&!X.length)return["$.",!1,Z.length-J,!0];if(X.length===0&&Q.length===1&&/^\\?.$/.test(Q[0])&&!W){let _=Q[0].length===2?Q[0].slice(-1):Q[0];return[e40(_),!1,G-J,!1]}let U="["+(W?"^":"")+ej(Q)+"]",B="["+(W?"":"^")+ej(X)+"]";return[Q.length&&X.length?"("+U+"|"+B+")":Q.length?U:B,Y,G-J,!0]};var h5=(Z,{windowsPathsNoEscape:x=!1}={})=>{return x?Z.replace(/\[([^\/\\])\]/g,"$1"):Z.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")};var Z60=new Set(["!","?","+","*","@"]),xR=(Z)=>Z60.has(Z),x60="(?!(?:^|/)\\.\\.?(?:$|/))",KY="(?!\\.)",J60=new Set(["[","."]),Q60=new Set(["..","."]),X60=new Set("().*{}+?[]^$\\!"),q60=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),KV="[^/]",JR=KV+"*?",QR=KV+"+?";class a8{type;#Z;#x;#q=!1;#Q=[];#$;#L;#z;#G=!1;#Y;#K;#X=!1;constructor(Z,x,J={}){if(this.type=Z,Z)this.#x=!0;if(this.#$=x,this.#Z=this.#$?this.#$.#Z:this,this.#Y=this.#Z===this?J:this.#Z.#Y,this.#z=this.#Z===this?[]:this.#Z.#z,Z==="!"&&!this.#Z.#G)this.#z.push(this);this.#L=this.#$?this.#$.#Q.length:0}get hasMagic(){if(this.#x!==void 0)return this.#x;for(let Z of this.#Q){if(typeof Z==="string")continue;if(Z.type||Z.hasMagic)return this.#x=!0}return this.#x}toString(){if(this.#K!==void 0)return this.#K;if(!this.type)return this.#K=this.#Q.map((Z)=>String(Z)).join("");else return this.#K=this.type+"("+this.#Q.map((Z)=>String(Z)).join("|")+")"}#B(){if(this!==this.#Z)throw new Error("should only call on root");if(this.#G)return this;this.toString(),this.#G=!0;let Z;while(Z=this.#z.pop()){if(Z.type!=="!")continue;let x=Z,J=x.#$;while(J){for(let Q=x.#L+1;!J.type&&Q<J.#Q.length;Q++)for(let X of Z.#Q){if(typeof X==="string")throw new Error("string part in extglob AST??");X.copyIn(J.#Q[Q])}x=J,J=x.#$}}return this}push(...Z){for(let x of Z){if(x==="")continue;if(typeof x!=="string"&&!(x instanceof a8&&x.#$===this))throw new Error("invalid part: "+x);this.#Q.push(x)}}toJSON(){let Z=this.type===null?this.#Q.slice().map((x)=>typeof x==="string"?x:x.toJSON()):[this.type,...this.#Q.map((x)=>x.toJSON())];if(this.isStart()&&!this.type)Z.unshift([]);if(this.isEnd()&&(this===this.#Z||this.#Z.#G&&this.#$?.type==="!"))Z.push({});return Z}isStart(){if(this.#Z===this)return!0;if(!this.#$?.isStart())return!1;if(this.#L===0)return!0;let Z=this.#$;for(let x=0;x<this.#L;x++){let J=Z.#Q[x];if(!(J instanceof a8&&J.type==="!"))return!1}return!0}isEnd(){if(this.#Z===this)return!0;if(this.#$?.type==="!")return!0;if(!this.#$?.isEnd())return!1;if(!this.type)return this.#$?.isEnd();let Z=this.#$?this.#$.#Q.length:0;return this.#L===Z-1}copyIn(Z){if(typeof Z==="string")this.push(Z);else this.push(Z.clone(this))}clone(Z){let x=new a8(this.type,Z);for(let J of this.#Q)x.copyIn(J);return x}static#D(Z,x,J,Q){let X=!1,q=!1,$=-1,Y=!1;if(x.type===null){let U=J,B="";while(U<Z.length){let D=Z.charAt(U++);if(X||D==="\\"){X=!X,B+=D;continue}if(q){if(U===$+1){if(D==="^"||D==="!")Y=!0}else if(D==="]"&&!(U===$+2&&Y))q=!1;B+=D;continue}else if(D==="["){q=!0,$=U,Y=!1,B+=D;continue}if(!Q.noext&&xR(D)&&Z.charAt(U)==="("){x.push(B),B="";let _=new a8(D,x);U=a8.#D(Z,_,U,Q),x.push(_);continue}B+=D}return x.push(B),U}let K=J+1,W=new a8(null,x),G=[],V="";while(K<Z.length){let U=Z.charAt(K++);if(X||U==="\\"){X=!X,V+=U;continue}if(q){if(K===$+1){if(U==="^"||U==="!")Y=!0}else if(U==="]"&&!(K===$+2&&Y))q=!1;V+=U;continue}else if(U==="["){q=!0,$=K,Y=!1,V+=U;continue}if(xR(U)&&Z.charAt(K)==="("){W.push(V),V="";let B=new a8(U,W);W.push(B),K=a8.#D(Z,B,K,Q);continue}if(U==="|"){W.push(V),V="",G.push(W),W=new a8(null,x);continue}if(U===")"){if(V===""&&x.#Q.length===0)x.#X=!0;return W.push(V),V="",x.push(...G,W),K}V+=U}return x.type=null,x.#x=void 0,x.#Q=[Z.substring(J-1)],K}static fromGlob(Z,x={}){let J=new a8(null,void 0,x);return a8.#D(Z,J,0,x),J}toMMPattern(){if(this!==this.#Z)return this.#Z.toMMPattern();let Z=this.toString(),[x,J,Q,X]=this.toRegExpSource();if(!(Q||this.#x||this.#Y.nocase&&!this.#Y.nocaseMagicOnly&&Z.toUpperCase()!==Z.toLowerCase()))return J;let $=(this.#Y.nocase?"i":"")+(X?"u":"");return Object.assign(new RegExp(`^${x}$`,$),{_src:x,_glob:Z})}get options(){return this.#Y}toRegExpSource(Z){let x=Z??!!this.#Y.dot;if(this.#Z===this)this.#B();if(!this.type){let Y=this.isStart()&&this.isEnd(),K=this.#Q.map((U)=>{let[B,D,_,w]=typeof U==="string"?a8.#H(U,this.#x,Y):U.toRegExpSource(Z);return this.#x=this.#x||_,this.#q=this.#q||w,B}).join(""),W="";if(this.isStart()){if(typeof this.#Q[0]==="string"){if(!(this.#Q.length===1&&Q60.has(this.#Q[0]))){let B=J60,D=x&&B.has(K.charAt(0))||K.startsWith("\\.")&&B.has(K.charAt(2))||K.startsWith("\\.\\.")&&B.has(K.charAt(4)),_=!x&&!Z&&B.has(K.charAt(0));W=D?x60:_?KY:""}}}let G="";if(this.isEnd()&&this.#Z.#G&&this.#$?.type==="!")G="(?:$|\\/)";return[W+K+G,h5(K),this.#x=!!this.#x,this.#q]}let J=this.type==="*"||this.type==="+",Q=this.type==="!"?"(?:(?!(?:":"(?:",X=this.#V(x);if(this.isStart()&&this.isEnd()&&!X&&this.type!=="!"){let Y=this.toString();return this.#Q=[Y],this.type=null,this.#x=void 0,[Y,h5(this.toString()),!1,!1]}let q=!J||Z||x||!KY?"":this.#V(!0);if(q===X)q="";if(q)X=`(?:${X})(?:${q})*?`;let $="";if(this.type==="!"&&this.#X)$=(this.isStart()&&!x?KY:"")+QR;else{let Y=this.type==="!"?"))"+(this.isStart()&&!x&&!Z?KY:"")+JR+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&q?")":this.type==="*"&&q?")?":`)${this.type}`;$=Q+X+Y}return[$,h5(X),this.#x=!!this.#x,this.#q]}#V(Z){return this.#Q.map((x)=>{if(typeof x==="string")throw new Error("string type in extglob ast??");let[J,Q,X,q]=x.toRegExpSource(Z);return this.#q=this.#q||q,J}).filter((x)=>!(this.isStart()&&this.isEnd())||!!x).join("|")}static#H(Z,x,J=!1){let Q=!1,X="",q=!1;for(let $=0;$<Z.length;$++){let Y=Z.charAt($);if(Q){Q=!1,X+=(X60.has(Y)?"\\":"")+Y;continue}if(Y==="\\"){if($===Z.length-1)X+="\\\\";else Q=!0;continue}if(Y==="["){let[K,W,G,V]=ZR(Z,$);if(G){X+=K,q=q||W,$+=G-1,x=x||V;continue}}if(Y==="*"){if(J&&Z==="*")X+=QR;else X+=JR;x=!0;continue}if(Y==="?"){X+=KV,x=!0;continue}X+=q60(Y)}return[X,h5(Z),!!x,q]}}var Ox=(Z,{windowsPathsNoEscape:x=!1}={})=>{return x?Z.replace(/[?*()[\]]/g,"[$&]"):Z.replace(/[?*()[\]\\]/g,"\\$&")};var b4=(Z,x,J={})=>{if(yQ(x),!J.nocomment&&x.charAt(0)==="#")return!1;return new z5(x,J).match(Z)},$60=/^\*+([^+@!?\*\[\(]*)$/,Y60=(Z)=>(x)=>!x.startsWith(".")&&x.endsWith(Z),K60=(Z)=>(x)=>x.endsWith(Z),z60=(Z)=>{return Z=Z.toLowerCase(),(x)=>!x.startsWith(".")&&x.toLowerCase().endsWith(Z)},W60=(Z)=>{return Z=Z.toLowerCase(),(x)=>x.toLowerCase().endsWith(Z)},G60=/^\*+\.\*+$/,H60=(Z)=>!Z.startsWith(".")&&Z.includes("."),V60=(Z)=>Z!=="."&&Z!==".."&&Z.includes("."),U60=/^\.\*+$/,M60=(Z)=>Z!=="."&&Z!==".."&&Z.startsWith("."),B60=/^\*+$/,D60=(Z)=>Z.length!==0&&!Z.startsWith("."),F60=(Z)=>Z.length!==0&&Z!=="."&&Z!=="..",_60=/^\?+([^+@!?\*\[\(]*)?$/,L60=([Z,x=""])=>{let J=YR([Z]);if(!x)return J;return x=x.toLowerCase(),(Q)=>J(Q)&&Q.toLowerCase().endsWith(x)},N60=([Z,x=""])=>{let J=KR([Z]);if(!x)return J;return x=x.toLowerCase(),(Q)=>J(Q)&&Q.toLowerCase().endsWith(x)},C60=([Z,x=""])=>{let J=KR([Z]);return!x?J:(Q)=>J(Q)&&Q.endsWith(x)},w60=([Z,x=""])=>{let J=YR([Z]);return!x?J:(Q)=>J(Q)&&Q.endsWith(x)},YR=([Z])=>{let x=Z.length;return(J)=>J.length===x&&!J.startsWith(".")},KR=([Z])=>{let x=Z.length;return(J)=>J.length===x&&J!=="."&&J!==".."},zR=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",XR={win32:{sep:"\\"},posix:{sep:"/"}},j60=zR==="win32"?XR.win32.sep:XR.posix.sep;b4.sep=j60;var n8=Symbol("globstar **");b4.GLOBSTAR=n8;var R60="[^/]",P60=R60+"*?",m60="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",O60="(?:(?!(?:\\/|^)\\.).)*?",I60=(Z,x={})=>(J)=>b4(J,Z,x);b4.filter=I60;var K5=(Z,x={})=>Object.assign({},Z,x),A60=(Z)=>{if(!Z||typeof Z!=="object"||!Object.keys(Z).length)return b4;let x=b4;return Object.assign((Q,X,q={})=>x(Q,X,K5(Z,q)),{Minimatch:class Q extends x.Minimatch{constructor(X,q={}){super(X,K5(Z,q))}static defaults(X){return x.defaults(K5(Z,X)).Minimatch}},AST:class Q extends x.AST{constructor(X,q,$={}){super(X,q,K5(Z,$))}static fromGlob(X,q={}){return x.AST.fromGlob(X,K5(Z,q))}},unescape:(Q,X={})=>x.unescape(Q,K5(Z,X)),escape:(Q,X={})=>x.escape(Q,K5(Z,X)),filter:(Q,X={})=>x.filter(Q,K5(Z,X)),defaults:(Q)=>x.defaults(K5(Z,Q)),makeRe:(Q,X={})=>x.makeRe(Q,K5(Z,X)),braceExpand:(Q,X={})=>x.braceExpand(Q,K5(Z,X)),match:(Q,X,q={})=>x.match(Q,X,K5(Z,q)),sep:x.sep,GLOBSTAR:n8})};b4.defaults=A60;var WR=(Z,x={})=>{if(yQ(Z),x.nobrace||!/\{(?:(?!\{).)*\}/.test(Z))return[Z];return $R.default(Z)};b4.braceExpand=WR;var S60=(Z,x={})=>new z5(Z,x).makeRe();b4.makeRe=S60;var T60=(Z,x,J={})=>{let Q=new z5(x,J);if(Z=Z.filter((X)=>Q.match(X)),Q.options.nonull&&!Z.length)Z.push(x);return Z};b4.match=T60;var qR=/[?*]|[+@!]\(.*?\)|\[|\]/,f60=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class z5{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(Z,x={}){if(yQ(Z),x=x||{},this.options=x,this.pattern=Z,this.platform=x.platform||zR,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!x.windowsPathsNoEscape||x.allowWindowsEscape===!1,this.windowsPathsNoEscape)this.pattern=this.pattern.replace(/\\/g,"/");this.preserveMultipleSlashes=!!x.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!x.nonegate,this.comment=!1,this.empty=!1,this.partial=!!x.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=x.windowsNoMagicRoot!==void 0?x.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let Z of this.set)for(let x of Z)if(typeof x!=="string")return!0;return!1}debug(...Z){}make(){let Z=this.pattern,x=this.options;if(!x.nocomment&&Z.charAt(0)==="#"){this.comment=!0;return}if(!Z){this.empty=!0;return}if(this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],x.debug)this.debug=(...X)=>console.error(...X);this.debug(this.pattern,this.globSet);let J=this.globSet.map((X)=>this.slashSplit(X));this.globParts=this.preprocess(J),this.debug(this.pattern,this.globParts);let Q=this.globParts.map((X,q,$)=>{if(this.isWindows&&this.windowsNoMagicRoot){let Y=X[0]===""&&X[1]===""&&(X[2]==="?"||!qR.test(X[2]))&&!qR.test(X[3]),K=/^[a-z]:/i.test(X[0]);if(Y)return[...X.slice(0,4),...X.slice(4).map((W)=>this.parse(W))];else if(K)return[X[0],...X.slice(1).map((W)=>this.parse(W))]}return X.map((Y)=>this.parse(Y))});if(this.debug(this.pattern,Q),this.set=Q.filter((X)=>X.indexOf(!1)===-1),this.isWindows)for(let X=0;X<this.set.length;X++){let q=this.set[X];if(q[0]===""&&q[1]===""&&this.globParts[X][2]==="?"&&typeof q[3]==="string"&&/^[a-z]:$/i.test(q[3]))q[2]="?"}this.debug(this.pattern,this.set)}preprocess(Z){if(this.options.noglobstar){for(let J=0;J<Z.length;J++)for(let Q=0;Q<Z[J].length;Q++)if(Z[J][Q]==="**")Z[J][Q]="*"}let{optimizationLevel:x=1}=this.options;if(x>=2)Z=this.firstPhasePreProcess(Z),Z=this.secondPhasePreProcess(Z);else if(x>=1)Z=this.levelOneOptimize(Z);else Z=this.adjascentGlobstarOptimize(Z);return Z}adjascentGlobstarOptimize(Z){return Z.map((x)=>{let J=-1;while((J=x.indexOf("**",J+1))!==-1){let Q=J;while(x[Q+1]==="**")Q++;if(Q!==J)x.splice(J,Q-J)}return x})}levelOneOptimize(Z){return Z.map((x)=>{return x=x.reduce((J,Q)=>{let X=J[J.length-1];if(Q==="**"&&X==="**")return J;if(Q===".."){if(X&&X!==".."&&X!=="."&&X!=="**")return J.pop(),J}return J.push(Q),J},[]),x.length===0?[""]:x})}levelTwoFileOptimize(Z){if(!Array.isArray(Z))Z=this.slashSplit(Z);let x=!1;do{if(x=!1,!this.preserveMultipleSlashes){for(let Q=1;Q<Z.length-1;Q++){let X=Z[Q];if(Q===1&&X===""&&Z[0]==="")continue;if(X==="."||X==="")x=!0,Z.splice(Q,1),Q--}if(Z[0]==="."&&Z.length===2&&(Z[1]==="."||Z[1]===""))x=!0,Z.pop()}let J=0;while((J=Z.indexOf("..",J+1))!==-1){let Q=Z[J-1];if(Q&&Q!=="."&&Q!==".."&&Q!=="**")x=!0,Z.splice(J-1,2),J-=2}}while(x);return Z.length===0?[""]:Z}firstPhasePreProcess(Z){let x=!1;do{x=!1;for(let J of Z){let Q=-1;while((Q=J.indexOf("**",Q+1))!==-1){let q=Q;while(J[q+1]==="**")q++;if(q>Q)J.splice(Q+1,q-Q);let $=J[Q+1],Y=J[Q+2],K=J[Q+3];if($!=="..")continue;if(!Y||Y==="."||Y===".."||!K||K==="."||K==="..")continue;x=!0,J.splice(Q,1);let W=J.slice(0);W[Q]="**",Z.push(W),Q--}if(!this.preserveMultipleSlashes){for(let q=1;q<J.length-1;q++){let $=J[q];if(q===1&&$===""&&J[0]==="")continue;if($==="."||$==="")x=!0,J.splice(q,1),q--}if(J[0]==="."&&J.length===2&&(J[1]==="."||J[1]===""))x=!0,J.pop()}let X=0;while((X=J.indexOf("..",X+1))!==-1){let q=J[X-1];if(q&&q!=="."&&q!==".."&&q!=="**"){x=!0;let Y=X===1&&J[X+1]==="**"?["."]:[];if(J.splice(X-1,2,...Y),J.length===0)J.push("");X-=2}}}}while(x);return Z}secondPhasePreProcess(Z){for(let x=0;x<Z.length-1;x++)for(let J=x+1;J<Z.length;J++){let Q=this.partsMatch(Z[x],Z[J],!this.preserveMultipleSlashes);if(Q){Z[x]=[],Z[J]=Q;break}}return Z.filter((x)=>x.length)}partsMatch(Z,x,J=!1){let Q=0,X=0,q=[],$="";while(Q<Z.length&&X<x.length)if(Z[Q]===x[X])q.push($==="b"?x[X]:Z[Q]),Q++,X++;else if(J&&Z[Q]==="**"&&x[X]===Z[Q+1])q.push(Z[Q]),Q++;else if(J&&x[X]==="**"&&Z[Q]===x[X+1])q.push(x[X]),X++;else if(Z[Q]==="*"&&x[X]&&(this.options.dot||!x[X].startsWith("."))&&x[X]!=="**"){if($==="b")return!1;$="a",q.push(Z[Q]),Q++,X++}else if(x[X]==="*"&&Z[Q]&&(this.options.dot||!Z[Q].startsWith("."))&&Z[Q]!=="**"){if($==="a")return!1;$="b",q.push(x[X]),Q++,X++}else return!1;return Z.length===x.length&&q}parseNegate(){if(this.nonegate)return;let Z=this.pattern,x=!1,J=0;for(let Q=0;Q<Z.length&&Z.charAt(Q)==="!";Q++)x=!x,J++;if(J)this.pattern=Z.slice(J);this.negate=x}matchOne(Z,x,J=!1){let Q=this.options;if(this.isWindows){let D=typeof Z[0]==="string"&&/^[a-z]:$/i.test(Z[0]),_=!D&&Z[0]===""&&Z[1]===""&&Z[2]==="?"&&/^[a-z]:$/i.test(Z[3]),w=typeof x[0]==="string"&&/^[a-z]:$/i.test(x[0]),P=!w&&x[0]===""&&x[1]===""&&x[2]==="?"&&typeof x[3]==="string"&&/^[a-z]:$/i.test(x[3]),E=_?3:D?0:void 0,t=P?3:w?0:void 0;if(typeof E==="number"&&typeof t==="number"){let[K0,q0]=[Z[E],x[t]];if(K0.toLowerCase()===q0.toLowerCase()){if(x[t]=K0,t>E)x=x.slice(t);else if(E>t)Z=Z.slice(E)}}}let{optimizationLevel:X=1}=this.options;if(X>=2)Z=this.levelTwoFileOptimize(Z);this.debug("matchOne",this,{file:Z,pattern:x}),this.debug("matchOne",Z.length,x.length);for(var q=0,$=0,Y=Z.length,K=x.length;q<Y&&$<K;q++,$++){this.debug("matchOne loop");var W=x[$],G=Z[q];if(this.debug(x,W,G),W===!1)return!1;if(W===n8){this.debug("GLOBSTAR",[x,W,G]);var V=q,U=$+1;if(U===K){this.debug("** at the end");for(;q<Y;q++)if(Z[q]==="."||Z[q]===".."||!Q.dot&&Z[q].charAt(0)===".")return!1;return!0}while(V<Y){var B=Z[V];if(this.debug(`
87
+ }`;var P2=Dj(function(){return t2(R,d0+"return "+U0).apply(Z,m)});if(P2.source=U0,pH(P2))throw P2;return P2}function J80(z){return q3(z).toLowerCase()}function Q80(z){return q3(z).toUpperCase()}function X80(z,H,M){if(z=q3(z),z&&(M||H===Z))return PC(z);if(!z||!(H=w6(H)))return z;var F=k5(z),N=k5(H),R=mC(F,N),m=OC(F,N)+1;return r1(F,R,m).join("")}function q80(z,H,M){if(z=q3(z),z&&(M||H===Z))return z.slice(0,AC(z)+1);if(!z||!(H=w6(H)))return z;var F=k5(z),N=OC(F,k5(H))+1;return r1(F,0,N).join("")}function $80(z,H,M){if(z=q3(z),z&&(M||H===Z))return z.replace(pG,"");if(!z||!(H=w6(H)))return z;var F=k5(z),N=mC(F,k5(H));return r1(F,N).join("")}function Y80(z,H){var M=S,F=k;if(g3(H)){var N="separator"in H?H.separator:N;M="length"in H?j2(H.length):M,F="omission"in H?w6(H.omission):F}z=q3(z);var R=z.length;if(Dx(z)){var m=k5(z);R=m.length}if(M>=R)return z;var I=M-Fx(F);if(I<1)return F;var p=m?r1(m,0,I).join(""):z.slice(0,I);if(N===Z)return p+F;if(m)I+=p.length-I;if(yH(N)){if(z.slice(I).search(N)){var W0,G0=p;if(!N.global)N=JH(N.source,q3(sN.exec(N))+"g");N.lastIndex=0;while(W0=N.exec(G0))var U0=W0.index;p=p.slice(0,U0===Z?I:U0)}}else if(z.indexOf(w6(N),I)!=I){var E0=p.lastIndexOf(N);if(E0>-1)p=p.slice(0,E0)}return p+F}function K80(z){return z=q3(z),z&&Fn.test(z)?z.replace(lN,br):z}var z80=jx(function(z,H,M){return z+(M?" ":"")+H.toUpperCase()}),gH=Fw("toUpperCase");function Bj(z,H,M){if(z=q3(z),H=M?Z:H,H===Z)return Tr(z)?yr(z):wr(z);return z.match(H)||[]}var Dj=m2(function(z,H){try{return N6(z,Z,H)}catch(M){return pH(M)?M:new D2(M)}}),W80=K1(function(z,H){return Z5(H,function(M){M=_7(M),$1(z,M,bH(z[M],z))}),z});function G80(z){var H=z==null?0:z.length,M=e0();return z=!H?[]:E3(z,function(F){if(typeof F[1]!="function")throw new x5(X);return[M(F[0]),F[1]]}),m2(function(F){var N=-1;while(++N<H){var R=z[N];if(N6(R[0],this,F))return N6(R[1],this,F)}})}function H80(z){return bt(Q5(z,W))}function dH(z){return function(){return z}}function V80(z,H){return z==null||z!==z?H:z}var U80=Lw(),M80=Lw(!0);function x6(z){return z}function lH(z){return nC(typeof z=="function"?z:Q5(z,W))}function B80(z){return tC(Q5(z,W))}function D80(z,H){return eC(z,Q5(H,W))}var F80=m2(function(z,H){return function(M){return SQ(M,z,H)}}),_80=m2(function(z,H){return function(M){return SQ(z,M,H)}});function iH(z,H,M){var F=E8(H),N=y$(H,F);if(M==null&&!(g3(H)&&(N.length||!F.length)))M=H,H=z,z=this,N=y$(H,E8(H));var R=!(g3(M)&&("chain"in M))||!!M.chain,m=W1(z);return Z5(N,function(I){var p=H[I];if(z[I]=p,m)z.prototype[I]=function(){var W0=this.__chain__;if(R||W0){var G0=z(this.__wrapped__),U0=G0.__actions__=t4(this.__actions__);return U0.push({func:p,args:arguments,thisArg:z}),G0.__chain__=W0,G0}return p.apply(z,d1([this.value()],arguments))}}),z}function L80(){if(v8._===this)v8._=ir;return this}function oH(){}function N80(z){return z=j2(z),m2(function(H){return Zw(H,z)})}var C80=jH(E3),w80=jH(NC),j80=jH(aG);function Fj(z){return SH(z)?nG(_7(z)):Ze(z)}function R80(z){return function(H){return z==null?Z:i9(z,H)}}var P80=Cw(),m80=Cw(!0);function sH(){return[]}function aH(){return!1}function O80(){return{}}function I80(){return""}function A80(){return!0}function S80(z,H){if(z=j2(z),z<1||z>Y0)return[];var M=I2,F=D4(z,I2);H=e0(H),z-=I2;var N=eG(F,H);while(++M<z)H(M);return N}function T80(z){if(L2(z))return E3(z,_7);return j6(z)?[z]:t4(cw(q3(z)))}function f80(z){var H=++dr;return q3(z)+H}var v80=i$(function(z,H){return z+H},0),E80=RH("ceil"),k80=i$(function(z,H){return z/H},1),b80=RH("floor");function c80(z){return z&&z.length?p$(z,x6,WH):Z}function p80(z,H){return z&&z.length?p$(z,e0(H,2),WH):Z}function y80(z){return jC(z,x6)}function h80(z,H){return jC(z,e0(H,2))}function u80(z){return z&&z.length?p$(z,x6,UH):Z}function g80(z,H){return z&&z.length?p$(z,e0(H,2),UH):Z}var d80=i$(function(z,H){return z*H},1),l80=RH("round"),i80=i$(function(z,H){return z-H},0);function o80(z){return z&&z.length?tG(z,x6):0}function s80(z,H){return z&&z.length?tG(z,e0(H,2)):0}if(j.after=B20,j.ary=aw,j.assign=Q30,j.assignIn=zj,j.assignInWith=qY,j.assignWith=X30,j.at=q30,j.before=nw,j.bind=bH,j.bindAll=W80,j.bindKey=rw,j.castArray=O20,j.chain=iw,j.chunk=be,j.compact=ce,j.concat=pe,j.cond=G80,j.conforms=H80,j.constant=dH,j.countBy=o00,j.create=$30,j.curry=tw,j.curryRight=ew,j.debounce=Zj,j.defaults=Y30,j.defaultsDeep=K30,j.defer=D20,j.delay=F20,j.difference=ye,j.differenceBy=he,j.differenceWith=ue,j.drop=ge,j.dropRight=de,j.dropRightWhile=le,j.dropWhile=ie,j.fill=oe,j.filter=a00,j.flatMap=t00,j.flatMapDeep=e00,j.flatMapDepth=Z20,j.flatten=uw,j.flattenDeep=se,j.flattenDepth=ae,j.flip=_20,j.flow=U80,j.flowRight=M80,j.fromPairs=ne,j.functions=M30,j.functionsIn=B30,j.groupBy=x20,j.initial=te,j.intersection=ee,j.intersectionBy=Z00,j.intersectionWith=x00,j.invert=F30,j.invertBy=_30,j.invokeMap=Q20,j.iteratee=lH,j.keyBy=X20,j.keys=E8,j.keysIn=Z6,j.map=e$,j.mapKeys=N30,j.mapValues=C30,j.matches=B80,j.matchesProperty=D80,j.memoize=xY,j.merge=w30,j.mergeWith=Wj,j.method=F80,j.methodOf=_80,j.mixin=iH,j.negate=JY,j.nthArg=N80,j.omit=j30,j.omitBy=R30,j.once=L20,j.orderBy=q20,j.over=C80,j.overArgs=N20,j.overEvery=w80,j.overSome=j80,j.partial=cH,j.partialRight=xj,j.partition=$20,j.pick=P30,j.pickBy=Gj,j.property=Fj,j.propertyOf=R80,j.pull=q00,j.pullAll=dw,j.pullAllBy=$00,j.pullAllWith=Y00,j.pullAt=K00,j.range=P80,j.rangeRight=m80,j.rearg=C20,j.reject=z20,j.remove=z00,j.rest=w20,j.reverse=EH,j.sampleSize=G20,j.set=O30,j.setWith=I30,j.shuffle=H20,j.slice=W00,j.sortBy=M20,j.sortedUniq=D00,j.sortedUniqBy=F00,j.split=t30,j.spread=j20,j.tail=_00,j.take=L00,j.takeRight=N00,j.takeRightWhile=C00,j.takeWhile=w00,j.tap=c00,j.throttle=R20,j.thru=t$,j.toArray=$j,j.toPairs=Hj,j.toPairsIn=Vj,j.toPath=T80,j.toPlainObject=Kj,j.transform=A30,j.unary=P20,j.union=j00,j.unionBy=R00,j.unionWith=P00,j.uniq=m00,j.uniqBy=O00,j.uniqWith=I00,j.unset=S30,j.unzip=kH,j.unzipWith=lw,j.update=T30,j.updateWith=f30,j.values=mx,j.valuesIn=v30,j.without=A00,j.words=Bj,j.wrap=m20,j.xor=S00,j.xorBy=T00,j.xorWith=f00,j.zip=v00,j.zipObject=E00,j.zipObjectDeep=k00,j.zipWith=b00,j.entries=Hj,j.entriesIn=Vj,j.extend=zj,j.extendWith=qY,iH(j,j),j.add=v80,j.attempt=Dj,j.camelCase=c30,j.capitalize=Uj,j.ceil=E80,j.clamp=E30,j.clone=I20,j.cloneDeep=S20,j.cloneDeepWith=T20,j.cloneWith=A20,j.conformsTo=f20,j.deburr=Mj,j.defaultTo=V80,j.divide=k80,j.endsWith=p30,j.eq=c5,j.escape=y30,j.escapeRegExp=h30,j.every=s00,j.find=n00,j.findIndex=yw,j.findKey=z30,j.findLast=r00,j.findLastIndex=hw,j.findLastKey=W30,j.floor=b80,j.forEach=ow,j.forEachRight=sw,j.forIn=G30,j.forInRight=H30,j.forOwn=V30,j.forOwnRight=U30,j.get=hH,j.gt=v20,j.gte=E20,j.has=D30,j.hasIn=uH,j.head=gw,j.identity=x6,j.includes=J20,j.indexOf=re,j.inRange=k30,j.invoke=L30,j.isArguments=a9,j.isArray=L2,j.isArrayBuffer=k20,j.isArrayLike=e4,j.isArrayLikeObject=J8,j.isBoolean=b20,j.isBuffer=t1,j.isDate=c20,j.isElement=p20,j.isEmpty=y20,j.isEqual=h20,j.isEqualWith=u20,j.isError=pH,j.isFinite=g20,j.isFunction=W1,j.isInteger=Jj,j.isLength=QY,j.isMap=Qj,j.isMatch=d20,j.isMatchWith=l20,j.isNaN=i20,j.isNative=o20,j.isNil=a20,j.isNull=s20,j.isNumber=Xj,j.isObject=g3,j.isObjectLike=s3,j.isPlainObject=bQ,j.isRegExp=yH,j.isSafeInteger=n20,j.isSet=qj,j.isString=XY,j.isSymbol=j6,j.isTypedArray=Px,j.isUndefined=r20,j.isWeakMap=t20,j.isWeakSet=e20,j.join=J00,j.kebabCase=u30,j.last=q5,j.lastIndexOf=Q00,j.lowerCase=g30,j.lowerFirst=d30,j.lt=Z30,j.lte=x30,j.max=c80,j.maxBy=p80,j.mean=y80,j.meanBy=h80,j.min=u80,j.minBy=g80,j.stubArray=sH,j.stubFalse=aH,j.stubObject=O80,j.stubString=I80,j.stubTrue=A80,j.multiply=d80,j.nth=X00,j.noConflict=L80,j.noop=oH,j.now=ZY,j.pad=l30,j.padEnd=i30,j.padStart=o30,j.parseInt=s30,j.random=b30,j.reduce=Y20,j.reduceRight=K20,j.repeat=a30,j.replace=n30,j.result=m30,j.round=l80,j.runInContext=b,j.sample=W20,j.size=V20,j.snakeCase=r30,j.some=U20,j.sortedIndex=G00,j.sortedIndexBy=H00,j.sortedIndexOf=V00,j.sortedLastIndex=U00,j.sortedLastIndexBy=M00,j.sortedLastIndexOf=B00,j.startCase=e30,j.startsWith=Z80,j.subtract=i80,j.sum=o80,j.sumBy=s80,j.template=x80,j.times=S80,j.toFinite=G1,j.toInteger=j2,j.toLength=Yj,j.toLower=J80,j.toNumber=$5,j.toSafeInteger=J30,j.toString=q3,j.toUpper=Q80,j.trim=X80,j.trimEnd=q80,j.trimStart=$80,j.truncate=Y80,j.unescape=K80,j.uniqueId=f80,j.upperCase=z80,j.upperFirst=gH,j.each=ow,j.eachRight=sw,j.first=gw,iH(j,function(){var z={};return D7(j,function(H,M){if(!G3.call(j.prototype,M))z[M]=H}),z}(),{chain:!1}),j.VERSION=x,Z5(["bind","bindKey","curry","curryRight","partial","partialRight"],function(z){j[z].placeholder=j}),Z5(["drop","take"],function(z,H){E2.prototype[z]=function(M){M=M===Z?1:P8(j2(M),0);var F=this.__filtered__&&!H?new E2(this):this.clone();if(F.__filtered__)F.__takeCount__=D4(M,F.__takeCount__);else F.__views__.push({size:D4(M,I2),type:z+(F.__dir__<0?"Right":"")});return F},E2.prototype[z+"Right"]=function(M){return this.reverse()[z](M).reverse()}}),Z5(["filter","map","takeWhile"],function(z,H){var M=H+1,F=M==x2||M==R2;E2.prototype[z]=function(N){var R=this.clone();return R.__iteratees__.push({iteratee:e0(N,3),type:M}),R.__filtered__=R.__filtered__||F,R}}),Z5(["head","last"],function(z,H){var M="take"+(H?"Right":"");E2.prototype[z]=function(){return this[M](1).value()[0]}}),Z5(["initial","tail"],function(z,H){var M="drop"+(H?"":"Right");E2.prototype[z]=function(){return this.__filtered__?new E2(this):this[M](1)}}),E2.prototype.compact=function(){return this.filter(x6)},E2.prototype.find=function(z){return this.filter(z).head()},E2.prototype.findLast=function(z){return this.reverse().find(z)},E2.prototype.invokeMap=m2(function(z,H){if(typeof z=="function")return new E2(this);return this.map(function(M){return SQ(M,z,H)})}),E2.prototype.reject=function(z){return this.filter(JY(e0(z)))},E2.prototype.slice=function(z,H){z=j2(z);var M=this;if(M.__filtered__&&(z>0||H<0))return new E2(M);if(z<0)M=M.takeRight(-z);else if(z)M=M.drop(z);if(H!==Z)H=j2(H),M=H<0?M.dropRight(-H):M.take(H-z);return M},E2.prototype.takeRightWhile=function(z){return this.reverse().takeWhile(z).reverse()},E2.prototype.toArray=function(){return this.take(I2)},D7(E2.prototype,function(z,H){var M=/^(?:filter|find|map|reject)|While$/.test(H),F=/^(?:head|last)$/.test(H),N=j[F?"take"+(H=="last"?"Right":""):H],R=F||/^find/.test(H);if(!N)return;j.prototype[H]=function(){var m=this.__wrapped__,I=F?[1]:arguments,p=m instanceof E2,W0=I[0],G0=p||L2(m),U0=function(f2){var p2=N.apply(j,d1([f2],I));return F&&E0?p2[0]:p2};if(G0&&M&&typeof W0=="function"&&W0.length!=1)p=G0=!1;var E0=this.__chain__,d0=!!this.__actions__.length,Q2=R&&!E0,P2=p&&!d0;if(!R&&G0){m=P2?m:new E2(this);var X2=z.apply(m,I);return X2.__actions__.push({func:t$,args:[U0],thisArg:Z}),new J5(X2,E0)}if(Q2&&P2)return z.apply(this,I);return X2=this.thru(U0),Q2?F?X2.value()[0]:X2.value():X2}}),Z5(["pop","push","shift","sort","splice","unshift"],function(z){var H=j$[z],M=/^(?:push|sort|unshift)$/.test(z)?"tap":"thru",F=/^(?:pop|shift)$/.test(z);j.prototype[z]=function(){var N=arguments;if(F&&!this.__chain__){var R=this.value();return H.apply(L2(R)?R:[],N)}return this[M](function(m){return H.apply(L2(m)?m:[],N)})}}),D7(E2.prototype,function(z,H){var M=j[H];if(M){var F=M.name+"";if(!G3.call(Nx,F))Nx[F]=[];Nx[F].push({name:H,func:M})}}),Nx[l$(Z,_).name]=[{name:"wrapper",func:Z}],E2.prototype.clone=Kt,E2.prototype.reverse=zt,E2.prototype.value=Wt,j.prototype.at=p00,j.prototype.chain=y00,j.prototype.commit=h00,j.prototype.next=u00,j.prototype.plant=d00,j.prototype.reverse=l00,j.prototype.toJSON=j.prototype.valueOf=j.prototype.value=i00,j.prototype.first=j.prototype.head,jQ)j.prototype[jQ]=g00;return j},i1=hr();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)v8._=i1,define(function(){return i1});else if(h9)(h9.exports=i1)._=i1,lG._=i1;else v8._=i1}).call(Dq)});var Lj="0.2.6";var pj=n9(cj(),1),{program:ca0,createCommand:pa0,createArgument:ya0,createOption:ha0,CommanderError:ua0,InvalidArgumentError:ga0,InvalidOptionArgumentError:da0,Command:Y5,Argument:la0,Option:ia0,Help:oa0}=pj.default;import NQ0 from"fs";var $R=n9(tj(),1);var yQ=(Z)=>{if(typeof Z!=="string")throw new TypeError("invalid pattern");if(Z.length>65536)throw new TypeError("pattern is too long")};var t40={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},hQ=(Z)=>Z.replace(/[[\]\\-]/g,"\\$&"),e40=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ej=(Z)=>Z.join(""),ZR=(Z,x)=>{let J=x;if(Z.charAt(J)!=="[")throw new Error("not in a brace expression");let Q=[],X=[],q=J+1,$=!1,Y=!1,K=!1,W=!1,G=J,V="";Z:while(q<Z.length){let _=Z.charAt(q);if((_==="!"||_==="^")&&q===J+1){W=!0,q++;continue}if(_==="]"&&$&&!K){G=q+1;break}if($=!0,_==="\\"){if(!K){K=!0,q++;continue}}if(_==="["&&!K){for(let[w,[P,E,t]]of Object.entries(t40))if(Z.startsWith(w,q)){if(V)return["$.",!1,Z.length-J,!0];if(q+=w.length,t)X.push(P);else Q.push(P);Y=Y||E;continue Z}}if(K=!1,V){if(_>V)Q.push(hQ(V)+"-"+hQ(_));else if(_===V)Q.push(hQ(_));V="",q++;continue}if(Z.startsWith("-]",q+1)){Q.push(hQ(_+"-")),q+=2;continue}if(Z.startsWith("-",q+1)){V=_,q+=2;continue}Q.push(hQ(_)),q++}if(G<q)return["",!1,0,!1];if(!Q.length&&!X.length)return["$.",!1,Z.length-J,!0];if(X.length===0&&Q.length===1&&/^\\?.$/.test(Q[0])&&!W){let _=Q[0].length===2?Q[0].slice(-1):Q[0];return[e40(_),!1,G-J,!1]}let U="["+(W?"^":"")+ej(Q)+"]",B="["+(W?"":"^")+ej(X)+"]";return[Q.length&&X.length?"("+U+"|"+B+")":Q.length?U:B,Y,G-J,!0]};var h5=(Z,{windowsPathsNoEscape:x=!1}={})=>{return x?Z.replace(/\[([^\/\\])\]/g,"$1"):Z.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")};var Z60=new Set(["!","?","+","*","@"]),xR=(Z)=>Z60.has(Z),x60="(?!(?:^|/)\\.\\.?(?:$|/))",KY="(?!\\.)",J60=new Set(["[","."]),Q60=new Set(["..","."]),X60=new Set("().*{}+?[]^$\\!"),q60=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),KV="[^/]",JR=KV+"*?",QR=KV+"+?";class a8{type;#Z;#x;#q=!1;#Q=[];#$;#L;#z;#G=!1;#Y;#K;#X=!1;constructor(Z,x,J={}){if(this.type=Z,Z)this.#x=!0;if(this.#$=x,this.#Z=this.#$?this.#$.#Z:this,this.#Y=this.#Z===this?J:this.#Z.#Y,this.#z=this.#Z===this?[]:this.#Z.#z,Z==="!"&&!this.#Z.#G)this.#z.push(this);this.#L=this.#$?this.#$.#Q.length:0}get hasMagic(){if(this.#x!==void 0)return this.#x;for(let Z of this.#Q){if(typeof Z==="string")continue;if(Z.type||Z.hasMagic)return this.#x=!0}return this.#x}toString(){if(this.#K!==void 0)return this.#K;if(!this.type)return this.#K=this.#Q.map((Z)=>String(Z)).join("");else return this.#K=this.type+"("+this.#Q.map((Z)=>String(Z)).join("|")+")"}#B(){if(this!==this.#Z)throw new Error("should only call on root");if(this.#G)return this;this.toString(),this.#G=!0;let Z;while(Z=this.#z.pop()){if(Z.type!=="!")continue;let x=Z,J=x.#$;while(J){for(let Q=x.#L+1;!J.type&&Q<J.#Q.length;Q++)for(let X of Z.#Q){if(typeof X==="string")throw new Error("string part in extglob AST??");X.copyIn(J.#Q[Q])}x=J,J=x.#$}}return this}push(...Z){for(let x of Z){if(x==="")continue;if(typeof x!=="string"&&!(x instanceof a8&&x.#$===this))throw new Error("invalid part: "+x);this.#Q.push(x)}}toJSON(){let Z=this.type===null?this.#Q.slice().map((x)=>typeof x==="string"?x:x.toJSON()):[this.type,...this.#Q.map((x)=>x.toJSON())];if(this.isStart()&&!this.type)Z.unshift([]);if(this.isEnd()&&(this===this.#Z||this.#Z.#G&&this.#$?.type==="!"))Z.push({});return Z}isStart(){if(this.#Z===this)return!0;if(!this.#$?.isStart())return!1;if(this.#L===0)return!0;let Z=this.#$;for(let x=0;x<this.#L;x++){let J=Z.#Q[x];if(!(J instanceof a8&&J.type==="!"))return!1}return!0}isEnd(){if(this.#Z===this)return!0;if(this.#$?.type==="!")return!0;if(!this.#$?.isEnd())return!1;if(!this.type)return this.#$?.isEnd();let Z=this.#$?this.#$.#Q.length:0;return this.#L===Z-1}copyIn(Z){if(typeof Z==="string")this.push(Z);else this.push(Z.clone(this))}clone(Z){let x=new a8(this.type,Z);for(let J of this.#Q)x.copyIn(J);return x}static#D(Z,x,J,Q){let X=!1,q=!1,$=-1,Y=!1;if(x.type===null){let U=J,B="";while(U<Z.length){let D=Z.charAt(U++);if(X||D==="\\"){X=!X,B+=D;continue}if(q){if(U===$+1){if(D==="^"||D==="!")Y=!0}else if(D==="]"&&!(U===$+2&&Y))q=!1;B+=D;continue}else if(D==="["){q=!0,$=U,Y=!1,B+=D;continue}if(!Q.noext&&xR(D)&&Z.charAt(U)==="("){x.push(B),B="";let _=new a8(D,x);U=a8.#D(Z,_,U,Q),x.push(_);continue}B+=D}return x.push(B),U}let K=J+1,W=new a8(null,x),G=[],V="";while(K<Z.length){let U=Z.charAt(K++);if(X||U==="\\"){X=!X,V+=U;continue}if(q){if(K===$+1){if(U==="^"||U==="!")Y=!0}else if(U==="]"&&!(K===$+2&&Y))q=!1;V+=U;continue}else if(U==="["){q=!0,$=K,Y=!1,V+=U;continue}if(xR(U)&&Z.charAt(K)==="("){W.push(V),V="";let B=new a8(U,W);W.push(B),K=a8.#D(Z,B,K,Q);continue}if(U==="|"){W.push(V),V="",G.push(W),W=new a8(null,x);continue}if(U===")"){if(V===""&&x.#Q.length===0)x.#X=!0;return W.push(V),V="",x.push(...G,W),K}V+=U}return x.type=null,x.#x=void 0,x.#Q=[Z.substring(J-1)],K}static fromGlob(Z,x={}){let J=new a8(null,void 0,x);return a8.#D(Z,J,0,x),J}toMMPattern(){if(this!==this.#Z)return this.#Z.toMMPattern();let Z=this.toString(),[x,J,Q,X]=this.toRegExpSource();if(!(Q||this.#x||this.#Y.nocase&&!this.#Y.nocaseMagicOnly&&Z.toUpperCase()!==Z.toLowerCase()))return J;let $=(this.#Y.nocase?"i":"")+(X?"u":"");return Object.assign(new RegExp(`^${x}$`,$),{_src:x,_glob:Z})}get options(){return this.#Y}toRegExpSource(Z){let x=Z??!!this.#Y.dot;if(this.#Z===this)this.#B();if(!this.type){let Y=this.isStart()&&this.isEnd(),K=this.#Q.map((U)=>{let[B,D,_,w]=typeof U==="string"?a8.#H(U,this.#x,Y):U.toRegExpSource(Z);return this.#x=this.#x||_,this.#q=this.#q||w,B}).join(""),W="";if(this.isStart()){if(typeof this.#Q[0]==="string"){if(!(this.#Q.length===1&&Q60.has(this.#Q[0]))){let B=J60,D=x&&B.has(K.charAt(0))||K.startsWith("\\.")&&B.has(K.charAt(2))||K.startsWith("\\.\\.")&&B.has(K.charAt(4)),_=!x&&!Z&&B.has(K.charAt(0));W=D?x60:_?KY:""}}}let G="";if(this.isEnd()&&this.#Z.#G&&this.#$?.type==="!")G="(?:$|\\/)";return[W+K+G,h5(K),this.#x=!!this.#x,this.#q]}let J=this.type==="*"||this.type==="+",Q=this.type==="!"?"(?:(?!(?:":"(?:",X=this.#V(x);if(this.isStart()&&this.isEnd()&&!X&&this.type!=="!"){let Y=this.toString();return this.#Q=[Y],this.type=null,this.#x=void 0,[Y,h5(this.toString()),!1,!1]}let q=!J||Z||x||!KY?"":this.#V(!0);if(q===X)q="";if(q)X=`(?:${X})(?:${q})*?`;let $="";if(this.type==="!"&&this.#X)$=(this.isStart()&&!x?KY:"")+QR;else{let Y=this.type==="!"?"))"+(this.isStart()&&!x&&!Z?KY:"")+JR+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&q?")":this.type==="*"&&q?")?":`)${this.type}`;$=Q+X+Y}return[$,h5(X),this.#x=!!this.#x,this.#q]}#V(Z){return this.#Q.map((x)=>{if(typeof x==="string")throw new Error("string type in extglob ast??");let[J,Q,X,q]=x.toRegExpSource(Z);return this.#q=this.#q||q,J}).filter((x)=>!(this.isStart()&&this.isEnd())||!!x).join("|")}static#H(Z,x,J=!1){let Q=!1,X="",q=!1;for(let $=0;$<Z.length;$++){let Y=Z.charAt($);if(Q){Q=!1,X+=(X60.has(Y)?"\\":"")+Y;continue}if(Y==="\\"){if($===Z.length-1)X+="\\\\";else Q=!0;continue}if(Y==="["){let[K,W,G,V]=ZR(Z,$);if(G){X+=K,q=q||W,$+=G-1,x=x||V;continue}}if(Y==="*"){if(J&&Z==="*")X+=QR;else X+=JR;x=!0;continue}if(Y==="?"){X+=KV,x=!0;continue}X+=q60(Y)}return[X,h5(Z),!!x,q]}}var Ox=(Z,{windowsPathsNoEscape:x=!1}={})=>{return x?Z.replace(/[?*()[\]]/g,"[$&]"):Z.replace(/[?*()[\]\\]/g,"\\$&")};var b4=(Z,x,J={})=>{if(yQ(x),!J.nocomment&&x.charAt(0)==="#")return!1;return new z5(x,J).match(Z)},$60=/^\*+([^+@!?\*\[\(]*)$/,Y60=(Z)=>(x)=>!x.startsWith(".")&&x.endsWith(Z),K60=(Z)=>(x)=>x.endsWith(Z),z60=(Z)=>{return Z=Z.toLowerCase(),(x)=>!x.startsWith(".")&&x.toLowerCase().endsWith(Z)},W60=(Z)=>{return Z=Z.toLowerCase(),(x)=>x.toLowerCase().endsWith(Z)},G60=/^\*+\.\*+$/,H60=(Z)=>!Z.startsWith(".")&&Z.includes("."),V60=(Z)=>Z!=="."&&Z!==".."&&Z.includes("."),U60=/^\.\*+$/,M60=(Z)=>Z!=="."&&Z!==".."&&Z.startsWith("."),B60=/^\*+$/,D60=(Z)=>Z.length!==0&&!Z.startsWith("."),F60=(Z)=>Z.length!==0&&Z!=="."&&Z!=="..",_60=/^\?+([^+@!?\*\[\(]*)?$/,L60=([Z,x=""])=>{let J=YR([Z]);if(!x)return J;return x=x.toLowerCase(),(Q)=>J(Q)&&Q.toLowerCase().endsWith(x)},N60=([Z,x=""])=>{let J=KR([Z]);if(!x)return J;return x=x.toLowerCase(),(Q)=>J(Q)&&Q.toLowerCase().endsWith(x)},C60=([Z,x=""])=>{let J=KR([Z]);return!x?J:(Q)=>J(Q)&&Q.endsWith(x)},w60=([Z,x=""])=>{let J=YR([Z]);return!x?J:(Q)=>J(Q)&&Q.endsWith(x)},YR=([Z])=>{let x=Z.length;return(J)=>J.length===x&&!J.startsWith(".")},KR=([Z])=>{let x=Z.length;return(J)=>J.length===x&&J!=="."&&J!==".."},zR=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",XR={win32:{sep:"\\"},posix:{sep:"/"}},j60=zR==="win32"?XR.win32.sep:XR.posix.sep;b4.sep=j60;var n8=Symbol("globstar **");b4.GLOBSTAR=n8;var R60="[^/]",P60=R60+"*?",m60="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",O60="(?:(?!(?:\\/|^)\\.).)*?",I60=(Z,x={})=>(J)=>b4(J,Z,x);b4.filter=I60;var K5=(Z,x={})=>Object.assign({},Z,x),A60=(Z)=>{if(!Z||typeof Z!=="object"||!Object.keys(Z).length)return b4;let x=b4;return Object.assign((Q,X,q={})=>x(Q,X,K5(Z,q)),{Minimatch:class Q extends x.Minimatch{constructor(X,q={}){super(X,K5(Z,q))}static defaults(X){return x.defaults(K5(Z,X)).Minimatch}},AST:class Q extends x.AST{constructor(X,q,$={}){super(X,q,K5(Z,$))}static fromGlob(X,q={}){return x.AST.fromGlob(X,K5(Z,q))}},unescape:(Q,X={})=>x.unescape(Q,K5(Z,X)),escape:(Q,X={})=>x.escape(Q,K5(Z,X)),filter:(Q,X={})=>x.filter(Q,K5(Z,X)),defaults:(Q)=>x.defaults(K5(Z,Q)),makeRe:(Q,X={})=>x.makeRe(Q,K5(Z,X)),braceExpand:(Q,X={})=>x.braceExpand(Q,K5(Z,X)),match:(Q,X,q={})=>x.match(Q,X,K5(Z,q)),sep:x.sep,GLOBSTAR:n8})};b4.defaults=A60;var WR=(Z,x={})=>{if(yQ(Z),x.nobrace||!/\{(?:(?!\{).)*\}/.test(Z))return[Z];return $R.default(Z)};b4.braceExpand=WR;var S60=(Z,x={})=>new z5(Z,x).makeRe();b4.makeRe=S60;var T60=(Z,x,J={})=>{let Q=new z5(x,J);if(Z=Z.filter((X)=>Q.match(X)),Q.options.nonull&&!Z.length)Z.push(x);return Z};b4.match=T60;var qR=/[?*]|[+@!]\(.*?\)|\[|\]/,f60=(Z)=>Z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class z5{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(Z,x={}){if(yQ(Z),x=x||{},this.options=x,this.pattern=Z,this.platform=x.platform||zR,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!x.windowsPathsNoEscape||x.allowWindowsEscape===!1,this.windowsPathsNoEscape)this.pattern=this.pattern.replace(/\\/g,"/");this.preserveMultipleSlashes=!!x.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!x.nonegate,this.comment=!1,this.empty=!1,this.partial=!!x.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=x.windowsNoMagicRoot!==void 0?x.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let Z of this.set)for(let x of Z)if(typeof x!=="string")return!0;return!1}debug(...Z){}make(){let Z=this.pattern,x=this.options;if(!x.nocomment&&Z.charAt(0)==="#"){this.comment=!0;return}if(!Z){this.empty=!0;return}if(this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],x.debug)this.debug=(...X)=>console.error(...X);this.debug(this.pattern,this.globSet);let J=this.globSet.map((X)=>this.slashSplit(X));this.globParts=this.preprocess(J),this.debug(this.pattern,this.globParts);let Q=this.globParts.map((X,q,$)=>{if(this.isWindows&&this.windowsNoMagicRoot){let Y=X[0]===""&&X[1]===""&&(X[2]==="?"||!qR.test(X[2]))&&!qR.test(X[3]),K=/^[a-z]:/i.test(X[0]);if(Y)return[...X.slice(0,4),...X.slice(4).map((W)=>this.parse(W))];else if(K)return[X[0],...X.slice(1).map((W)=>this.parse(W))]}return X.map((Y)=>this.parse(Y))});if(this.debug(this.pattern,Q),this.set=Q.filter((X)=>X.indexOf(!1)===-1),this.isWindows)for(let X=0;X<this.set.length;X++){let q=this.set[X];if(q[0]===""&&q[1]===""&&this.globParts[X][2]==="?"&&typeof q[3]==="string"&&/^[a-z]:$/i.test(q[3]))q[2]="?"}this.debug(this.pattern,this.set)}preprocess(Z){if(this.options.noglobstar){for(let J=0;J<Z.length;J++)for(let Q=0;Q<Z[J].length;Q++)if(Z[J][Q]==="**")Z[J][Q]="*"}let{optimizationLevel:x=1}=this.options;if(x>=2)Z=this.firstPhasePreProcess(Z),Z=this.secondPhasePreProcess(Z);else if(x>=1)Z=this.levelOneOptimize(Z);else Z=this.adjascentGlobstarOptimize(Z);return Z}adjascentGlobstarOptimize(Z){return Z.map((x)=>{let J=-1;while((J=x.indexOf("**",J+1))!==-1){let Q=J;while(x[Q+1]==="**")Q++;if(Q!==J)x.splice(J,Q-J)}return x})}levelOneOptimize(Z){return Z.map((x)=>{return x=x.reduce((J,Q)=>{let X=J[J.length-1];if(Q==="**"&&X==="**")return J;if(Q===".."){if(X&&X!==".."&&X!=="."&&X!=="**")return J.pop(),J}return J.push(Q),J},[]),x.length===0?[""]:x})}levelTwoFileOptimize(Z){if(!Array.isArray(Z))Z=this.slashSplit(Z);let x=!1;do{if(x=!1,!this.preserveMultipleSlashes){for(let Q=1;Q<Z.length-1;Q++){let X=Z[Q];if(Q===1&&X===""&&Z[0]==="")continue;if(X==="."||X==="")x=!0,Z.splice(Q,1),Q--}if(Z[0]==="."&&Z.length===2&&(Z[1]==="."||Z[1]===""))x=!0,Z.pop()}let J=0;while((J=Z.indexOf("..",J+1))!==-1){let Q=Z[J-1];if(Q&&Q!=="."&&Q!==".."&&Q!=="**")x=!0,Z.splice(J-1,2),J-=2}}while(x);return Z.length===0?[""]:Z}firstPhasePreProcess(Z){let x=!1;do{x=!1;for(let J of Z){let Q=-1;while((Q=J.indexOf("**",Q+1))!==-1){let q=Q;while(J[q+1]==="**")q++;if(q>Q)J.splice(Q+1,q-Q);let $=J[Q+1],Y=J[Q+2],K=J[Q+3];if($!=="..")continue;if(!Y||Y==="."||Y===".."||!K||K==="."||K==="..")continue;x=!0,J.splice(Q,1);let W=J.slice(0);W[Q]="**",Z.push(W),Q--}if(!this.preserveMultipleSlashes){for(let q=1;q<J.length-1;q++){let $=J[q];if(q===1&&$===""&&J[0]==="")continue;if($==="."||$==="")x=!0,J.splice(q,1),q--}if(J[0]==="."&&J.length===2&&(J[1]==="."||J[1]===""))x=!0,J.pop()}let X=0;while((X=J.indexOf("..",X+1))!==-1){let q=J[X-1];if(q&&q!=="."&&q!==".."&&q!=="**"){x=!0;let Y=X===1&&J[X+1]==="**"?["."]:[];if(J.splice(X-1,2,...Y),J.length===0)J.push("");X-=2}}}}while(x);return Z}secondPhasePreProcess(Z){for(let x=0;x<Z.length-1;x++)for(let J=x+1;J<Z.length;J++){let Q=this.partsMatch(Z[x],Z[J],!this.preserveMultipleSlashes);if(Q){Z[x]=[],Z[J]=Q;break}}return Z.filter((x)=>x.length)}partsMatch(Z,x,J=!1){let Q=0,X=0,q=[],$="";while(Q<Z.length&&X<x.length)if(Z[Q]===x[X])q.push($==="b"?x[X]:Z[Q]),Q++,X++;else if(J&&Z[Q]==="**"&&x[X]===Z[Q+1])q.push(Z[Q]),Q++;else if(J&&x[X]==="**"&&Z[Q]===x[X+1])q.push(x[X]),X++;else if(Z[Q]==="*"&&x[X]&&(this.options.dot||!x[X].startsWith("."))&&x[X]!=="**"){if($==="b")return!1;$="a",q.push(Z[Q]),Q++,X++}else if(x[X]==="*"&&Z[Q]&&(this.options.dot||!Z[Q].startsWith("."))&&Z[Q]!=="**"){if($==="a")return!1;$="b",q.push(x[X]),Q++,X++}else return!1;return Z.length===x.length&&q}parseNegate(){if(this.nonegate)return;let Z=this.pattern,x=!1,J=0;for(let Q=0;Q<Z.length&&Z.charAt(Q)==="!";Q++)x=!x,J++;if(J)this.pattern=Z.slice(J);this.negate=x}matchOne(Z,x,J=!1){let Q=this.options;if(this.isWindows){let D=typeof Z[0]==="string"&&/^[a-z]:$/i.test(Z[0]),_=!D&&Z[0]===""&&Z[1]===""&&Z[2]==="?"&&/^[a-z]:$/i.test(Z[3]),w=typeof x[0]==="string"&&/^[a-z]:$/i.test(x[0]),P=!w&&x[0]===""&&x[1]===""&&x[2]==="?"&&typeof x[3]==="string"&&/^[a-z]:$/i.test(x[3]),E=_?3:D?0:void 0,t=P?3:w?0:void 0;if(typeof E==="number"&&typeof t==="number"){let[K0,q0]=[Z[E],x[t]];if(K0.toLowerCase()===q0.toLowerCase()){if(x[t]=K0,t>E)x=x.slice(t);else if(E>t)Z=Z.slice(E)}}}let{optimizationLevel:X=1}=this.options;if(X>=2)Z=this.levelTwoFileOptimize(Z);this.debug("matchOne",this,{file:Z,pattern:x}),this.debug("matchOne",Z.length,x.length);for(var q=0,$=0,Y=Z.length,K=x.length;q<Y&&$<K;q++,$++){this.debug("matchOne loop");var W=x[$],G=Z[q];if(this.debug(x,W,G),W===!1)return!1;if(W===n8){this.debug("GLOBSTAR",[x,W,G]);var V=q,U=$+1;if(U===K){this.debug("** at the end");for(;q<Y;q++)if(Z[q]==="."||Z[q]===".."||!Q.dot&&Z[q].charAt(0)===".")return!1;return!0}while(V<Y){var B=Z[V];if(this.debug(`
88
88
  globstar while`,Z,V,x,U,B),this.matchOne(Z.slice(V),x.slice(U),J))return this.debug("globstar found match!",V,Y,B),!0;else{if(B==="."||B===".."||!Q.dot&&B.charAt(0)==="."){this.debug("dot detected!",Z,V,x,U);break}this.debug("globstar swallow a segment, and continue"),V++}}if(J){if(this.debug(`
89
89
  >>> no match, partial?`,Z,V,x,U),V===Y)return!0}return!1}let D;if(typeof W==="string")D=G===W,this.debug("string match",W,G,D);else D=W.test(G),this.debug("pattern match",W,G,D);if(!D)return!1}if(q===Y&&$===K)return!0;else if(q===Y)return J;else if($===K)return q===Y-1&&Z[q]==="";else throw new Error("wtf?")}braceExpand(){return WR(this.pattern,this.options)}parse(Z){yQ(Z);let x=this.options;if(Z==="**")return n8;if(Z==="")return"";let J,Q=null;if(J=Z.match(B60))Q=x.dot?F60:D60;else if(J=Z.match($60))Q=(x.nocase?x.dot?W60:z60:x.dot?K60:Y60)(J[1]);else if(J=Z.match(_60))Q=(x.nocase?x.dot?N60:L60:x.dot?C60:w60)(J);else if(J=Z.match(G60))Q=x.dot?V60:H60;else if(J=Z.match(U60))Q=M60;let X=a8.fromGlob(Z,this.options).toMMPattern();if(Q&&typeof X==="object")Reflect.defineProperty(X,"test",{value:Q});return X}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let Z=this.set;if(!Z.length)return this.regexp=!1,this.regexp;let x=this.options,J=x.noglobstar?P60:x.dot?m60:O60,Q=new Set(x.nocase?["i"]:[]),X=Z.map((Y)=>{let K=Y.map((W)=>{if(W instanceof RegExp)for(let G of W.flags.split(""))Q.add(G);return typeof W==="string"?f60(W):W===n8?n8:W._src});return K.forEach((W,G)=>{let V=K[G+1],U=K[G-1];if(W!==n8||U===n8)return;if(U===void 0)if(V!==void 0&&V!==n8)K[G+1]="(?:\\/|"+J+"\\/)?"+V;else K[G]=J;else if(V===void 0)K[G-1]=U+"(?:\\/|"+J+")?";else if(V!==n8)K[G-1]=U+"(?:\\/|\\/"+J+"\\/)"+V,K[G+1]=n8}),K.filter((W)=>W!==n8).join("/")}).join("|"),[q,$]=Z.length>1?["(?:",")"]:["",""];if(X="^"+q+X+$+"$",this.negate)X="^(?!"+X+").+$";try{this.regexp=new RegExp(X,[...Q].join(""))}catch(Y){this.regexp=!1}return this.regexp}slashSplit(Z){if(this.preserveMultipleSlashes)return Z.split("/");else if(this.isWindows&&/^\/\/[^\/]+/.test(Z))return["",...Z.split(/\/+/)];else return Z.split(/\/+/)}match(Z,x=this.partial){if(this.debug("match",Z,this.pattern),this.comment)return!1;if(this.empty)return Z==="";if(Z==="/"&&x)return!0;let J=this.options;if(this.isWindows)Z=Z.split("\\").join("/");let Q=this.slashSplit(Z);this.debug(this.pattern,"split",Q);let X=this.set;this.debug(this.pattern,"set",X);let q=Q[Q.length-1];if(!q)for(let $=Q.length-2;!q&&$>=0;$--)q=Q[$];for(let $=0;$<X.length;$++){let Y=X[$],K=Q;if(J.matchBase&&Y.length===1)K=[q];if(this.matchOne(K,Y,x)){if(J.flipNegate)return!0;return!this.negate}}if(J.flipNegate)return!1;return this.negate}static defaults(Z){return b4.defaults(Z).Minimatch}}b4.AST=a8;b4.Minimatch=z5;b4.escape=Ox;b4.unescape=h5;import{fileURLToPath as G50}from"node:url";var Ix=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date,HR=new Set,zV=typeof process==="object"&&!!process?process:{},VR=(Z,x,J,Q)=>{typeof zV.emitWarning==="function"?zV.emitWarning(Z,x,J,Q):console.error(`[${J}] ${x}: ${Z}`)},zY=globalThis.AbortController,GR=globalThis.AbortSignal;if(typeof zY==="undefined"){GR=class J{onabort;_onabort=[];reason;aborted=!1;addEventListener(Q,X){this._onabort.push(X)}},zY=class J{constructor(){x()}signal=new GR;abort(Q){if(this.signal.aborted)return;this.signal.reason=Q,this.signal.aborted=!0;for(let X of this.signal._onabort)X(Q);this.signal.onabort?.(Q)}};let Z=zV.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",x=()=>{if(!Z)return;Z=!1,VR("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",x)}}var v60=(Z)=>!HR.has(Z),Hn0=Symbol("type"),e1=(Z)=>Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),UR=(Z)=>!e1(Z)?null:Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?uQ:null;class uQ extends Array{constructor(Z){super(Z);this.fill(0)}}class Ax{heap;length;static#Z=!1;static create(Z){let x=UR(Z);if(!x)return[];Ax.#Z=!0;let J=new Ax(Z,x);return Ax.#Z=!1,J}constructor(Z,x){if(!Ax.#Z)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new x(Z),this.length=0}push(Z){this.heap[this.length++]=Z}pop(){return this.heap[--this.length]}}class gQ{#Z;#x;#q;#Q;#$;#L;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#z;#G;#Y;#K;#X;#B;#D;#V;#H;#w;#M;#j;#R;#_;#N;#C;#U;static unsafeExposeInternals(Z){return{starts:Z.#R,ttls:Z.#_,sizes:Z.#j,keyMap:Z.#Y,keyList:Z.#K,valList:Z.#X,next:Z.#B,prev:Z.#D,get head(){return Z.#V},get tail(){return Z.#H},free:Z.#w,isBackgroundFetch:(x)=>Z.#W(x),backgroundFetch:(x,J,Q,X)=>Z.#c(x,J,Q,X),moveToTail:(x)=>Z.#y(x),indexes:(x)=>Z.#m(x),rindexes:(x)=>Z.#O(x),isStale:(x)=>Z.#F(x)}}get max(){return this.#Z}get maxSize(){return this.#x}get calculatedSize(){return this.#G}get size(){return this.#z}get fetchMethod(){return this.#$}get memoMethod(){return this.#L}get dispose(){return this.#q}get disposeAfter(){return this.#Q}constructor(Z){let{max:x=0,ttl:J,ttlResolution:Q=1,ttlAutopurge:X,updateAgeOnGet:q,updateAgeOnHas:$,allowStale:Y,dispose:K,disposeAfter:W,noDisposeOnSet:G,noUpdateTTL:V,maxSize:U=0,maxEntrySize:B=0,sizeCalculation:D,fetchMethod:_,memoMethod:w,noDeleteOnFetchRejection:P,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:t,allowStaleOnFetchAbort:K0,ignoreFetchAbort:q0}=Z;if(x!==0&&!e1(x))throw new TypeError("max option must be a nonnegative integer");let B0=x?UR(x):Array;if(!B0)throw new Error("invalid max value: "+x);if(this.#Z=x,this.#x=U,this.maxEntrySize=B||this.#x,this.sizeCalculation=D,this.sizeCalculation){if(!this.#x&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!=="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!=="function")throw new TypeError("memoMethod must be a function if defined");if(this.#L=w,_!==void 0&&typeof _!=="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#$=_,this.#C=!!_,this.#Y=new Map,this.#K=new Array(x).fill(void 0),this.#X=new Array(x).fill(void 0),this.#B=new B0(x),this.#D=new B0(x),this.#V=0,this.#H=0,this.#w=Ax.create(x),this.#z=0,this.#G=0,typeof K==="function")this.#q=K;if(typeof W==="function")this.#Q=W,this.#M=[];else this.#Q=void 0,this.#M=void 0;if(this.#N=!!this.#q,this.#U=!!this.#Q,this.noDisposeOnSet=!!G,this.noUpdateTTL=!!V,this.noDeleteOnFetchRejection=!!P,this.allowStaleOnFetchRejection=!!t,this.allowStaleOnFetchAbort=!!K0,this.ignoreFetchAbort=!!q0,this.maxEntrySize!==0){if(this.#x!==0){if(!e1(this.#x))throw new TypeError("maxSize must be a positive integer if specified")}if(!e1(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#A()}if(this.allowStale=!!Y,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!q,this.updateAgeOnHas=!!$,this.ttlResolution=e1(Q)||Q===0?Q:1,this.ttlAutopurge=!!X,this.ttl=J||0,this.ttl){if(!e1(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#I()}if(this.#Z===0&&this.ttl===0&&this.#x===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#Z&&!this.#x){if(v60("LRU_CACHE_UNBOUNDED"))HR.add("LRU_CACHE_UNBOUNDED"),VR("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning","LRU_CACHE_UNBOUNDED",gQ)}}getRemainingTTL(Z){return this.#Y.has(Z)?1/0:0}#I(){let Z=new uQ(this.#Z),x=new uQ(this.#Z);this.#_=Z,this.#R=x,this.#T=(X,q,$=Ix.now())=>{if(x[X]=q!==0?$:0,Z[X]=q,q!==0&&this.ttlAutopurge){let Y=setTimeout(()=>{if(this.#F(X))this.#S(this.#K[X],"expire")},q+1);if(Y.unref)Y.unref()}},this.#P=(X)=>{x[X]=Z[X]!==0?Ix.now():0},this.#J=(X,q)=>{if(Z[q]){let $=Z[q],Y=x[q];if(!$||!Y)return;X.ttl=$,X.start=Y,X.now=J||Q();let K=X.now-Y;X.remainingTTL=$-K}};let J=0,Q=()=>{let X=Ix.now();if(this.ttlResolution>0){J=X;let q=setTimeout(()=>J=0,this.ttlResolution);if(q.unref)q.unref()}return X};this.getRemainingTTL=(X)=>{let q=this.#Y.get(X);if(q===void 0)return 0;let $=Z[q],Y=x[q];if(!$||!Y)return 1/0;let K=(J||Q())-Y;return $-K},this.#F=(X)=>{let q=x[X],$=Z[X];return!!$&&!!q&&(J||Q())-q>$}}#P=()=>{};#J=()=>{};#T=()=>{};#F=()=>!1;#A(){let Z=new uQ(this.#Z);this.#G=0,this.#j=Z,this.#f=(x)=>{this.#G-=Z[x],Z[x]=0},this.#E=(x,J,Q,X)=>{if(this.#W(J))return 0;if(!e1(Q))if(X){if(typeof X!=="function")throw new TypeError("sizeCalculation must be a function");if(Q=X(J,x),!e1(Q))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return Q},this.#v=(x,J,Q)=>{if(Z[x]=J,this.#x){let X=this.#x-Z[x];while(this.#G>X)this.#b(!0)}if(this.#G+=Z[x],Q)Q.entrySize=J,Q.totalCalculatedSize=this.#G}}#f=(Z)=>{};#v=(Z,x,J)=>{};#E=(Z,x,J,Q)=>{if(J||Q)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#m({allowStale:Z=this.allowStale}={}){if(this.#z)for(let x=this.#H;;){if(!this.#k(x))break;if(Z||!this.#F(x))yield x;if(x===this.#V)break;else x=this.#D[x]}}*#O({allowStale:Z=this.allowStale}={}){if(this.#z)for(let x=this.#V;;){if(!this.#k(x))break;if(Z||!this.#F(x))yield x;if(x===this.#H)break;else x=this.#B[x]}}#k(Z){return Z!==void 0&&this.#Y.get(this.#K[Z])===Z}*entries(){for(let Z of this.#m())if(this.#X[Z]!==void 0&&this.#K[Z]!==void 0&&!this.#W(this.#X[Z]))yield[this.#K[Z],this.#X[Z]]}*rentries(){for(let Z of this.#O())if(this.#X[Z]!==void 0&&this.#K[Z]!==void 0&&!this.#W(this.#X[Z]))yield[this.#K[Z],this.#X[Z]]}*keys(){for(let Z of this.#m()){let x=this.#K[Z];if(x!==void 0&&!this.#W(this.#X[Z]))yield x}}*rkeys(){for(let Z of this.#O()){let x=this.#K[Z];if(x!==void 0&&!this.#W(this.#X[Z]))yield x}}*values(){for(let Z of this.#m())if(this.#X[Z]!==void 0&&!this.#W(this.#X[Z]))yield this.#X[Z]}*rvalues(){for(let Z of this.#O())if(this.#X[Z]!==void 0&&!this.#W(this.#X[Z]))yield this.#X[Z]}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(Z,x={}){for(let J of this.#m()){let Q=this.#X[J],X=this.#W(Q)?Q.__staleWhileFetching:Q;if(X===void 0)continue;if(Z(X,this.#K[J],this))return this.get(this.#K[J],x)}}forEach(Z,x=this){for(let J of this.#m()){let Q=this.#X[J],X=this.#W(Q)?Q.__staleWhileFetching:Q;if(X===void 0)continue;Z.call(x,X,this.#K[J],this)}}rforEach(Z,x=this){for(let J of this.#O()){let Q=this.#X[J],X=this.#W(Q)?Q.__staleWhileFetching:Q;if(X===void 0)continue;Z.call(x,X,this.#K[J],this)}}purgeStale(){let Z=!1;for(let x of this.#O({allowStale:!0}))if(this.#F(x))this.#S(this.#K[x],"expire"),Z=!0;return Z}info(Z){let x=this.#Y.get(Z);if(x===void 0)return;let J=this.#X[x],Q=this.#W(J)?J.__staleWhileFetching:J;if(Q===void 0)return;let X={value:Q};if(this.#_&&this.#R){let q=this.#_[x],$=this.#R[x];if(q&&$){let Y=q-(Ix.now()-$);X.ttl=Y,X.start=Date.now()}}if(this.#j)X.size=this.#j[x];return X}dump(){let Z=[];for(let x of this.#m({allowStale:!0})){let J=this.#K[x],Q=this.#X[x],X=this.#W(Q)?Q.__staleWhileFetching:Q;if(X===void 0||J===void 0)continue;let q={value:X};if(this.#_&&this.#R){q.ttl=this.#_[x];let $=Ix.now()-this.#R[x];q.start=Math.floor(Date.now()-$)}if(this.#j)q.size=this.#j[x];Z.unshift([J,q])}return Z}load(Z){this.clear();for(let[x,J]of Z){if(J.start){let Q=Date.now()-J.start;J.start=Ix.now()-Q}this.set(x,J.value,J)}}set(Z,x,J={}){if(x===void 0)return this.delete(Z),this;let{ttl:Q=this.ttl,start:X,noDisposeOnSet:q=this.noDisposeOnSet,sizeCalculation:$=this.sizeCalculation,status:Y}=J,{noUpdateTTL:K=this.noUpdateTTL}=J,W=this.#E(Z,x,J.size||0,$);if(this.maxEntrySize&&W>this.maxEntrySize){if(Y)Y.set="miss",Y.maxEntrySizeExceeded=!0;return this.#S(Z,"set"),this}let G=this.#z===0?void 0:this.#Y.get(Z);if(G===void 0){if(G=this.#z===0?this.#H:this.#w.length!==0?this.#w.pop():this.#z===this.#Z?this.#b(!1):this.#z,this.#K[G]=Z,this.#X[G]=x,this.#Y.set(Z,G),this.#B[this.#H]=G,this.#D[G]=this.#H,this.#H=G,this.#z++,this.#v(G,W,Y),Y)Y.set="add";K=!1}else{this.#y(G);let V=this.#X[G];if(x!==V){if(this.#C&&this.#W(V)){V.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:U}=V;if(U!==void 0&&!q){if(this.#N)this.#q?.(U,Z,"set");if(this.#U)this.#M?.push([U,Z,"set"])}}else if(!q){if(this.#N)this.#q?.(V,Z,"set");if(this.#U)this.#M?.push([V,Z,"set"])}if(this.#f(G),this.#v(G,W,Y),this.#X[G]=x,Y){Y.set="replace";let U=V&&this.#W(V)?V.__staleWhileFetching:V;if(U!==void 0)Y.oldValue=U}}else if(Y)Y.set="update"}if(Q!==0&&!this.#_)this.#I();if(this.#_){if(!K)this.#T(G,Q,X);if(Y)this.#J(Y,G)}if(!q&&this.#U&&this.#M){let V=this.#M,U;while(U=V?.shift())this.#Q?.(...U)}return this}pop(){try{while(this.#z){let Z=this.#X[this.#V];if(this.#b(!0),this.#W(Z)){if(Z.__staleWhileFetching)return Z.__staleWhileFetching}else if(Z!==void 0)return Z}}finally{if(this.#U&&this.#M){let Z=this.#M,x;while(x=Z?.shift())this.#Q?.(...x)}}}#b(Z){let x=this.#V,J=this.#K[x],Q=this.#X[x];if(this.#C&&this.#W(Q))Q.__abortController.abort(new Error("evicted"));else if(this.#N||this.#U){if(this.#N)this.#q?.(Q,J,"evict");if(this.#U)this.#M?.push([Q,J,"evict"])}if(this.#f(x),Z)this.#K[x]=void 0,this.#X[x]=void 0,this.#w.push(x);if(this.#z===1)this.#V=this.#H=0,this.#w.length=0;else this.#V=this.#B[x];return this.#Y.delete(J),this.#z--,x}has(Z,x={}){let{updateAgeOnHas:J=this.updateAgeOnHas,status:Q}=x,X=this.#Y.get(Z);if(X!==void 0){let q=this.#X[X];if(this.#W(q)&&q.__staleWhileFetching===void 0)return!1;if(!this.#F(X)){if(J)this.#P(X);if(Q)Q.has="hit",this.#J(Q,X);return!0}else if(Q)Q.has="stale",this.#J(Q,X)}else if(Q)Q.has="miss";return!1}peek(Z,x={}){let{allowStale:J=this.allowStale}=x,Q=this.#Y.get(Z);if(Q===void 0||!J&&this.#F(Q))return;let X=this.#X[Q];return this.#W(X)?X.__staleWhileFetching:X}#c(Z,x,J,Q){let X=x===void 0?void 0:this.#X[x];if(this.#W(X))return X;let q=new zY,{signal:$}=J;$?.addEventListener("abort",()=>q.abort($.reason),{signal:q.signal});let Y={signal:q.signal,options:J,context:Q},K=(D,_=!1)=>{let{aborted:w}=q.signal,P=J.ignoreFetchAbort&&D!==void 0;if(J.status)if(w&&!_){if(J.status.fetchAborted=!0,J.status.fetchError=q.signal.reason,P)J.status.fetchAbortIgnored=!0}else J.status.fetchResolved=!0;if(w&&!P&&!_)return G(q.signal.reason);let E=U;if(this.#X[x]===U)if(D===void 0)if(E.__staleWhileFetching)this.#X[x]=E.__staleWhileFetching;else this.#S(Z,"fetch");else{if(J.status)J.status.fetchUpdated=!0;this.set(Z,D,Y.options)}return D},W=(D)=>{if(J.status)J.status.fetchRejected=!0,J.status.fetchError=D;return G(D)},G=(D)=>{let{aborted:_}=q.signal,w=_&&J.allowStaleOnFetchAbort,P=w||J.allowStaleOnFetchRejection,E=P||J.noDeleteOnFetchRejection,t=U;if(this.#X[x]===U){if(!E||t.__staleWhileFetching===void 0)this.#S(Z,"fetch");else if(!w)this.#X[x]=t.__staleWhileFetching}if(P){if(J.status&&t.__staleWhileFetching!==void 0)J.status.returnedStale=!0;return t.__staleWhileFetching}else if(t.__returned===t)throw D},V=(D,_)=>{let w=this.#$?.(Z,X,Y);if(w&&w instanceof Promise)w.then((P)=>D(P===void 0?void 0:P),_);q.signal.addEventListener("abort",()=>{if(!J.ignoreFetchAbort||J.allowStaleOnFetchAbort){if(D(void 0),J.allowStaleOnFetchAbort)D=(P)=>K(P,!0)}})};if(J.status)J.status.fetchDispatched=!0;let U=new Promise(V).then(K,W),B=Object.assign(U,{__abortController:q,__staleWhileFetching:X,__returned:void 0});if(x===void 0)this.set(Z,B,{...Y.options,status:void 0}),x=this.#Y.get(Z);else this.#X[x]=B;return B}#W(Z){if(!this.#C)return!1;let x=Z;return!!x&&x instanceof Promise&&x.hasOwnProperty("__staleWhileFetching")&&x.__abortController instanceof zY}async fetch(Z,x={}){let{allowStale:J=this.allowStale,updateAgeOnGet:Q=this.updateAgeOnGet,noDeleteOnStaleGet:X=this.noDeleteOnStaleGet,ttl:q=this.ttl,noDisposeOnSet:$=this.noDisposeOnSet,size:Y=0,sizeCalculation:K=this.sizeCalculation,noUpdateTTL:W=this.noUpdateTTL,noDeleteOnFetchRejection:G=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:V=this.allowStaleOnFetchRejection,ignoreFetchAbort:U=this.ignoreFetchAbort,allowStaleOnFetchAbort:B=this.allowStaleOnFetchAbort,context:D,forceRefresh:_=!1,status:w,signal:P}=x;if(!this.#C){if(w)w.fetch="get";return this.get(Z,{allowStale:J,updateAgeOnGet:Q,noDeleteOnStaleGet:X,status:w})}let E={allowStale:J,updateAgeOnGet:Q,noDeleteOnStaleGet:X,ttl:q,noDisposeOnSet:$,size:Y,sizeCalculation:K,noUpdateTTL:W,noDeleteOnFetchRejection:G,allowStaleOnFetchRejection:V,allowStaleOnFetchAbort:B,ignoreFetchAbort:U,status:w,signal:P},t=this.#Y.get(Z);if(t===void 0){if(w)w.fetch="miss";let K0=this.#c(Z,t,E,D);return K0.__returned=K0}else{let K0=this.#X[t];if(this.#W(K0)){let k=J&&K0.__staleWhileFetching!==void 0;if(w){if(w.fetch="inflight",k)w.returnedStale=!0}return k?K0.__staleWhileFetching:K0.__returned=K0}let q0=this.#F(t);if(!_&&!q0){if(w)w.fetch="hit";if(this.#y(t),Q)this.#P(t);if(w)this.#J(w,t);return K0}let B0=this.#c(Z,t,E,D),S=B0.__staleWhileFetching!==void 0&&J;if(w){if(w.fetch=q0?"stale":"refresh",S&&q0)w.returnedStale=!0}return S?B0.__staleWhileFetching:B0.__returned=B0}}async forceFetch(Z,x={}){let J=await this.fetch(Z,x);if(J===void 0)throw new Error("fetch() returned undefined");return J}memo(Z,x={}){let J=this.#L;if(!J)throw new Error("no memoMethod provided to constructor");let{context:Q,forceRefresh:X,...q}=x,$=this.get(Z,q);if(!X&&$!==void 0)return $;let Y=J(Z,$,{options:q,context:Q});return this.set(Z,Y,q),Y}get(Z,x={}){let{allowStale:J=this.allowStale,updateAgeOnGet:Q=this.updateAgeOnGet,noDeleteOnStaleGet:X=this.noDeleteOnStaleGet,status:q}=x,$=this.#Y.get(Z);if($!==void 0){let Y=this.#X[$],K=this.#W(Y);if(q)this.#J(q,$);if(this.#F($)){if(q)q.get="stale";if(!K){if(!X)this.#S(Z,"expire");if(q&&J)q.returnedStale=!0;return J?Y:void 0}else{if(q&&J&&Y.__staleWhileFetching!==void 0)q.returnedStale=!0;return J?Y.__staleWhileFetching:void 0}}else{if(q)q.get="hit";if(K)return Y.__staleWhileFetching;if(this.#y($),Q)this.#P($);return Y}}else if(q)q.get="miss"}#p(Z,x){this.#D[x]=Z,this.#B[Z]=x}#y(Z){if(Z!==this.#H){if(Z===this.#V)this.#V=this.#B[Z];else this.#p(this.#D[Z],this.#B[Z]);this.#p(this.#H,Z),this.#H=Z}}delete(Z){return this.#S(Z,"delete")}#S(Z,x){let J=!1;if(this.#z!==0){let Q=this.#Y.get(Z);if(Q!==void 0)if(J=!0,this.#z===1)this.#h(x);else{this.#f(Q);let X=this.#X[Q];if(this.#W(X))X.__abortController.abort(new Error("deleted"));else if(this.#N||this.#U){if(this.#N)this.#q?.(X,Z,x);if(this.#U)this.#M?.push([X,Z,x])}if(this.#Y.delete(Z),this.#K[Q]=void 0,this.#X[Q]=void 0,Q===this.#H)this.#H=this.#D[Q];else if(Q===this.#V)this.#V=this.#B[Q];else{let q=this.#D[Q];this.#B[q]=this.#B[Q];let $=this.#B[Q];this.#D[$]=this.#D[Q]}this.#z--,this.#w.push(Q)}}if(this.#U&&this.#M?.length){let Q=this.#M,X;while(X=Q?.shift())this.#Q?.(...X)}return J}clear(){return this.#h("delete")}#h(Z){for(let x of this.#O({allowStale:!0})){let J=this.#X[x];if(this.#W(J))J.__abortController.abort(new Error("deleted"));else{let Q=this.#K[x];if(this.#N)this.#q?.(J,Q,Z);if(this.#U)this.#M?.push([J,Q,Z])}}if(this.#Y.clear(),this.#X.fill(void 0),this.#K.fill(void 0),this.#_&&this.#R)this.#_.fill(0),this.#R.fill(0);if(this.#j)this.#j.fill(0);if(this.#V=0,this.#H=0,this.#w.length=0,this.#G=0,this.#z=0,this.#U&&this.#M){let x=this.#M,J;while(J=x?.shift())this.#Q?.(...J)}}}import{posix as l60,win32 as _V}from"node:path";import{fileURLToPath as i60}from"node:url";import{lstatSync as o60,readdir as s60,readdirSync as a60,readlinkSync as n60,realpathSync as r60}from"fs";import*as t60 from"node:fs";import{lstat as Z50,readdir as x50,readlink as J50,realpath as Q50}from"node:fs/promises";import{EventEmitter as MV}from"node:events";import _R from"node:stream";import{StringDecoder as E60}from"node:string_decoder";var MR=typeof process==="object"&&process?process:{stdout:null,stderr:null},k60=(Z)=>!!Z&&typeof Z==="object"&&(Z instanceof t9||Z instanceof _R||b60(Z)||c60(Z)),b60=(Z)=>!!Z&&typeof Z==="object"&&Z instanceof MV&&typeof Z.pipe==="function"&&Z.pipe!==_R.Writable.prototype.pipe,c60=(Z)=>!!Z&&typeof Z==="object"&&Z instanceof MV&&typeof Z.write==="function"&&typeof Z.end==="function",U1=Symbol("EOF"),M1=Symbol("maybeEmitEnd"),Z9=Symbol("emittedEnd"),WY=Symbol("emittingEnd"),dQ=Symbol("emittedError"),GY=Symbol("closed"),BR=Symbol("read"),HY=Symbol("flush"),DR=Symbol("flushChunk"),u5=Symbol("encoding"),Sx=Symbol("decoder"),k8=Symbol("flowing"),lQ=Symbol("paused"),Tx=Symbol("resume"),b8=Symbol("buffer"),c4=Symbol("pipes"),c8=Symbol("bufferLength"),WV=Symbol("bufferPush"),VY=Symbol("bufferShift"),_4=Symbol("objectMode"),X8=Symbol("destroyed"),GV=Symbol("error"),HV=Symbol("emitData"),FR=Symbol("emitEnd"),VV=Symbol("emitEnd2"),L7=Symbol("async"),UV=Symbol("abort"),UY=Symbol("aborted"),iQ=Symbol("signal"),r9=Symbol("dataListeners"),O6=Symbol("discarded"),oQ=(Z)=>Promise.resolve().then(Z),p60=(Z)=>Z(),y60=(Z)=>Z==="end"||Z==="finish"||Z==="prefinish",h60=(Z)=>Z instanceof ArrayBuffer||!!Z&&typeof Z==="object"&&Z.constructor&&Z.constructor.name==="ArrayBuffer"&&Z.byteLength>=0,u60=(Z)=>!Buffer.isBuffer(Z)&&ArrayBuffer.isView(Z);class BV{src;dest;opts;ondrain;constructor(Z,x,J){this.src=Z,this.dest=x,this.opts=J,this.ondrain=()=>Z[Tx](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(Z){}end(){if(this.unpipe(),this.opts.end)this.dest.end()}}class LR extends BV{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(Z,x,J){super(Z,x,J);this.proxyErrors=(Q)=>x.emit("error",Q),Z.on("error",this.proxyErrors)}}var g60=(Z)=>!!Z.objectMode,d60=(Z)=>!Z.objectMode&&!!Z.encoding&&Z.encoding!=="buffer";class t9 extends MV{[k8]=!1;[lQ]=!1;[c4]=[];[b8]=[];[_4];[u5];[L7];[Sx];[U1]=!1;[Z9]=!1;[WY]=!1;[GY]=!1;[dQ]=null;[c8]=0;[X8]=!1;[iQ];[UY]=!1;[r9]=0;[O6]=!1;writable=!0;readable=!0;constructor(...Z){let x=Z[0]||{};super();if(x.objectMode&&typeof x.encoding==="string")throw new TypeError("Encoding and objectMode may not be used together");if(g60(x))this[_4]=!0,this[u5]=null;else if(d60(x))this[u5]=x.encoding,this[_4]=!1;else this[_4]=!1,this[u5]=null;if(this[L7]=!!x.async,this[Sx]=this[u5]?new E60(this[u5]):null,x&&x.debugExposeBuffer===!0)Object.defineProperty(this,"buffer",{get:()=>this[b8]});if(x&&x.debugExposePipes===!0)Object.defineProperty(this,"pipes",{get:()=>this[c4]});let{signal:J}=x;if(J)if(this[iQ]=J,J.aborted)this[UV]();else J.addEventListener("abort",()=>this[UV]())}get bufferLength(){return this[c8]}get encoding(){return this[u5]}set encoding(Z){throw new Error("Encoding must be set at instantiation time")}setEncoding(Z){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[_4]}set objectMode(Z){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[L7]}set["async"](Z){this[L7]=this[L7]||!!Z}[UV](){this[UY]=!0,this.emit("abort",this[iQ]?.reason),this.destroy(this[iQ]?.reason)}get aborted(){return this[UY]}set aborted(Z){}write(Z,x,J){if(this[UY])return!1;if(this[U1])throw new Error("write after end");if(this[X8])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;if(typeof x==="function")J=x,x="utf8";if(!x)x="utf8";let Q=this[L7]?oQ:p60;if(!this[_4]&&!Buffer.isBuffer(Z)){if(u60(Z))Z=Buffer.from(Z.buffer,Z.byteOffset,Z.byteLength);else if(h60(Z))Z=Buffer.from(Z);else if(typeof Z!=="string")throw new Error("Non-contiguous data written to non-objectMode stream")}if(this[_4]){if(this[k8]&&this[c8]!==0)this[HY](!0);if(this[k8])this.emit("data",Z);else this[WV](Z);if(this[c8]!==0)this.emit("readable");if(J)Q(J);return this[k8]}if(!Z.length){if(this[c8]!==0)this.emit("readable");if(J)Q(J);return this[k8]}if(typeof Z==="string"&&!(x===this[u5]&&!this[Sx]?.lastNeed))Z=Buffer.from(Z,x);if(Buffer.isBuffer(Z)&&this[u5])Z=this[Sx].write(Z);if(this[k8]&&this[c8]!==0)this[HY](!0);if(this[k8])this.emit("data",Z);else this[WV](Z);if(this[c8]!==0)this.emit("readable");if(J)Q(J);return this[k8]}read(Z){if(this[X8])return null;if(this[O6]=!1,this[c8]===0||Z===0||Z&&Z>this[c8])return this[M1](),null;if(this[_4])Z=null;if(this[b8].length>1&&!this[_4])this[b8]=[this[u5]?this[b8].join(""):Buffer.concat(this[b8],this[c8])];let x=this[BR](Z||null,this[b8][0]);return this[M1](),x}[BR](Z,x){if(this[_4])this[VY]();else{let J=x;if(Z===J.length||Z===null)this[VY]();else if(typeof J==="string")this[b8][0]=J.slice(Z),x=J.slice(0,Z),this[c8]-=Z;else this[b8][0]=J.subarray(Z),x=J.subarray(0,Z),this[c8]-=Z}if(this.emit("data",x),!this[b8].length&&!this[U1])this.emit("drain");return x}end(Z,x,J){if(typeof Z==="function")J=Z,Z=void 0;if(typeof x==="function")J=x,x="utf8";if(Z!==void 0)this.write(Z,x);if(J)this.once("end",J);if(this[U1]=!0,this.writable=!1,this[k8]||!this[lQ])this[M1]();return this}[Tx](){if(this[X8])return;if(!this[r9]&&!this[c4].length)this[O6]=!0;if(this[lQ]=!1,this[k8]=!0,this.emit("resume"),this[b8].length)this[HY]();else if(this[U1])this[M1]();else this.emit("drain")}resume(){return this[Tx]()}pause(){this[k8]=!1,this[lQ]=!0,this[O6]=!1}get destroyed(){return this[X8]}get flowing(){return this[k8]}get paused(){return this[lQ]}[WV](Z){if(this[_4])this[c8]+=1;else this[c8]+=Z.length;this[b8].push(Z)}[VY](){if(this[_4])this[c8]-=1;else this[c8]-=this[b8][0].length;return this[b8].shift()}[HY](Z=!1){do;while(this[DR](this[VY]())&&this[b8].length);if(!Z&&!this[b8].length&&!this[U1])this.emit("drain")}[DR](Z){return this.emit("data",Z),this[k8]}pipe(Z,x){if(this[X8])return Z;this[O6]=!1;let J=this[Z9];if(x=x||{},Z===MR.stdout||Z===MR.stderr)x.end=!1;else x.end=x.end!==!1;if(x.proxyErrors=!!x.proxyErrors,J){if(x.end)Z.end()}else if(this[c4].push(!x.proxyErrors?new BV(this,Z,x):new LR(this,Z,x)),this[L7])oQ(()=>this[Tx]());else this[Tx]();return Z}unpipe(Z){let x=this[c4].find((J)=>J.dest===Z);if(x){if(this[c4].length===1){if(this[k8]&&this[r9]===0)this[k8]=!1;this[c4]=[]}else this[c4].splice(this[c4].indexOf(x),1);x.unpipe()}}addListener(Z,x){return this.on(Z,x)}on(Z,x){let J=super.on(Z,x);if(Z==="data"){if(this[O6]=!1,this[r9]++,!this[c4].length&&!this[k8])this[Tx]()}else if(Z==="readable"&&this[c8]!==0)super.emit("readable");else if(y60(Z)&&this[Z9])super.emit(Z),this.removeAllListeners(Z);else if(Z==="error"&&this[dQ]){let Q=x;if(this[L7])oQ(()=>Q.call(this,this[dQ]));else Q.call(this,this[dQ])}return J}removeListener(Z,x){return this.off(Z,x)}off(Z,x){let J=super.off(Z,x);if(Z==="data"){if(this[r9]=this.listeners("data").length,this[r9]===0&&!this[O6]&&!this[c4].length)this[k8]=!1}return J}removeAllListeners(Z){let x=super.removeAllListeners(Z);if(Z==="data"||Z===void 0){if(this[r9]=0,!this[O6]&&!this[c4].length)this[k8]=!1}return x}get emittedEnd(){return this[Z9]}[M1](){if(!this[WY]&&!this[Z9]&&!this[X8]&&this[b8].length===0&&this[U1]){if(this[WY]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[GY])this.emit("close");this[WY]=!1}}emit(Z,...x){let J=x[0];if(Z!=="error"&&Z!=="close"&&Z!==X8&&this[X8])return!1;else if(Z==="data")return!this[_4]&&!J?!1:this[L7]?(oQ(()=>this[HV](J)),!0):this[HV](J);else if(Z==="end")return this[FR]();else if(Z==="close"){if(this[GY]=!0,!this[Z9]&&!this[X8])return!1;let X=super.emit("close");return this.removeAllListeners("close"),X}else if(Z==="error"){this[dQ]=J,super.emit(GV,J);let X=!this[iQ]||this.listeners("error").length?super.emit("error",J):!1;return this[M1](),X}else if(Z==="resume"){let X=super.emit("resume");return this[M1](),X}else if(Z==="finish"||Z==="prefinish"){let X=super.emit(Z);return this.removeAllListeners(Z),X}let Q=super.emit(Z,...x);return this[M1](),Q}[HV](Z){for(let J of this[c4])if(J.dest.write(Z)===!1)this.pause();let x=this[O6]?!1:super.emit("data",Z);return this[M1](),x}[FR](){if(this[Z9])return!1;return this[Z9]=!0,this.readable=!1,this[L7]?(oQ(()=>this[VV]()),!0):this[VV]()}[VV](){if(this[Sx]){let x=this[Sx].end();if(x){for(let J of this[c4])J.dest.write(x);if(!this[O6])super.emit("data",x)}}for(let x of this[c4])x.end();let Z=super.emit("end");return this.removeAllListeners("end"),Z}async collect(){let Z=Object.assign([],{dataLength:0});if(!this[_4])Z.dataLength=0;let x=this.promise();return this.on("data",(J)=>{if(Z.push(J),!this[_4])Z.dataLength+=J.length}),await x,Z}async concat(){if(this[_4])throw new Error("cannot concat in objectMode");let Z=await this.collect();return this[u5]?Z.join(""):Buffer.concat(Z,Z.dataLength)}async promise(){return new Promise((Z,x)=>{this.on(X8,()=>x(new Error("stream destroyed"))),this.on("error",(J)=>x(J)),this.on("end",()=>Z())})}[Symbol.asyncIterator](){this[O6]=!1;let Z=!1,x=async()=>{return this.pause(),Z=!0,{value:void 0,done:!0}};return{next:()=>{if(Z)return x();let Q=this.read();if(Q!==null)return Promise.resolve({done:!1,value:Q});if(this[U1])return x();let X,q,$=(G)=>{this.off("data",Y),this.off("end",K),this.off(X8,W),x(),q(G)},Y=(G)=>{this.off("error",$),this.off("end",K),this.off(X8,W),this.pause(),X({value:G,done:!!this[U1]})},K=()=>{this.off("error",$),this.off("data",Y),this.off(X8,W),x(),X({done:!0,value:void 0})},W=()=>$(new Error("stream destroyed"));return new Promise((G,V)=>{q=V,X=G,this.once(X8,W),this.once("error",$),this.once("end",K),this.once("data",Y)})},throw:x,return:x,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[O6]=!1;let Z=!1,x=()=>{return this.pause(),this.off(GV,x),this.off(X8,x),this.off("end",x),Z=!0,{done:!0,value:void 0}},J=()=>{if(Z)return x();let Q=this.read();return Q===null?x():{done:!1,value:Q}};return this.once("end",x),this.once(GV,x),this.once(X8,x),{next:J,throw:x,return:x,[Symbol.iterator](){return this}}}destroy(Z){if(this[X8]){if(Z)this.emit("error",Z);else this.emit(X8);return this}this[X8]=!0,this[O6]=!0,this[b8].length=0,this[c8]=0;let x=this;if(typeof x.close==="function"&&!this[GY])x.close();if(Z)this.emit("error",Z);else this.emit(X8);return this}static get isStream(){return k60}}var e60=r60.native,aQ={lstatSync:o60,readdir:s60,readdirSync:a60,readlinkSync:n60,realpathSync:e60,promises:{lstat:Z50,readdir:x50,readlink:J50,realpath:Q50}},RR=(Z)=>!Z||Z===aQ||Z===t60?aQ:{...aQ,...Z,promises:{...aQ.promises,...Z.promises||{}}},PR=/^\\\\\?\\([a-z]:)\\?$/i,X50=(Z)=>Z.replace(/\//g,"\\").replace(PR,"$1\\"),q50=/[\\\/]/,G5=0,mR=1,OR=2,N7=4,IR=6,AR=8,e9=10,SR=12,W5=15,sQ=~W5,DV=16,NR=32,nQ=64,g5=128,MY=256,DY=512,CR=nQ|g5|DY,$50=1023,FV=(Z)=>Z.isFile()?AR:Z.isDirectory()?N7:Z.isSymbolicLink()?e9:Z.isCharacterDevice()?OR:Z.isBlockDevice()?IR:Z.isSocket()?SR:Z.isFIFO()?mR:G5,wR=new Map,rQ=(Z)=>{let x=wR.get(Z);if(x)return x;let J=Z.normalize("NFKD");return wR.set(Z,J),J},jR=new Map,BY=(Z)=>{let x=jR.get(Z);if(x)return x;let J=rQ(Z.toLowerCase());return jR.set(Z,J),J};class LV extends gQ{constructor(){super({max:256})}}class TR extends gQ{constructor(Z=16384){super({maxSize:Z,sizeCalculation:(x)=>x.length+1})}}var fR=Symbol("PathScurry setAsCwd");class p4{name;root;roots;parent;nocase;isCWD=!1;#Z;#x;get dev(){return this.#x}#q;get mode(){return this.#q}#Q;get nlink(){return this.#Q}#$;get uid(){return this.#$}#L;get gid(){return this.#L}#z;get rdev(){return this.#z}#G;get blksize(){return this.#G}#Y;get ino(){return this.#Y}#K;get size(){return this.#K}#X;get blocks(){return this.#X}#B;get atimeMs(){return this.#B}#D;get mtimeMs(){return this.#D}#V;get ctimeMs(){return this.#V}#H;get birthtimeMs(){return this.#H}#w;get atime(){return this.#w}#M;get mtime(){return this.#M}#j;get ctime(){return this.#j}#R;get birthtime(){return this.#R}#_;#N;#C;#U;#I;#P;#J;#T;#F;#A;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(Z,x=G5,J,Q,X,q,$){if(this.name=Z,this.#_=X?BY(Z):rQ(Z),this.#J=x&$50,this.nocase=X,this.roots=Q,this.root=J||this,this.#T=q,this.#C=$.fullpath,this.#I=$.relative,this.#P=$.relativePosix,this.parent=$.parent,this.parent)this.#Z=this.parent.#Z;else this.#Z=RR($.fs)}depth(){if(this.#N!==void 0)return this.#N;if(!this.parent)return this.#N=0;return this.#N=this.parent.depth()+1}childrenCache(){return this.#T}resolve(Z){if(!Z)return this;let x=this.getRootString(Z),Q=Z.substring(x.length).split(this.splitSep);return x?this.getRoot(x).#f(Q):this.#f(Q)}#f(Z){let x=this;for(let J of Z)x=x.child(J);return x}children(){let Z=this.#T.get(this);if(Z)return Z;let x=Object.assign([],{provisional:0});return this.#T.set(this,x),this.#J&=~DV,x}child(Z,x){if(Z===""||Z===".")return this;if(Z==="..")return this.parent||this;let J=this.children(),Q=this.nocase?BY(Z):rQ(Z);for(let Y of J)if(Y.#_===Q)return Y;let X=this.parent?this.sep:"",q=this.#C?this.#C+X+Z:void 0,$=this.newChild(Z,G5,{...x,parent:this,fullpath:q});if(!this.canReaddir())$.#J|=g5;return J.push($),$}relative(){if(this.isCWD)return"";if(this.#I!==void 0)return this.#I;let Z=this.name,x=this.parent;if(!x)return this.#I=this.name;let J=x.relative();return J+(!J||!x.parent?"":this.sep)+Z}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#P!==void 0)return this.#P;let Z=this.name,x=this.parent;if(!x)return this.#P=this.fullpathPosix();let J=x.relativePosix();return J+(!J||!x.parent?"":"/")+Z}fullpath(){if(this.#C!==void 0)return this.#C;let Z=this.name,x=this.parent;if(!x)return this.#C=this.name;let Q=x.fullpath()+(!x.parent?"":this.sep)+Z;return this.#C=Q}fullpathPosix(){if(this.#U!==void 0)return this.#U;if(this.sep==="/")return this.#U=this.fullpath();if(!this.parent){let Q=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(Q))return this.#U=`//?/${Q}`;else return this.#U=Q}let Z=this.parent,x=Z.fullpathPosix(),J=x+(!x||!Z.parent?"":"/")+this.name;return this.#U=J}isUnknown(){return(this.#J&W5)===G5}isType(Z){return this[`is${Z}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#J&W5)===AR}isDirectory(){return(this.#J&W5)===N7}isCharacterDevice(){return(this.#J&W5)===OR}isBlockDevice(){return(this.#J&W5)===IR}isFIFO(){return(this.#J&W5)===mR}isSocket(){return(this.#J&W5)===SR}isSymbolicLink(){return(this.#J&e9)===e9}lstatCached(){return this.#J&NR?this:void 0}readlinkCached(){return this.#F}realpathCached(){return this.#A}readdirCached(){let Z=this.children();return Z.slice(0,Z.provisional)}canReadlink(){if(this.#F)return!0;if(!this.parent)return!1;let Z=this.#J&W5;return!(Z!==G5&&Z!==e9||this.#J&MY||this.#J&g5)}calledReaddir(){return!!(this.#J&DV)}isENOENT(){return!!(this.#J&g5)}isNamed(Z){return!this.nocase?this.#_===rQ(Z):this.#_===BY(Z)}async readlink(){let Z=this.#F;if(Z)return Z;if(!this.canReadlink())return;if(!this.parent)return;try{let x=await this.#Z.promises.readlink(this.fullpath()),J=(await this.parent.realpath())?.resolve(x);if(J)return this.#F=J}catch(x){this.#W(x.code);return}}readlinkSync(){let Z=this.#F;if(Z)return Z;if(!this.canReadlink())return;if(!this.parent)return;try{let x=this.#Z.readlinkSync(this.fullpath()),J=this.parent.realpathSync()?.resolve(x);if(J)return this.#F=J}catch(x){this.#W(x.code);return}}#v(Z){this.#J|=DV;for(let x=Z.provisional;x<Z.length;x++){let J=Z[x];if(J)J.#E()}}#E(){if(this.#J&g5)return;this.#J=(this.#J|g5)&sQ,this.#m()}#m(){let Z=this.children();Z.provisional=0;for(let x of Z)x.#E()}#O(){this.#J|=DY,this.#k()}#k(){if(this.#J&nQ)return;let Z=this.#J;if((Z&W5)===N7)Z&=sQ;this.#J=Z|nQ,this.#m()}#b(Z=""){if(Z==="ENOTDIR"||Z==="EPERM")this.#k();else if(Z==="ENOENT")this.#E();else this.children().provisional=0}#c(Z=""){if(Z==="ENOTDIR")this.parent.#k();else if(Z==="ENOENT")this.#E()}#W(Z=""){let x=this.#J;if(x|=MY,Z==="ENOENT")x|=g5;if(Z==="EINVAL"||Z==="UNKNOWN")x&=sQ;if(this.#J=x,Z==="ENOTDIR"&&this.parent)this.parent.#k()}#p(Z,x){return this.#S(Z,x)||this.#y(Z,x)}#y(Z,x){let J=FV(Z),Q=this.newChild(Z.name,J,{parent:this}),X=Q.#J&W5;if(X!==N7&&X!==e9&&X!==G5)Q.#J|=nQ;return x.unshift(Q),x.provisional++,Q}#S(Z,x){for(let J=x.provisional;J<x.length;J++){let Q=x[J];if((this.nocase?BY(Z.name):rQ(Z.name))!==Q.#_)continue;return this.#h(Z,Q,J,x)}}#h(Z,x,J,Q){let X=x.name;if(x.#J=x.#J&sQ|FV(Z),X!==Z.name)x.name=Z.name;if(J!==Q.provisional){if(J===Q.length-1)Q.pop();else Q.splice(J,1);Q.unshift(x)}return Q.provisional++,x}async lstat(){if((this.#J&g5)===0)try{return this.#l(await this.#Z.promises.lstat(this.fullpath())),this}catch(Z){this.#c(Z.code)}}lstatSync(){if((this.#J&g5)===0)try{return this.#l(this.#Z.lstatSync(this.fullpath())),this}catch(Z){this.#c(Z.code)}}#l(Z){let{atime:x,atimeMs:J,birthtime:Q,birthtimeMs:X,blksize:q,blocks:$,ctime:Y,ctimeMs:K,dev:W,gid:G,ino:V,mode:U,mtime:B,mtimeMs:D,nlink:_,rdev:w,size:P,uid:E}=Z;this.#w=x,this.#B=J,this.#R=Q,this.#H=X,this.#G=q,this.#X=$,this.#j=Y,this.#V=K,this.#x=W,this.#L=G,this.#Y=V,this.#q=U,this.#M=B,this.#D=D,this.#Q=_,this.#z=w,this.#K=P,this.#$=E;let t=FV(Z);if(this.#J=this.#J&sQ|t|NR,t!==G5&&t!==N7&&t!==e9)this.#J|=nQ}#g=[];#d=!1;#i(Z){this.#d=!1;let x=this.#g.slice();this.#g.length=0,x.forEach((J)=>J(null,Z))}readdirCB(Z,x=!1){if(!this.canReaddir()){if(x)Z(null,[]);else queueMicrotask(()=>Z(null,[]));return}let J=this.children();if(this.calledReaddir()){let X=J.slice(0,J.provisional);if(x)Z(null,X);else queueMicrotask(()=>Z(null,X));return}if(this.#g.push(Z),this.#d)return;this.#d=!0;let Q=this.fullpath();this.#Z.readdir(Q,{withFileTypes:!0},(X,q)=>{if(X)this.#b(X.code),J.provisional=0;else{for(let $ of q)this.#p($,J);this.#v(J)}this.#i(J.slice(0,J.provisional));return})}#u;async readdir(){if(!this.canReaddir())return[];let Z=this.children();if(this.calledReaddir())return Z.slice(0,Z.provisional);let x=this.fullpath();if(this.#u)await this.#u;else{let J=()=>{};this.#u=new Promise((Q)=>J=Q);try{for(let Q of await this.#Z.promises.readdir(x,{withFileTypes:!0}))this.#p(Q,Z);this.#v(Z)}catch(Q){this.#b(Q.code),Z.provisional=0}this.#u=void 0,J()}return Z.slice(0,Z.provisional)}readdirSync(){if(!this.canReaddir())return[];let Z=this.children();if(this.calledReaddir())return Z.slice(0,Z.provisional);let x=this.fullpath();try{for(let J of this.#Z.readdirSync(x,{withFileTypes:!0}))this.#p(J,Z);this.#v(Z)}catch(J){this.#b(J.code),Z.provisional=0}return Z.slice(0,Z.provisional)}canReaddir(){if(this.#J&CR)return!1;let Z=W5&this.#J;if(!(Z===G5||Z===N7||Z===e9))return!1;return!0}shouldWalk(Z,x){return(this.#J&N7)===N7&&!(this.#J&CR)&&!Z.has(this)&&(!x||x(this))}async realpath(){if(this.#A)return this.#A;if((DY|MY|g5)&this.#J)return;try{let Z=await this.#Z.promises.realpath(this.fullpath());return this.#A=this.resolve(Z)}catch(Z){this.#O()}}realpathSync(){if(this.#A)return this.#A;if((DY|MY|g5)&this.#J)return;try{let Z=this.#Z.realpathSync(this.fullpath());return this.#A=this.resolve(Z)}catch(Z){this.#O()}}[fR](Z){if(Z===this)return;Z.isCWD=!1,this.isCWD=!0;let x=new Set([]),J=[],Q=this;while(Q&&Q.parent)x.add(Q),Q.#I=J.join(this.sep),Q.#P=J.join("/"),Q=Q.parent,J.push("..");Q=Z;while(Q&&Q.parent&&!x.has(Q))Q.#I=void 0,Q.#P=void 0,Q=Q.parent}}class FY extends p4{sep="\\";splitSep=q50;constructor(Z,x=G5,J,Q,X,q,$){super(Z,x,J,Q,X,q,$)}newChild(Z,x=G5,J={}){return new FY(Z,x,this.root,this.roots,this.nocase,this.childrenCache(),J)}getRootString(Z){return _V.parse(Z).root}getRoot(Z){if(Z=X50(Z.toUpperCase()),Z===this.root.name)return this.root;for(let[x,J]of Object.entries(this.roots))if(this.sameRoot(Z,x))return this.roots[Z]=J;return this.roots[Z]=new tQ(Z,this).root}sameRoot(Z,x=this.root.name){return Z=Z.toUpperCase().replace(/\//g,"\\").replace(PR,"$1\\"),Z===x}}class _Y extends p4{splitSep="/";sep="/";constructor(Z,x=G5,J,Q,X,q,$){super(Z,x,J,Q,X,q,$)}getRootString(Z){return Z.startsWith("/")?"/":""}getRoot(Z){return this.root}newChild(Z,x=G5,J={}){return new _Y(Z,x,this.root,this.roots,this.nocase,this.childrenCache(),J)}}class NV{root;rootPath;roots;cwd;#Z;#x;#q;nocase;#Q;constructor(Z=process.cwd(),x,J,{nocase:Q,childrenCacheSize:X=16384,fs:q=aQ}={}){if(this.#Q=RR(q),Z instanceof URL||Z.startsWith("file://"))Z=i60(Z);let $=x.resolve(Z);this.roots=Object.create(null),this.rootPath=this.parseRootPath($),this.#Z=new LV,this.#x=new LV,this.#q=new TR(X);let Y=$.substring(this.rootPath.length).split(J);if(Y.length===1&&!Y[0])Y.pop();if(Q===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=Q,this.root=this.newRoot(this.#Q),this.roots[this.rootPath]=this.root;let K=this.root,W=Y.length-1,G=x.sep,V=this.rootPath,U=!1;for(let B of Y){let D=W--;K=K.child(B,{relative:new Array(D).fill("..").join(G),relativePosix:new Array(D).fill("..").join("/"),fullpath:V+=(U?"":G)+B}),U=!0}this.cwd=K}depth(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.depth()}childrenCache(){return this.#q}resolve(...Z){let x="";for(let X=Z.length-1;X>=0;X--){let q=Z[X];if(!q||q===".")continue;if(x=x?`${q}/${x}`:q,this.isAbsolute(q))break}let J=this.#Z.get(x);if(J!==void 0)return J;let Q=this.cwd.resolve(x).fullpath();return this.#Z.set(x,Q),Q}resolvePosix(...Z){let x="";for(let X=Z.length-1;X>=0;X--){let q=Z[X];if(!q||q===".")continue;if(x=x?`${q}/${x}`:q,this.isAbsolute(q))break}let J=this.#x.get(x);if(J!==void 0)return J;let Q=this.cwd.resolve(x).fullpathPosix();return this.#x.set(x,Q),Q}relative(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.relative()}relativePosix(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.relativePosix()}basename(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.name}dirname(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return(Z.parent||Z).fullpath()}async readdir(Z=this.cwd,x={withFileTypes:!0}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof p4))x=Z,Z=this.cwd;let{withFileTypes:J}=x;if(!Z.canReaddir())return[];else{let Q=await Z.readdir();return J?Q:Q.map((X)=>X.name)}}readdirSync(Z=this.cwd,x={withFileTypes:!0}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof p4))x=Z,Z=this.cwd;let{withFileTypes:J=!0}=x;if(!Z.canReaddir())return[];else if(J)return Z.readdirSync();else return Z.readdirSync().map((Q)=>Q.name)}async lstat(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.lstat()}lstatSync(Z=this.cwd){if(typeof Z==="string")Z=this.cwd.resolve(Z);return Z.lstatSync()}async readlink(Z=this.cwd,{withFileTypes:x}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof p4))x=Z.withFileTypes,Z=this.cwd;let J=await Z.readlink();return x?J:J?.fullpath()}readlinkSync(Z=this.cwd,{withFileTypes:x}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof p4))x=Z.withFileTypes,Z=this.cwd;let J=Z.readlinkSync();return x?J:J?.fullpath()}async realpath(Z=this.cwd,{withFileTypes:x}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof p4))x=Z.withFileTypes,Z=this.cwd;let J=await Z.realpath();return x?J:J?.fullpath()}realpathSync(Z=this.cwd,{withFileTypes:x}={withFileTypes:!1}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof p4))x=Z.withFileTypes,Z=this.cwd;let J=Z.realpathSync();return x?J:J?.fullpath()}async walk(Z=this.cwd,x={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof p4))x=Z,Z=this.cwd;let{withFileTypes:J=!0,follow:Q=!1,filter:X,walkFilter:q}=x,$=[];if(!X||X(Z))$.push(J?Z:Z.fullpath());let Y=new Set,K=(G,V)=>{Y.add(G),G.readdirCB((U,B)=>{if(U)return V(U);let D=B.length;if(!D)return V();let _=()=>{if(--D===0)V()};for(let w of B){if(!X||X(w))$.push(J?w:w.fullpath());if(Q&&w.isSymbolicLink())w.realpath().then((P)=>P?.isUnknown()?P.lstat():P).then((P)=>P?.shouldWalk(Y,q)?K(P,_):_());else if(w.shouldWalk(Y,q))K(w,_);else _()}},!0)},W=Z;return new Promise((G,V)=>{K(W,(U)=>{if(U)return V(U);G($)})})}walkSync(Z=this.cwd,x={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof p4))x=Z,Z=this.cwd;let{withFileTypes:J=!0,follow:Q=!1,filter:X,walkFilter:q}=x,$=[];if(!X||X(Z))$.push(J?Z:Z.fullpath());let Y=new Set([Z]);for(let K of Y){let W=K.readdirSync();for(let G of W){if(!X||X(G))$.push(J?G:G.fullpath());let V=G;if(G.isSymbolicLink()){if(!(Q&&(V=G.realpathSync())))continue;if(V.isUnknown())V.lstatSync()}if(V.shouldWalk(Y,q))Y.add(V)}}return $}[Symbol.asyncIterator](){return this.iterate()}iterate(Z=this.cwd,x={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof p4))x=Z,Z=this.cwd;return this.stream(Z,x)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(Z=this.cwd,x={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof p4))x=Z,Z=this.cwd;let{withFileTypes:J=!0,follow:Q=!1,filter:X,walkFilter:q}=x;if(!X||X(Z))yield J?Z:Z.fullpath();let $=new Set([Z]);for(let Y of $){let K=Y.readdirSync();for(let W of K){if(!X||X(W))yield J?W:W.fullpath();let G=W;if(W.isSymbolicLink()){if(!(Q&&(G=W.realpathSync())))continue;if(G.isUnknown())G.lstatSync()}if(G.shouldWalk($,q))$.add(G)}}}stream(Z=this.cwd,x={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof p4))x=Z,Z=this.cwd;let{withFileTypes:J=!0,follow:Q=!1,filter:X,walkFilter:q}=x,$=new t9({objectMode:!0});if(!X||X(Z))$.write(J?Z:Z.fullpath());let Y=new Set,K=[Z],W=0,G=()=>{let V=!1;while(!V){let U=K.shift();if(!U){if(W===0)$.end();return}W++,Y.add(U);let B=(_,w,P=!1)=>{if(_)return $.emit("error",_);if(Q&&!P){let E=[];for(let t of w)if(t.isSymbolicLink())E.push(t.realpath().then((K0)=>K0?.isUnknown()?K0.lstat():K0));if(E.length){Promise.all(E).then(()=>B(null,w,!0));return}}for(let E of w)if(E&&(!X||X(E))){if(!$.write(J?E:E.fullpath()))V=!0}W--;for(let E of w){let t=E.realpathCached()||E;if(t.shouldWalk(Y,q))K.push(t)}if(V&&!$.flowing)$.once("drain",G);else if(!D)G()},D=!0;U.readdirCB(B,!0),D=!1}};return G(),$}streamSync(Z=this.cwd,x={}){if(typeof Z==="string")Z=this.cwd.resolve(Z);else if(!(Z instanceof p4))x=Z,Z=this.cwd;let{withFileTypes:J=!0,follow:Q=!1,filter:X,walkFilter:q}=x,$=new t9({objectMode:!0}),Y=new Set;if(!X||X(Z))$.write(J?Z:Z.fullpath());let K=[Z],W=0,G=()=>{let V=!1;while(!V){let U=K.shift();if(!U){if(W===0)$.end();return}W++,Y.add(U);let B=U.readdirSync();for(let D of B)if(!X||X(D)){if(!$.write(J?D:D.fullpath()))V=!0}W--;for(let D of B){let _=D;if(D.isSymbolicLink()){if(!(Q&&(_=D.realpathSync())))continue;if(_.isUnknown())_.lstatSync()}if(_.shouldWalk(Y,q))K.push(_)}}if(V&&!$.flowing)$.once("drain",G)};return G(),$}chdir(Z=this.cwd){let x=this.cwd;this.cwd=typeof Z==="string"?this.cwd.resolve(Z):Z,this.cwd[fR](x)}}class tQ extends NV{sep="\\";constructor(Z=process.cwd(),x={}){let{nocase:J=!0}=x;super(Z,_V,"\\",{...x,nocase:J});this.nocase=J;for(let Q=this.cwd;Q;Q=Q.parent)Q.nocase=this.nocase}parseRootPath(Z){return _V.parse(Z).root.toUpperCase()}newRoot(Z){return new FY(this.rootPath,N7,void 0,this.roots,this.nocase,this.childrenCache(),{fs:Z})}isAbsolute(Z){return Z.startsWith("/")||Z.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(Z)}}class eQ extends NV{sep="/";constructor(Z=process.cwd(),x={}){let{nocase:J=!1}=x;super(Z,l60,"/",{...x,nocase:J});this.nocase=J}parseRootPath(Z){return"/"}newRoot(Z){return new _Y(this.rootPath,N7,void 0,this.roots,this.nocase,this.childrenCache(),{fs:Z})}isAbsolute(Z){return Z.startsWith("/")}}class LY extends eQ{constructor(Z=process.cwd(),x={}){let{nocase:J=!0}=x;super(Z,{...x,nocase:J})}}var jn0=process.platform==="win32"?FY:_Y,vR=process.platform==="win32"?tQ:process.platform==="darwin"?LY:eQ;var Y50=(Z)=>Z.length>=1,K50=(Z)=>Z.length>=1;class fx{#Z;#x;#q;length;#Q;#$;#L;#z;#G;#Y;#K=!0;constructor(Z,x,J,Q){if(!Y50(Z))throw new TypeError("empty pattern list");if(!K50(x))throw new TypeError("empty glob list");if(x.length!==Z.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=Z.length,J<0||J>=this.length)throw new TypeError("index out of range");if(this.#Z=Z,this.#x=x,this.#q=J,this.#Q=Q,this.#q===0){if(this.isUNC()){let[X,q,$,Y,...K]=this.#Z,[W,G,V,U,...B]=this.#x;if(K[0]==="")K.shift(),B.shift();let D=[X,q,$,Y,""].join("/"),_=[W,G,V,U,""].join("/");this.#Z=[D,...K],this.#x=[_,...B],this.length=this.#Z.length}else if(this.isDrive()||this.isAbsolute()){let[X,...q]=this.#Z,[$,...Y]=this.#x;if(q[0]==="")q.shift(),Y.shift();let K=X+"/",W=$+"/";this.#Z=[K,...q],this.#x=[W,...Y],this.length=this.#Z.length}}}pattern(){return this.#Z[this.#q]}isString(){return typeof this.#Z[this.#q]==="string"}isGlobstar(){return this.#Z[this.#q]===n8}isRegExp(){return this.#Z[this.#q]instanceof RegExp}globString(){return this.#L=this.#L||(this.#q===0?this.isAbsolute()?this.#x[0]+this.#x.slice(1).join("/"):this.#x.join("/"):this.#x.slice(this.#q).join("/"))}hasMore(){return this.length>this.#q+1}rest(){if(this.#$!==void 0)return this.#$;if(!this.hasMore())return this.#$=null;return this.#$=new fx(this.#Z,this.#x,this.#q+1,this.#Q),this.#$.#Y=this.#Y,this.#$.#G=this.#G,this.#$.#z=this.#z,this.#$}isUNC(){let Z=this.#Z;return this.#G!==void 0?this.#G:this.#G=this.#Q==="win32"&&this.#q===0&&Z[0]===""&&Z[1]===""&&typeof Z[2]==="string"&&!!Z[2]&&typeof Z[3]==="string"&&!!Z[3]}isDrive(){let Z=this.#Z;return this.#z!==void 0?this.#z:this.#z=this.#Q==="win32"&&this.#q===0&&this.length>1&&typeof Z[0]==="string"&&/^[a-z]:$/i.test(Z[0])}isAbsolute(){let Z=this.#Z;return this.#Y!==void 0?this.#Y:this.#Y=Z[0]===""&&Z.length>1||this.isDrive()||this.isUNC()}root(){let Z=this.#Z[0];return typeof Z==="string"&&this.isAbsolute()&&this.#q===0?Z:""}checkFollowGlobstar(){return!(this.#q===0||!this.isGlobstar()||!this.#K)}markFollowGlobstar(){if(this.#q===0||!this.isGlobstar()||!this.#K)return!1;return this.#K=!1,!0}}var z50=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class ZX{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(Z,{nobrace:x,nocase:J,noext:Q,noglobstar:X,platform:q=z50}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=q,this.mmopts={dot:!0,nobrace:x,nocase:J,noext:Q,noglobstar:X,optimizationLevel:2,platform:q,nocomment:!0,nonegate:!0};for(let $ of Z)this.add($)}add(Z){let x=new z5(Z,this.mmopts);for(let J=0;J<x.set.length;J++){let Q=x.set[J],X=x.globParts[J];if(!Q||!X)throw new Error("invalid pattern object");while(Q[0]==="."&&X[0]===".")Q.shift(),X.shift();let q=new fx(Q,X,0,this.platform),$=new z5(q.globString(),this.mmopts),Y=X[X.length-1]==="**",K=q.isAbsolute();if(K)this.absolute.push($);else this.relative.push($);if(Y)if(K)this.absoluteChildren.push($);else this.relativeChildren.push($)}}ignored(Z){let x=Z.fullpath(),J=`${x}/`,Q=Z.relative()||".",X=`${Q}/`;for(let q of this.relative)if(q.match(Q)||q.match(X))return!0;for(let q of this.absolute)if(q.match(x)||q.match(J))return!0;return!1}childrenIgnored(Z){let x=Z.fullpath()+"/",J=(Z.relative()||".")+"/";for(let Q of this.relativeChildren)if(Q.match(J))return!0;for(let Q of this.absoluteChildren)if(Q.match(x))return!0;return!1}}class CV{store;constructor(Z=new Map){this.store=Z}copy(){return new CV(new Map(this.store))}hasWalked(Z,x){return this.store.get(Z.fullpath())?.has(x.globString())}storeWalked(Z,x){let J=Z.fullpath(),Q=this.store.get(J);if(Q)Q.add(x.globString());else this.store.set(J,new Set([x.globString()]))}}class ER{store=new Map;add(Z,x,J){let Q=(x?2:0)|(J?1:0),X=this.store.get(Z);this.store.set(Z,X===void 0?Q:Q&X)}entries(){return[...this.store.entries()].map(([Z,x])=>[Z,!!(x&2),!!(x&1)])}}class kR{store=new Map;add(Z,x){if(!Z.canReaddir())return;let J=this.store.get(Z);if(J){if(!J.find((Q)=>Q.globString()===x.globString()))J.push(x)}else this.store.set(Z,[x])}get(Z){let x=this.store.get(Z);if(!x)throw new Error("attempting to walk unknown path");return x}entries(){return this.keys().map((Z)=>[Z,this.store.get(Z)])}keys(){return[...this.store.keys()].filter((Z)=>Z.canReaddir())}}class xX{hasWalkedCache;matches=new ER;subwalks=new kR;patterns;follow;dot;opts;constructor(Z,x){this.opts=Z,this.follow=!!Z.follow,this.dot=!!Z.dot,this.hasWalkedCache=x?x.copy():new CV}processPatterns(Z,x){this.patterns=x;let J=x.map((Q)=>[Z,Q]);for(let[Q,X]of J){this.hasWalkedCache.storeWalked(Q,X);let q=X.root(),$=X.isAbsolute()&&this.opts.absolute!==!1;if(q){Q=Q.resolve(q==="/"&&this.opts.root!==void 0?this.opts.root:q);let G=X.rest();if(!G){this.matches.add(Q,!0,!1);continue}else X=G}if(Q.isENOENT())continue;let Y,K,W=!1;while(typeof(Y=X.pattern())==="string"&&(K=X.rest()))Q=Q.resolve(Y),X=K,W=!0;if(Y=X.pattern(),K=X.rest(),W){if(this.hasWalkedCache.hasWalked(Q,X))continue;this.hasWalkedCache.storeWalked(Q,X)}if(typeof Y==="string"){let G=Y===".."||Y===""||Y===".";this.matches.add(Q.resolve(Y),$,G);continue}else if(Y===n8){if(!Q.isSymbolicLink()||this.follow||X.checkFollowGlobstar())this.subwalks.add(Q,X);let G=K?.pattern(),V=K?.rest();if(!K||(G===""||G===".")&&!V)this.matches.add(Q,$,G===""||G===".");else if(G===".."){let U=Q.parent||Q;if(!V)this.matches.add(U,$,!0);else if(!this.hasWalkedCache.hasWalked(U,V))this.subwalks.add(U,V)}}else if(Y instanceof RegExp)this.subwalks.add(Q,X)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new xX(this.opts,this.hasWalkedCache)}filterEntries(Z,x){let J=this.subwalks.get(Z),Q=this.child();for(let X of x)for(let q of J){let $=q.isAbsolute(),Y=q.pattern(),K=q.rest();if(Y===n8)Q.testGlobstar(X,q,K,$);else if(Y instanceof RegExp)Q.testRegExp(X,Y,K,$);else Q.testString(X,Y,K,$)}return Q}testGlobstar(Z,x,J,Q){if(this.dot||!Z.name.startsWith(".")){if(!x.hasMore())this.matches.add(Z,Q,!1);if(Z.canReaddir()){if(this.follow||!Z.isSymbolicLink())this.subwalks.add(Z,x);else if(Z.isSymbolicLink()){if(J&&x.checkFollowGlobstar())this.subwalks.add(Z,J);else if(x.markFollowGlobstar())this.subwalks.add(Z,x)}}}if(J){let X=J.pattern();if(typeof X==="string"&&X!==".."&&X!==""&&X!==".")this.testString(Z,X,J.rest(),Q);else if(X===".."){let q=Z.parent||Z;this.subwalks.add(q,J)}else if(X instanceof RegExp)this.testRegExp(Z,X,J.rest(),Q)}}testRegExp(Z,x,J,Q){if(!x.test(Z.name))return;if(!J)this.matches.add(Z,Q,!1);else this.subwalks.add(Z,J)}testString(Z,x,J,Q){if(!Z.isNamed(x))return;if(!J)this.matches.add(Z,Q,!1);else this.subwalks.add(Z,J)}}var W50=(Z,x)=>typeof Z==="string"?new ZX([Z],x):Array.isArray(Z)?new ZX(Z,x):Z;class wV{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#Z=[];#x;#q;signal;maxDepth;includeChildMatches;constructor(Z,x,J){if(this.patterns=Z,this.path=x,this.opts=J,this.#q=!J.posix&&J.platform==="win32"?"\\":"/",this.includeChildMatches=J.includeChildMatches!==!1,J.ignore||!this.includeChildMatches){if(this.#x=W50(J.ignore??[],J),!this.includeChildMatches&&typeof this.#x.add!=="function")throw new Error("cannot ignore child matches, ignore lacks add() method.")}if(this.maxDepth=J.maxDepth||1/0,J.signal)this.signal=J.signal,this.signal.addEventListener("abort",()=>{this.#Z.length=0})}#Q(Z){return this.seen.has(Z)||!!this.#x?.ignored?.(Z)}#$(Z){return!!this.#x?.childrenIgnored?.(Z)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let Z=void 0;while(!this.paused&&(Z=this.#Z.shift()))Z()}onResume(Z){if(this.signal?.aborted)return;if(!this.paused)Z();else this.#Z.push(Z)}async matchCheck(Z,x){if(x&&this.opts.nodir)return;let J;if(this.opts.realpath){if(J=Z.realpathCached()||await Z.realpath(),!J)return;Z=J}let X=Z.isUnknown()||this.opts.stat?await Z.lstat():Z;if(this.opts.follow&&this.opts.nodir&&X?.isSymbolicLink()){let q=await X.realpath();if(q&&(q.isUnknown()||this.opts.stat))await q.lstat()}return this.matchCheckTest(X,x)}matchCheckTest(Z,x){return Z&&(this.maxDepth===1/0||Z.depth()<=this.maxDepth)&&(!x||Z.canReaddir())&&(!this.opts.nodir||!Z.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!Z.isSymbolicLink()||!Z.realpathCached()?.isDirectory())&&!this.#Q(Z)?Z:void 0}matchCheckSync(Z,x){if(x&&this.opts.nodir)return;let J;if(this.opts.realpath){if(J=Z.realpathCached()||Z.realpathSync(),!J)return;Z=J}let X=Z.isUnknown()||this.opts.stat?Z.lstatSync():Z;if(this.opts.follow&&this.opts.nodir&&X?.isSymbolicLink()){let q=X.realpathSync();if(q&&(q?.isUnknown()||this.opts.stat))q.lstatSync()}return this.matchCheckTest(X,x)}matchFinish(Z,x){if(this.#Q(Z))return;if(!this.includeChildMatches&&this.#x?.add){let X=`${Z.relativePosix()}/**`;this.#x.add(X)}let J=this.opts.absolute===void 0?x:this.opts.absolute;this.seen.add(Z);let Q=this.opts.mark&&Z.isDirectory()?this.#q:"";if(this.opts.withFileTypes)this.matchEmit(Z);else if(J){let X=this.opts.posix?Z.fullpathPosix():Z.fullpath();this.matchEmit(X+Q)}else{let X=this.opts.posix?Z.relativePosix():Z.relative(),q=this.opts.dotRelative&&!X.startsWith(".."+this.#q)?"."+this.#q:"";this.matchEmit(!X?"."+Q:q+X+Q)}}async match(Z,x,J){let Q=await this.matchCheck(Z,J);if(Q)this.matchFinish(Q,x)}matchSync(Z,x,J){let Q=this.matchCheckSync(Z,J);if(Q)this.matchFinish(Q,x)}walkCB(Z,x,J){if(this.signal?.aborted)J();this.walkCB2(Z,x,new xX(this.opts),J)}walkCB2(Z,x,J,Q){if(this.#$(Z))return Q();if(this.signal?.aborted)Q();if(this.paused){this.onResume(()=>this.walkCB2(Z,x,J,Q));return}J.processPatterns(Z,x);let X=1,q=()=>{if(--X===0)Q()};for(let[$,Y,K]of J.matches.entries()){if(this.#Q($))continue;X++,this.match($,Y,K).then(()=>q())}for(let $ of J.subwalkTargets()){if(this.maxDepth!==1/0&&$.depth()>=this.maxDepth)continue;X++;let Y=$.readdirCached();if($.calledReaddir())this.walkCB3($,Y,J,q);else $.readdirCB((K,W)=>this.walkCB3($,W,J,q),!0)}q()}walkCB3(Z,x,J,Q){J=J.filterEntries(Z,x);let X=1,q=()=>{if(--X===0)Q()};for(let[$,Y,K]of J.matches.entries()){if(this.#Q($))continue;X++,this.match($,Y,K).then(()=>q())}for(let[$,Y]of J.subwalks.entries())X++,this.walkCB2($,Y,J.child(),q);q()}walkCBSync(Z,x,J){if(this.signal?.aborted)J();this.walkCB2Sync(Z,x,new xX(this.opts),J)}walkCB2Sync(Z,x,J,Q){if(this.#$(Z))return Q();if(this.signal?.aborted)Q();if(this.paused){this.onResume(()=>this.walkCB2Sync(Z,x,J,Q));return}J.processPatterns(Z,x);let X=1,q=()=>{if(--X===0)Q()};for(let[$,Y,K]of J.matches.entries()){if(this.#Q($))continue;this.matchSync($,Y,K)}for(let $ of J.subwalkTargets()){if(this.maxDepth!==1/0&&$.depth()>=this.maxDepth)continue;X++;let Y=$.readdirSync();this.walkCB3Sync($,Y,J,q)}q()}walkCB3Sync(Z,x,J,Q){J=J.filterEntries(Z,x);let X=1,q=()=>{if(--X===0)Q()};for(let[$,Y,K]of J.matches.entries()){if(this.#Q($))continue;this.matchSync($,Y,K)}for(let[$,Y]of J.subwalks.entries())X++,this.walkCB2Sync($,Y,J.child(),q);q()}}class NY extends wV{matches=new Set;constructor(Z,x,J){super(Z,x,J)}matchEmit(Z){this.matches.add(Z)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown())await this.path.lstat();return await new Promise((Z,x)=>{this.walkCB(this.path,this.patterns,()=>{if(this.signal?.aborted)x(this.signal.reason);else Z(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown())this.path.lstatSync();return this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}}class CY extends wV{results;constructor(Z,x,J){super(Z,x,J);this.results=new t9({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(Z){if(this.results.write(Z),!this.results.flowing)this.pause()}stream(){let Z=this.path;if(Z.isUnknown())Z.lstat().then(()=>{this.walkCB(Z,this.patterns,()=>this.results.end())});else this.walkCB(Z,this.patterns,()=>this.results.end());return this.results}streamSync(){if(this.path.isUnknown())this.path.lstatSync();return this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}var H50=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class C7{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(Z,x){if(!x)throw new TypeError("glob options required");if(this.withFileTypes=!!x.withFileTypes,this.signal=x.signal,this.follow=!!x.follow,this.dot=!!x.dot,this.dotRelative=!!x.dotRelative,this.nodir=!!x.nodir,this.mark=!!x.mark,!x.cwd)this.cwd="";else if(x.cwd instanceof URL||x.cwd.startsWith("file://"))x.cwd=G50(x.cwd);if(this.cwd=x.cwd||"",this.root=x.root,this.magicalBraces=!!x.magicalBraces,this.nobrace=!!x.nobrace,this.noext=!!x.noext,this.realpath=!!x.realpath,this.absolute=x.absolute,this.includeChildMatches=x.includeChildMatches!==!1,this.noglobstar=!!x.noglobstar,this.matchBase=!!x.matchBase,this.maxDepth=typeof x.maxDepth==="number"?x.maxDepth:1/0,this.stat=!!x.stat,this.ignore=x.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof Z==="string")Z=[Z];if(this.windowsPathsNoEscape=!!x.windowsPathsNoEscape||x.allowWindowsEscape===!1,this.windowsPathsNoEscape)Z=Z.map((Y)=>Y.replace(/\\/g,"/"));if(this.matchBase){if(x.noglobstar)throw new TypeError("base matching requires globstar");Z=Z.map((Y)=>Y.includes("/")?Y:`./**/${Y}`)}if(this.pattern=Z,this.platform=x.platform||H50,this.opts={...x,platform:this.platform},x.scurry){if(this.scurry=x.scurry,x.nocase!==void 0&&x.nocase!==x.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let Y=x.platform==="win32"?tQ:x.platform==="darwin"?LY:x.platform?eQ:vR;this.scurry=new Y(this.cwd,{nocase:x.nocase,fs:x.fs})}this.nocase=this.scurry.nocase;let J=this.platform==="darwin"||this.platform==="win32",Q={...x,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:J,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},X=this.pattern.map((Y)=>new z5(Y,Q)),[q,$]=X.reduce((Y,K)=>{return Y[0].push(...K.set),Y[1].push(...K.globParts),Y},[[],[]]);this.patterns=q.map((Y,K)=>{let W=$[K];if(!W)throw new Error("invalid pattern object");return new fx(Y,W,0,this.platform)})}async walk(){return[...await new NY(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new NY(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new CY(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new CY(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}var jV=(Z,x={})=>{if(!Array.isArray(Z))Z=[Z];for(let J of Z)if(new z5(J,x).hasMagic())return!0;return!1};function jY(Z,x={}){return new C7(Z,x).streamSync()}function cR(Z,x={}){return new C7(Z,x).stream()}function pR(Z,x={}){return new C7(Z,x).walkSync()}async function bR(Z,x={}){return new C7(Z,x).walk()}function RY(Z,x={}){return new C7(Z,x).iterateSync()}function yR(Z,x={}){return new C7(Z,x).iterate()}var V50=jY,U50=Object.assign(cR,{sync:jY}),M50=RY,B50=Object.assign(yR,{sync:RY}),D50=Object.assign(pR,{stream:jY,iterate:RY}),wY=Object.assign(bR,{glob:bR,globSync:pR,sync:D50,globStream:cR,stream:U50,globStreamSync:jY,streamSync:V50,globIterate:yR,iterate:B50,globIterateSync:RY,iterateSync:M50,Glob:C7,hasMagic:jV,escape:Ox,unescape:h5});wY.glob=wY;var CA=n9(lm(),1);import DQ0 from"fs";import FQ0 from"path";function $X(Z,x){return function J(){return Z.apply(x,arguments)}}var{toString:q10}=Object.prototype,{getPrototypeOf:rV}=Object,kY=((Z)=>(x)=>{let J=q10.call(x);return Z[J]||(Z[J]=J.slice(8,-1).toLowerCase())})(Object.create(null)),l5=(Z)=>{return Z=Z.toLowerCase(),(x)=>kY(x)===Z},bY=(Z)=>(x)=>typeof x===Z,{isArray:cx}=Array,YX=bY("undefined");function $10(Z){return Z!==null&&!YX(Z)&&Z.constructor!==null&&!YX(Z.constructor)&&I6(Z.constructor.isBuffer)&&Z.constructor.isBuffer(Z)}var sm=l5("ArrayBuffer");function Y10(Z){let x;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView)x=ArrayBuffer.isView(Z);else x=Z&&Z.buffer&&sm(Z.buffer);return x}var K10=bY("string"),I6=bY("function"),am=bY("number"),cY=(Z)=>Z!==null&&typeof Z==="object",z10=(Z)=>Z===!0||Z===!1,EY=(Z)=>{if(kY(Z)!=="object")return!1;let x=rV(Z);return(x===null||x===Object.prototype||Object.getPrototypeOf(x)===null)&&!(Symbol.toStringTag in Z)&&!(Symbol.iterator in Z)},W10=l5("Date"),G10=l5("File"),H10=l5("Blob"),V10=l5("FileList"),U10=(Z)=>cY(Z)&&I6(Z.pipe),M10=(Z)=>{let x;return Z&&(typeof FormData==="function"&&Z instanceof FormData||I6(Z.append)&&((x=kY(Z))==="formdata"||x==="object"&&I6(Z.toString)&&Z.toString()==="[object FormData]"))},B10=l5("URLSearchParams"),[D10,F10,_10,L10]=["ReadableStream","Request","Response","Headers"].map(l5),N10=(Z)=>Z.trim?Z.trim():Z.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function KX(Z,x,{allOwnKeys:J=!1}={}){if(Z===null||typeof Z==="undefined")return;let Q,X;if(typeof Z!=="object")Z=[Z];if(cx(Z))for(Q=0,X=Z.length;Q<X;Q++)x.call(null,Z[Q],Q,Z);else{let q=J?Object.getOwnPropertyNames(Z):Object.keys(Z),$=q.length,Y;for(Q=0;Q<$;Q++)Y=q[Q],x.call(null,Z[Y],Y,Z)}}function nm(Z,x){x=x.toLowerCase();let J=Object.keys(Z),Q=J.length,X;while(Q-- >0)if(X=J[Q],x===X.toLowerCase())return X;return null}var xZ=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})(),rm=(Z)=>!YX(Z)&&Z!==xZ;function nV(){let{caseless:Z}=rm(this)&&this||{},x={},J=(Q,X)=>{let q=Z&&nm(x,X)||X;if(EY(x[q])&&EY(Q))x[q]=nV(x[q],Q);else if(EY(Q))x[q]=nV({},Q);else if(cx(Q))x[q]=Q.slice();else x[q]=Q};for(let Q=0,X=arguments.length;Q<X;Q++)arguments[Q]&&KX(arguments[Q],J);return x}var C10=(Z,x,J,{allOwnKeys:Q}={})=>{return KX(x,(X,q)=>{if(J&&I6(X))Z[q]=$X(X,J);else Z[q]=X},{allOwnKeys:Q}),Z},w10=(Z)=>{if(Z.charCodeAt(0)===65279)Z=Z.slice(1);return Z},j10=(Z,x,J,Q)=>{Z.prototype=Object.create(x.prototype,Q),Z.prototype.constructor=Z,Object.defineProperty(Z,"super",{value:x.prototype}),J&&Object.assign(Z.prototype,J)},R10=(Z,x,J,Q)=>{let X,q,$,Y={};if(x=x||{},Z==null)return x;do{X=Object.getOwnPropertyNames(Z),q=X.length;while(q-- >0)if($=X[q],(!Q||Q($,Z,x))&&!Y[$])x[$]=Z[$],Y[$]=!0;Z=J!==!1&&rV(Z)}while(Z&&(!J||J(Z,x))&&Z!==Object.prototype);return x},P10=(Z,x,J)=>{if(Z=String(Z),J===void 0||J>Z.length)J=Z.length;J-=x.length;let Q=Z.indexOf(x,J);return Q!==-1&&Q===J},m10=(Z)=>{if(!Z)return null;if(cx(Z))return Z;let x=Z.length;if(!am(x))return null;let J=new Array(x);while(x-- >0)J[x]=Z[x];return J},O10=((Z)=>{return(x)=>{return Z&&x instanceof Z}})(typeof Uint8Array!=="undefined"&&rV(Uint8Array)),I10=(Z,x)=>{let Q=(Z&&Z[Symbol.iterator]).call(Z),X;while((X=Q.next())&&!X.done){let q=X.value;x.call(Z,q[0],q[1])}},A10=(Z,x)=>{let J,Q=[];while((J=Z.exec(x))!==null)Q.push(J);return Q},S10=l5("HTMLFormElement"),T10=(Z)=>{return Z.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function x(J,Q,X){return Q.toUpperCase()+X})},im=(({hasOwnProperty:Z})=>(x,J)=>Z.call(x,J))(Object.prototype),f10=l5("RegExp"),tm=(Z,x)=>{let J=Object.getOwnPropertyDescriptors(Z),Q={};KX(J,(X,q)=>{let $;if(($=x(X,q,Z))!==!1)Q[q]=$||X}),Object.defineProperties(Z,Q)},v10=(Z)=>{tm(Z,(x,J)=>{if(I6(Z)&&["arguments","caller","callee"].indexOf(J)!==-1)return!1;let Q=Z[J];if(!I6(Q))return;if(x.enumerable=!1,"writable"in x){x.writable=!1;return}if(!x.set)x.set=()=>{throw Error("Can not rewrite read-only method '"+J+"'")}})},E10=(Z,x)=>{let J={},Q=(X)=>{X.forEach((q)=>{J[q]=!0})};return cx(Z)?Q(Z):Q(String(Z).split(x)),J},k10=()=>{},b10=(Z,x)=>{return Z!=null&&Number.isFinite(Z=+Z)?Z:x},aV="abcdefghijklmnopqrstuvwxyz",om="0123456789",em={DIGIT:om,ALPHA:aV,ALPHA_DIGIT:aV+aV.toUpperCase()+om},c10=(Z=16,x=em.ALPHA_DIGIT)=>{let J="",{length:Q}=x;while(Z--)J+=x[Math.random()*Q|0];return J};function p10(Z){return!!(Z&&I6(Z.append)&&Z[Symbol.toStringTag]==="FormData"&&Z[Symbol.iterator])}var y10=(Z)=>{let x=new Array(10),J=(Q,X)=>{if(cY(Q)){if(x.indexOf(Q)>=0)return;if(!("toJSON"in Q)){x[X]=Q;let q=cx(Q)?[]:{};return KX(Q,($,Y)=>{let K=J($,X+1);!YX(K)&&(q[Y]=K)}),x[X]=void 0,q}}return Q};return J(Z,0)},h10=l5("AsyncFunction"),u10=(Z)=>Z&&(cY(Z)||I6(Z))&&I6(Z.then)&&I6(Z.catch),ZO=((Z,x)=>{if(Z)return setImmediate;return x?((J,Q)=>{return xZ.addEventListener("message",({source:X,data:q})=>{if(X===xZ&&q===J)Q.length&&Q.shift()()},!1),(X)=>{Q.push(X),xZ.postMessage(J,"*")}})(`axios@${Math.random()}`,[]):(J)=>setTimeout(J)})(typeof setImmediate==="function",I6(xZ.postMessage)),g10=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(xZ):typeof process!=="undefined"&&process.nextTick||ZO,v={isArray:cx,isArrayBuffer:sm,isBuffer:$10,isFormData:M10,isArrayBufferView:Y10,isString:K10,isNumber:am,isBoolean:z10,isObject:cY,isPlainObject:EY,isReadableStream:D10,isRequest:F10,isResponse:_10,isHeaders:L10,isUndefined:YX,isDate:W10,isFile:G10,isBlob:H10,isRegExp:f10,isFunction:I6,isStream:U10,isURLSearchParams:B10,isTypedArray:O10,isFileList:V10,forEach:KX,merge:nV,extend:C10,trim:N10,stripBOM:w10,inherits:j10,toFlatObject:R10,kindOf:kY,kindOfTest:l5,endsWith:P10,toArray:m10,forEachEntry:I10,matchAll:A10,isHTMLForm:S10,hasOwnProperty:im,hasOwnProp:im,reduceDescriptors:tm,freezeMethods:v10,toObjectSet:E10,toCamelCase:T10,noop:k10,toFiniteNumber:b10,findKey:nm,global:xZ,isContextDefined:rm,ALPHABET:em,generateString:c10,isSpecCompliantForm:p10,toJSONObject:y10,isAsyncFn:h10,isThenable:u10,setImmediate:ZO,asap:g10};function px(Z,x,J,Q,X){if(Error.call(this),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=new Error().stack;if(this.message=Z,this.name="AxiosError",x&&(this.code=x),J&&(this.config=J),Q&&(this.request=Q),X)this.response=X,this.status=X.status?X.status:null}v.inherits(px,Error,{toJSON:function Z(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:v.toJSONObject(this.config),code:this.code,status:this.status}}});var xO=px.prototype,JO={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((Z)=>{JO[Z]={value:Z}});Object.defineProperties(px,JO);Object.defineProperty(xO,"isAxiosError",{value:!0});px.from=(Z,x,J,Q,X,q)=>{let $=Object.create(xO);return v.toFlatObject(Z,$,function Y(K){return K!==Error.prototype},(Y)=>{return Y!=="isAxiosError"}),px.call($,Z.message,x,J,Q,X),$.cause=Z,$.name=Z.name,q&&Object.assign($,q),$};var k0=px;var KO=n9(YO(),1),pY=KO.default;function JU(Z){return v.isPlainObject(Z)||v.isArray(Z)}function WO(Z){return v.endsWith(Z,"[]")?Z.slice(0,-2):Z}function zO(Z,x,J){if(!Z)return x;return Z.concat(x).map(function Q(X,q){return X=WO(X),!J&&q?"["+X+"]":X}).join(J?".":"")}function n10(Z){return v.isArray(Z)&&!Z.some(JU)}var r10=v.toFlatObject(v,{},null,function Z(x){return/^is[A-Z]/.test(x)});function t10(Z,x,J){if(!v.isObject(Z))throw new TypeError("target must be an object");x=x||new(pY||FormData),J=v.toFlatObject(J,{metaTokens:!0,dots:!1,indexes:!1},!1,function D(_,w){return!v.isUndefined(w[_])});let Q=J.metaTokens,X=J.visitor||G,q=J.dots,$=J.indexes,K=(J.Blob||typeof Blob!=="undefined"&&Blob)&&v.isSpecCompliantForm(x);if(!v.isFunction(X))throw new TypeError("visitor must be a function");function W(D){if(D===null)return"";if(v.isDate(D))return D.toISOString();if(!K&&v.isBlob(D))throw new k0("Blob is not supported. Use a Buffer instead.");if(v.isArrayBuffer(D)||v.isTypedArray(D))return K&&typeof Blob==="function"?new Blob([D]):Buffer.from(D);return D}function G(D,_,w){let P=D;if(D&&!w&&typeof D==="object"){if(v.endsWith(_,"{}"))_=Q?_:_.slice(0,-2),D=JSON.stringify(D);else if(v.isArray(D)&&n10(D)||(v.isFileList(D)||v.endsWith(_,"[]"))&&(P=v.toArray(D)))return _=WO(_),P.forEach(function E(t,K0){!(v.isUndefined(t)||t===null)&&x.append($===!0?zO([_],K0,q):$===null?_:_+"[]",W(t))}),!1}if(JU(D))return!0;return x.append(zO(w,_,q),W(D)),!1}let V=[],U=Object.assign(r10,{defaultVisitor:G,convertValue:W,isVisitable:JU});function B(D,_){if(v.isUndefined(D))return;if(V.indexOf(D)!==-1)throw Error("Circular reference detected in "+_.join("."));V.push(D),v.forEach(D,function w(P,E){if((!(v.isUndefined(P)||P===null)&&X.call(x,P,v.isString(E)?E.trim():E,_,U))===!0)B(P,_?_.concat(E):[E])}),V.pop()}if(!v.isObject(Z))throw new TypeError("data must be an object");return B(Z),x}var x9=t10;function GO(Z){let x={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\x00"};return encodeURIComponent(Z).replace(/[!'()~]|%20|%00/g,function J(Q){return x[Q]})}function HO(Z,x){this._pairs=[],Z&&x9(Z,this,x)}var VO=HO.prototype;VO.append=function Z(x,J){this._pairs.push([x,J])};VO.toString=function Z(x){let J=x?function(Q){return x.call(this,Q,GO)}:GO;return this._pairs.map(function Q(X){return J(X[0])+"="+J(X[1])},"").join("&")};var UO=HO;function e10(Z){return encodeURIComponent(Z).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function JZ(Z,x,J){if(!x)return Z;let Q=J&&J.encode||e10,X=J&&J.serialize,q;if(X)q=X(x,J);else q=v.isURLSearchParams(x)?x.toString():new UO(x,J).toString(Q);if(q){let $=Z.indexOf("#");if($!==-1)Z=Z.slice(0,$);Z+=(Z.indexOf("?")===-1?"?":"&")+q}return Z}class MO{constructor(){this.handlers=[]}use(Z,x,J){return this.handlers.push({fulfilled:Z,rejected:x,synchronous:J?J.synchronous:!1,runWhen:J?J.runWhen:null}),this.handlers.length-1}eject(Z){if(this.handlers[Z])this.handlers[Z]=null}clear(){if(this.handlers)this.handlers=[]}forEach(Z){v.forEach(this.handlers,function x(J){if(J!==null)Z(J)})}}var QU=MO;var yx={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};import Z90 from"url";var BO=Z90.URLSearchParams;var DO={isNode:!0,classes:{URLSearchParams:BO,FormData:pY,Blob:typeof Blob!=="undefined"&&Blob||null},protocols:["http","https","file","data"]};var $U={};rH($U,{origin:()=>Q90,navigator:()=>XU,hasStandardBrowserWebWorkerEnv:()=>J90,hasStandardBrowserEnv:()=>x90,hasBrowserEnv:()=>qU});var qU=typeof window!=="undefined"&&typeof document!=="undefined",XU=typeof navigator==="object"&&navigator||void 0,x90=qU&&(!XU||["ReactNative","NativeScript","NS"].indexOf(XU.product)<0),J90=(()=>{return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),Q90=qU&&window.location.href||"http://localhost";var _3={...$U,...DO};function YU(Z,x){return x9(Z,new _3.classes.URLSearchParams,Object.assign({visitor:function(J,Q,X,q){if(_3.isNode&&v.isBuffer(J))return this.append(Q,J.toString("base64")),!1;return q.defaultVisitor.apply(this,arguments)}},x))}function X90(Z){return v.matchAll(/\w+|\[(\w*)]/g,Z).map((x)=>{return x[0]==="[]"?"":x[1]||x[0]})}function q90(Z){let x={},J=Object.keys(Z),Q,X=J.length,q;for(Q=0;Q<X;Q++)q=J[Q],x[q]=Z[q];return x}function $90(Z){function x(J,Q,X,q){let $=J[q++];if($==="__proto__")return!0;let Y=Number.isFinite(+$),K=q>=J.length;if($=!$&&v.isArray(X)?X.length:$,K){if(v.hasOwnProp(X,$))X[$]=[X[$],Q];else X[$]=Q;return!Y}if(!X[$]||!v.isObject(X[$]))X[$]=[];if(x(J,Q,X[$],q)&&v.isArray(X[$]))X[$]=q90(X[$]);return!Y}if(v.isFormData(Z)&&v.isFunction(Z.entries)){let J={};return v.forEachEntry(Z,(Q,X)=>{x(X90(Q),X,J,0)}),J}return null}var yY=$90;function Y90(Z,x,J){if(v.isString(Z))try{return(x||JSON.parse)(Z),v.trim(Z)}catch(Q){if(Q.name!=="SyntaxError")throw Q}return(J||JSON.stringify)(Z)}var KU={transitional:yx,adapter:["xhr","http","fetch"],transformRequest:[function Z(x,J){let Q=J.getContentType()||"",X=Q.indexOf("application/json")>-1,q=v.isObject(x);if(q&&v.isHTMLForm(x))x=new FormData(x);if(v.isFormData(x))return X?JSON.stringify(yY(x)):x;if(v.isArrayBuffer(x)||v.isBuffer(x)||v.isStream(x)||v.isFile(x)||v.isBlob(x)||v.isReadableStream(x))return x;if(v.isArrayBufferView(x))return x.buffer;if(v.isURLSearchParams(x))return J.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),x.toString();let Y;if(q){if(Q.indexOf("application/x-www-form-urlencoded")>-1)return YU(x,this.formSerializer).toString();if((Y=v.isFileList(x))||Q.indexOf("multipart/form-data")>-1){let K=this.env&&this.env.FormData;return x9(Y?{"files[]":x}:x,K&&new K,this.formSerializer)}}if(q||X)return J.setContentType("application/json",!1),Y90(x);return x}],transformResponse:[function Z(x){let J=this.transitional||KU.transitional,Q=J&&J.forcedJSONParsing,X=this.responseType==="json";if(v.isResponse(x)||v.isReadableStream(x))return x;if(x&&v.isString(x)&&(Q&&!this.responseType||X)){let $=!(J&&J.silentJSONParsing)&&X;try{return JSON.parse(x)}catch(Y){if($){if(Y.name==="SyntaxError")throw k0.from(Y,k0.ERR_BAD_RESPONSE,this,null,this.response);throw Y}}}return x}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_3.classes.FormData,Blob:_3.classes.Blob},validateStatus:function Z(x){return x>=200&&x<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};v.forEach(["delete","get","head","post","put","patch"],(Z)=>{KU.headers[Z]={}});var hx=KU;var K90=v.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),FO=(Z)=>{let x={},J,Q,X;return Z&&Z.split(`
90
90
  `).forEach(function q($){if(X=$.indexOf(":"),J=$.substring(0,X).trim().toLowerCase(),Q=$.substring(X+1).trim(),!J||x[J]&&K90[J])return;if(J==="set-cookie")if(x[J])x[J].push(Q);else x[J]=[Q];else x[J]=x[J]?x[J]+", "+Q:Q}),x};var _O=Symbol("internals");function zX(Z){return Z&&String(Z).trim().toLowerCase()}function hY(Z){if(Z===!1||Z==null)return Z;return v.isArray(Z)?Z.map(hY):String(Z)}function z90(Z){let x=Object.create(null),J=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,Q;while(Q=J.exec(Z))x[Q[1]]=Q[2];return x}var W90=(Z)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(Z.trim());function zU(Z,x,J,Q,X){if(v.isFunction(Q))return Q.call(this,x,J);if(X)x=J;if(!v.isString(x))return;if(v.isString(Q))return x.indexOf(Q)!==-1;if(v.isRegExp(Q))return Q.test(x)}function G90(Z){return Z.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(x,J,Q)=>{return J.toUpperCase()+Q})}function H90(Z,x){let J=v.toCamelCase(" "+x);["get","set","has"].forEach((Q)=>{Object.defineProperty(Z,Q+J,{value:function(X,q,$){return this[Q].call(this,x,X,q,$)},configurable:!0})})}class WX{constructor(Z){Z&&this.set(Z)}set(Z,x,J){let Q=this;function X($,Y,K){let W=zX(Y);if(!W)throw new Error("header name must be a non-empty string");let G=v.findKey(Q,W);if(!G||Q[G]===void 0||K===!0||K===void 0&&Q[G]!==!1)Q[G||Y]=hY($)}let q=($,Y)=>v.forEach($,(K,W)=>X(K,W,Y));if(v.isPlainObject(Z)||Z instanceof this.constructor)q(Z,x);else if(v.isString(Z)&&(Z=Z.trim())&&!W90(Z))q(FO(Z),x);else if(v.isHeaders(Z))for(let[$,Y]of Z.entries())X(Y,$,J);else Z!=null&&X(x,Z,J);return this}get(Z,x){if(Z=zX(Z),Z){let J=v.findKey(this,Z);if(J){let Q=this[J];if(!x)return Q;if(x===!0)return z90(Q);if(v.isFunction(x))return x.call(this,Q,J);if(v.isRegExp(x))return x.exec(Q);throw new TypeError("parser must be boolean|regexp|function")}}}has(Z,x){if(Z=zX(Z),Z){let J=v.findKey(this,Z);return!!(J&&this[J]!==void 0&&(!x||zU(this,this[J],J,x)))}return!1}delete(Z,x){let J=this,Q=!1;function X(q){if(q=zX(q),q){let $=v.findKey(J,q);if($&&(!x||zU(J,J[$],$,x)))delete J[$],Q=!0}}if(v.isArray(Z))Z.forEach(X);else X(Z);return Q}clear(Z){let x=Object.keys(this),J=x.length,Q=!1;while(J--){let X=x[J];if(!Z||zU(this,this[X],X,Z,!0))delete this[X],Q=!0}return Q}normalize(Z){let x=this,J={};return v.forEach(this,(Q,X)=>{let q=v.findKey(J,X);if(q){x[q]=hY(Q),delete x[X];return}let $=Z?G90(X):String(X).trim();if($!==X)delete x[X];x[$]=hY(Q),J[$]=!0}),this}concat(...Z){return this.constructor.concat(this,...Z)}toJSON(Z){let x=Object.create(null);return v.forEach(this,(J,Q)=>{J!=null&&J!==!1&&(x[Q]=Z&&v.isArray(J)?J.join(", "):J)}),x}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([Z,x])=>Z+": "+x).join(`
@@ -2478,5 +2478,4 @@ PageTheme metropolitan {
2478
2478
  }
2479
2479
  `};var Yn=(Z)=>(Z.options.childIdxForDynamicProp=!0,Z.registerCustomModule(hs0),Z.registerCustomModule(ns0),Z.registerCustomModule($a0),Z.registerCustomModule(Va0),Z.registerCustomModule(Ma0),Z.setDefinition(Vc0),Z.setMacro("rel",Da0),Z.setMacro("relationship",Fa0),Z.addDecorator(vL.templateDecorator.default),Object.entries(_a0).forEach(([x,J])=>{Z.setDefinitionAtPath(h0.create(`/modules/${Uc0}/${x}`),J)}),Z);async function mG(Z){let x=Z.map(async(Q)=>{try{if(La0.statSync(Q).isFile())return[Q];return await Kn.glob(`${Q}/**/*`,{onlyFiles:!0,dot:!0})}catch{return[]}}),J=(await Promise.all(x)).flat();return[...new Set(J)]}function Na0(Z,x){let J=Math.max(0,Math.min(x,Z.length)),X=Z.slice(0,J).split(`
2480
2480
  `),q=X.length,$=X[X.length-1].length+1;return{row:q,col:$}}function Ca0(Z){let x=new Bq;Yn(x);let J=process.cwd(),Q=new MF;try{if(Z)console.info(`AML repo path: ${J}`);Q.load(J,x)}catch{console.error(`Cannot load AML repo at: ${J}`),console.error("Perhaps check if your directory is an AML repo."),process.exit(1)}return x}function OG(Z,x=!1){let J=Ca0(x),Q=Z.filter((q)=>q.endsWith(".aml")).map((q)=>J.interpretFile(l0.create(q))),X=Q.filter((q)=>!q.isOk()).flatMap((q)=>q.resolvedDiagnostics(J.db));if(X.length>0)console.error("Compilation error:"),X.forEach((q)=>{let $=q;if(!$.file){console.error($.message);return}let Y=$.file.toString(),K=J.vfs.fileContentMap.get($.file.key),{row:W,col:G}=Na0(K??"",$.start);console.error(`${Y} (${W}, ${G}): ${$.message}`)}),process.exit(1);return Q.reduce((q,$,Y)=>{let K=Z[Y],W=$.returnVal()?.toJsStructure();if(W!==void 0)q[K]=W;return q},{})}async function wa0(Z,x){let J=await mG(Z),Q=OG(J,x!==void 0);if(x){let X=process.cwd(),q=y9.resolve(x);if(!Gx.existsSync(q))Gx.mkdirSync(q,{recursive:!0});Object.entries(Q).forEach(([$,Y])=>{let K=y9.relative(X,`${$}.json`),W=y9.join(x,K);console.info(`Writing to ${K}`),Gx.mkdirSync(y9.dirname(W),{recursive:!0}),Gx.writeFileSync(W,JSON.stringify(Y,null,2))})}else console.log(JSON.stringify(Q,null,2))}var ja0=new Y5("compile").description("Compile AML files.").argument("<files...>","source files or globs to compile").option("-o, --out-dir <out-dir>","output directory of the compilation").action(async(Z,{outDir:x})=>wa0(Z,x)),zn=ja0;async function Ra0(Z){OG(await mG(Z),!0),console.info("No compilation errors found.")}var Pa0=new Y5("validate").description("Validate AML files for compilation errors without generating output.").argument("<files...>","source files or globs to validate").action(async(Z)=>Ra0(Z)),Wn=Pa0;var ma0=new Y5("aml").description("AML-related commands").addCommand(zn).addCommand(Wn),Gn=ma0;function Hn(Z){Z.addHelpText("after",`
2481
- See documentation at:
2482
- https://docs.holistics.io/docs/continuous-integration/command-line-interface`),Z.commands.forEach((x)=>Hn(x))}function k42(Z){Z.version(Lj),Z.addCommand(TA).addCommand(IA).addCommand(Gn),Hn(Z)}export{k42 as registerCommands};
2481
+ See documentation at: https://docs.holistics.io/docs/cli`),Z.commands.forEach((x)=>Hn(x))}function k42(Z){Z.version(Lj),Z.addCommand(TA).addCommand(IA).addCommand(Gn),Hn(Z)}export{k42 as registerCommands};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@holistics/cli-core",
3
3
  "type": "module",
4
- "version": "0.2.5",
4
+ "version": "0.2.6",
5
5
  "files": [
6
6
  "dist"
7
7
  ],