@forsakringskassan/docs-generator 3.0.3 → 3.1.0

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.
@@ -606,7 +606,7 @@ main {
606
606
  background: var(--docs-navigation-hover-color);
607
607
  border-color: var(--docs-navigation-highlight-color);
608
608
  }
609
- .navigation summary .icon {
609
+ .navigation summary .docs-icon {
610
610
  transform: translateY(3px);
611
611
  transition: all 200ms cubic-bezier(0.46, 0.03, 0.52, 0.96) 0s;
612
612
  display: inline;
@@ -614,7 +614,7 @@ main {
614
614
  .navigation details[open] > summary {
615
615
  font-weight: 700;
616
616
  }
617
- .navigation details[open] > summary .icon {
617
+ .navigation details[open] > summary .docs-icon {
618
618
  transform: rotate(180deg) translateY(-5px);
619
619
  }
620
620
  .navigation details > ol {
@@ -631,7 +631,7 @@ main {
631
631
  #outline summary {
632
632
  display: flex;
633
633
  }
634
- #outline summary .icon {
634
+ #outline summary .docs-icon {
635
635
  display: none;
636
636
  }
637
637
  @media (width >= 1280px) {
@@ -654,13 +654,13 @@ main {
654
654
  width: fit-content;
655
655
  cursor: pointer;
656
656
  }
657
- #outline summary .icon {
657
+ #outline summary .docs-icon {
658
658
  display: block;
659
659
  transform: translateY(3px);
660
660
  transition: all 200ms cubic-bezier(0.46, 0.03, 0.52, 0.96) 0s;
661
661
  margin-left: 0.5rem;
662
662
  }
663
- #outline[open] > summary .icon {
663
+ #outline[open] > summary .docs-icon {
664
664
  transform: rotate(180deg) translateY(-5px);
665
665
  }
666
666
  }
@@ -606,7 +606,7 @@ main {
606
606
  background: var(--docs-navigation-hover-color);
607
607
  border-color: var(--docs-navigation-highlight-color);
608
608
  }
609
- .navigation summary .icon {
609
+ .navigation summary .docs-icon {
610
610
  transform: translateY(3px);
611
611
  transition: all 200ms cubic-bezier(0.46, 0.03, 0.52, 0.96) 0s;
612
612
  display: inline;
@@ -614,7 +614,7 @@ main {
614
614
  .navigation details[open] > summary {
615
615
  font-weight: 700;
616
616
  }
617
- .navigation details[open] > summary .icon {
617
+ .navigation details[open] > summary .docs-icon {
618
618
  transform: rotate(180deg) translateY(-5px);
619
619
  }
620
620
  .navigation details > ol {
@@ -631,7 +631,7 @@ main {
631
631
  #outline summary {
632
632
  display: flex;
633
633
  }
634
- #outline summary .icon {
634
+ #outline summary .docs-icon {
635
635
  display: none;
636
636
  }
637
637
  @media (width >= 1280px) {
@@ -654,13 +654,13 @@ main {
654
654
  width: fit-content;
655
655
  cursor: pointer;
656
656
  }
657
- #outline summary .icon {
657
+ #outline summary .docs-icon {
658
658
  display: block;
659
659
  transform: translateY(3px);
660
660
  transition: all 200ms cubic-bezier(0.46, 0.03, 0.52, 0.96) 0s;
661
661
  margin-left: 0.5rem;
662
662
  }
663
- #outline[open] > summary .icon {
663
+ #outline[open] > summary .docs-icon {
664
664
  transform: rotate(180deg) translateY(-5px);
665
665
  }
666
666
  }
@@ -1492,8 +1492,8 @@ textarea {
1492
1492
  margin: 0 0.4rem 0 0;
1493
1493
  width: 1.5rem;
1494
1494
  }
1495
- .docs-motd__icon .icon,
1496
- .docs-motd__icon .icon-stack {
1495
+ .docs-motd__icon .docs-icon,
1496
+ .docs-motd__icon .docs-icon-stack {
1497
1497
  height: 1.5rem;
1498
1498
  width: 1.5rem;
1499
1499
  }
@@ -314,8 +314,8 @@ textarea {
314
314
  margin: 0 0.4rem 0 0;
315
315
  width: 1.5rem;
316
316
  }
317
- .docs-motd__icon .icon,
318
- .docs-motd__icon .icon-stack {
317
+ .docs-motd__icon .docs-icon,
318
+ .docs-motd__icon .docs-icon-stack {
319
319
  height: 1.5rem;
320
320
  width: 1.5rem;
321
321
  }
@@ -44,12 +44,13 @@ var Gt$8=(n,t,e)=>{let s=n instanceof RegExp?ce$9(n,e):n,i=t instanceof RegExp?c
44
44
  globstar while`,t,d,e,f,m),this.matchOne(t.slice(d),e.slice(f),s))return this.debug("globstar found match!",d,a,m),true;if(m==="."||m===".."||!i.dot&&m.charAt(0)==="."){this.debug("dot detected!",t,d,e,f);break}this.debug("globstar swallow a segment, and continue"),d++;}return !!(s&&(this.debug(`
45
45
  >>> no match, partial?`,t,d,e,f),d===a))}let p;if(typeof u=="string"?(p=c===u,this.debug("string match",u,c,p)):(p=u.test(c),this.debug("pattern match",u,c,p)),!p)return false}if(o===a&&h===l)return true;if(o===a)return s;if(h===l)return o===a-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return ke$b(this.pattern,this.options)}parse(t){at$a(t);let e=this.options;if(t==="**")return A$7;if(t==="")return "";let s,i=null;(s=t.match(js$8))?i=e.dot?zs$7:Is$6:(s=t.match(Rs$8))?i=(e.nocase?e.dot?Ms$7:Ds$6:e.dot?Fs$8:Os$5)(s[1]):(s=t.match(Bs$9))?i=(e.nocase?e.dot?$s$8:Us$8:e.dot?Gs$7:Hs$8)(s):(s=t.match(Ns$5))?i=e.dot?Ls$6:_s$5:(s=t.match(Ws$7))&&(i=Ps$8);let r=Q$8.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;let t=this.set;if(!t.length)return this.regexp=false,this.regexp;let e=this.options,s=e.noglobstar?Vs$6:e.dot?Ys$8:Xs$7,i=new Set(e.nocase?["i"]:[]),r=t.map(a=>{let l=a.map(c=>{if(c instanceof RegExp)for(let d of c.flags.split(""))i.add(d);return typeof c=="string"?ei$9(c):c===A$7?A$7:c._src});l.forEach((c,d)=>{let f=l[d+1],m=l[d-1];c!==A$7||m===A$7||(m===void 0?f!==void 0&&f!==A$7?l[d+1]="(?:\\/|"+s+"\\/)?"+f:l[d]=s:f===void 0?l[d-1]=m+"(?:\\/|\\/"+s+")?":f!==A$7&&(l[d-1]=m+"(?:\\/|\\/"+s+"\\/)"+f,l[d+1]=A$7));});let u=l.filter(c=>c!==A$7);if(this.partial&&u.length>=1){let c=[];for(let d=1;d<=u.length;d++)c.push(u.slice(0,d).join("/"));return "(?:"+c.join("|")+")"}return u.join("/")}).join("|"),[o,h]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+h+"$",this.partial&&(r="^(?:\\/|"+o+r.slice(1,-1)+h+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""));}catch{this.regexp=false;}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return false;if(this.empty)return t==="";if(t==="/"&&e)return true;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let r=this.set;this.debug(this.pattern,"set",r);let o=i[i.length-1];if(!o)for(let h=i.length-2;!o&&h>=0;h--)o=i[h];for(let h=0;h<r.length;h++){let a=r[h],l=i;if(s.matchBase&&a.length===1&&(l=[o]),this.matchOne(l,a,e))return s.flipNegate?true:!this.negate}return s.flipNegate?false:this.negate}static defaults(t){return O$5.defaults(t).Minimatch}};O$5.AST=Q$8;O$5.Minimatch=D$4;O$5.escape=tt$a;O$5.unescape=W$9;var si$9=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Oe$a=new Set,Vt$9=typeof process=="object"&&process?process:{},Fe$9=(n,t,e,s)=>{typeof Vt$9.emitWarning=="function"?Vt$9.emitWarning(n,t,e,s):console.error(`[${e}] ${t}: ${n}`);},At$b=globalThis.AbortController,Re$a=globalThis.AbortSignal;if(typeof At$b>"u"){Re$a=class{onabort;_onabort=[];reason;aborted=false;addEventListener(e,s){this._onabort.push(s);}},At$b=class{constructor(){t();}signal=new Re$a;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=true;for(let s of this.signal._onabort)s(e);this.signal.onabort?.(e);}}};let n=Vt$9.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{n&&(n=false,Fe$9("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",t));};}var ii$9=n=>!Oe$a.has(n);var q$9=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),De$a=n=>q$9(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Tt$a:null:null,Tt$a=class Tt extends Array{constructor(n){super(n),this.fill(0);}},ri$9=class ct{heap;length;static#t=false;static create(t){let e=De$a(t);if(!e)return [];ct.#t=true;let s=new ct(t,e);return ct.#t=false,s}constructor(t,e){if(!ct.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0;}push(t){this.heap[this.length++]=t;}pop(){return this.heap[--this.length]}},ft$9=class Me{#t;#s;#n;#r;#o;#S;#w;#c;get perf(){return this.#c}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#h;#u;#f;#a;#i;#d;#E;#b;#p;#R;#m;#C;#T;#g;#y;#x;#A;#e;#_;static unsafeExposeInternals(t){return {starts:t.#T,ttls:t.#g,autopurgeTimers:t.#y,sizes:t.#C,keyMap:t.#f,keyList:t.#a,valList:t.#i,next:t.#d,prev:t.#E,get head(){return t.#b},get tail(){return t.#p},free:t.#R,isBackgroundFetch:e=>t.#l(e),backgroundFetch:(e,s,i,r)=>t.#U(e,s,i,r),moveToTail:e=>t.#W(e),indexes:e=>t.#F(e),rindexes:e=>t.#D(e),isStale:e=>t.#v(e)}}get max(){return this.#t}get maxSize(){return this.#s}get calculatedSize(){return this.#u}get size(){return this.#h}get fetchMethod(){return this.#S}get memoMethod(){return this.#w}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#o}constructor(t){let{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:h,allowStale:a,dispose:l,onInsert:u,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:f,maxSize:m=0,maxEntrySize:p=0,sizeCalculation:w,fetchMethod:g,memoMethod:S,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:z,ignoreFetchAbort:$,perf:J}=t;if(J!==void 0&&typeof J?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#c=J??si$9,e!==0&&!q$9(e))throw new TypeError("max option must be a nonnegative integer");let Z=e?De$a(e):Array;if(!Z)throw new Error("invalid max value: "+e);if(this.#t=e,this.#s=m,this.maxEntrySize=p||this.#s,this.sizeCalculation=w,this.sizeCalculation){if(!this.#s&&!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(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#w=S,g!==void 0&&typeof g!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#S=g,this.#A=!!g,this.#f=new Map,this.#a=new Array(e).fill(void 0),this.#i=new Array(e).fill(void 0),this.#d=new Z(e),this.#E=new Z(e),this.#b=0,this.#p=0,this.#R=ri$9.create(e),this.#h=0,this.#u=0,typeof l=="function"&&(this.#n=l),typeof u=="function"&&(this.#r=u),typeof c=="function"?(this.#o=c,this.#m=[]):(this.#o=void 0,this.#m=void 0),this.#x=!!this.#n,this.#_=!!this.#r,this.#e=!!this.#o,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!z,this.ignoreFetchAbort=!!$,this.maxEntrySize!==0){if(this.#s!==0&&!q$9(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!q$9(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#G();}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!h,this.ttlResolution=q$9(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!q$9(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M();}if(this.#t===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#s){let $t="LRU_CACHE_UNBOUNDED";ii$9($t)&&(Oe$a.add($t),Fe$9("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",$t,Me));}}getRemainingTTL(t){return this.#f.has(t)?1/0:0}#M(){let t=new Tt$a(this.#t),e=new Tt$a(this.#t);this.#g=t,this.#T=e;let s=this.ttlAutopurge?new Array(this.#t):void 0;this.#y=s,this.#j=(o,h,a=this.#c.now())=>{if(e[o]=h!==0?a:0,t[o]=h,s?.[o]&&(clearTimeout(s[o]),s[o]=void 0),h!==0&&s){let l=setTimeout(()=>{this.#v(o)&&this.#O(this.#a[o],"expire");},h+1);l.unref&&l.unref(),s[o]=l;}},this.#k=o=>{e[o]=t[o]!==0?this.#c.now():0;},this.#N=(o,h)=>{if(t[h]){let a=t[h],l=e[h];if(!a||!l)return;o.ttl=a,o.start=l,o.now=i||r();let u=o.now-l;o.remainingTTL=a-u;}};let i=0,r=()=>{let o=this.#c.now();if(this.ttlResolution>0){i=o;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref();}return o};this.getRemainingTTL=o=>{let h=this.#f.get(o);if(h===void 0)return 0;let a=t[h],l=e[h];if(!a||!l)return 1/0;let u=(i||r())-l;return a-u},this.#v=o=>{let h=e[o],a=t[o];return !!a&&!!h&&(i||r())-h>a};}#k=()=>{};#N=()=>{};#j=()=>{};#v=()=>false;#G(){let t=new Tt$a(this.#t);this.#u=0,this.#C=t,this.#P=e=>{this.#u-=t[e],t[e]=0;},this.#I=(e,s,i,r)=>{if(this.#l(s))return 0;if(!q$9(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(s,e),!q$9(i))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 i},this.#L=(e,s,i)=>{if(t[e]=s,this.#s){let r=this.#s-t[e];for(;this.#u>r;)this.#B(true);}this.#u+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#u);};}#P=t=>{};#L=(t,e,s)=>{};#I=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#F({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#p;!(!this.#z(e)||((t||!this.#v(e))&&(yield e),e===this.#b));)e=this.#E[e];}*#D({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#b;!(!this.#z(e)||((t||!this.#v(e))&&(yield e),e===this.#p));)e=this.#d[e];}#z(t){return t!==void 0&&this.#f.get(this.#a[t])===t}*entries(){for(let t of this.#F())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield [this.#a[t],this.#i[t]]);}*rentries(){for(let t of this.#D())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield [this.#a[t],this.#i[t]]);}*keys(){for(let t of this.#F()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e);}}*rkeys(){for(let t of this.#D()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e);}}*values(){for(let t of this.#F())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t]);}*rvalues(){for(let t of this.#D())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let s of this.#F()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;if(r!==void 0&&t(r,this.#a[s],this))return this.get(this.#a[s],e)}}forEach(t,e=this){for(let s of this.#F()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this);}}rforEach(t,e=this){for(let s of this.#D()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this);}}purgeStale(){let t=false;for(let e of this.#D({allowStale:true}))this.#v(e)&&(this.#O(this.#a[e],"expire"),t=true);return t}info(t){let e=this.#f.get(t);if(e===void 0)return;let s=this.#i[e],i=this.#l(s)?s.__staleWhileFetching:s;if(i===void 0)return;let r={value:i};if(this.#g&&this.#T){let o=this.#g[e],h=this.#T[e];if(o&&h){let a=o-(this.#c.now()-h);r.ttl=a,r.start=Date.now();}}return this.#C&&(r.size=this.#C[e]),r}dump(){let t=[];for(let e of this.#F({allowStale:true})){let s=this.#a[e],i=this.#i[e],r=this.#l(i)?i.__staleWhileFetching:i;if(r===void 0||s===void 0)continue;let o={value:r};if(this.#g&&this.#T){o.ttl=this.#g[e];let h=this.#c.now()-this.#T[e];o.start=Math.floor(Date.now()-h);}this.#C&&(o.size=this.#C[e]),t.unshift([s,o]);}return t}load(t){this.clear();for(let[e,s]of t){if(s.start){let i=Date.now()-s.start;s.start=this.#c.now()-i;}this.set(e,s.value,s);}}set(t,e,s={}){if(e===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:a}=s,{noUpdateTTL:l=this.noUpdateTTL}=s,u=this.#I(t,e,s.size||0,h);if(this.maxEntrySize&&u>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=true),this.#O(t,"set"),this;let c=this.#h===0?void 0:this.#f.get(t);if(c===void 0)c=this.#h===0?this.#p:this.#R.length!==0?this.#R.pop():this.#h===this.#t?this.#B(false):this.#h,this.#a[c]=t,this.#i[c]=e,this.#f.set(t,c),this.#d[this.#p]=c,this.#E[c]=this.#p,this.#p=c,this.#h++,this.#L(c,u,a),a&&(a.set="add"),l=false,this.#_&&this.#r?.(e,t,"add");else {this.#W(c);let d=this.#i[c];if(e!==d){if(this.#A&&this.#l(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=d;f!==void 0&&!o&&(this.#x&&this.#n?.(f,t,"set"),this.#e&&this.#m?.push([f,t,"set"]));}else o||(this.#x&&this.#n?.(d,t,"set"),this.#e&&this.#m?.push([d,t,"set"]));if(this.#P(c),this.#L(c,u,a),this.#i[c]=e,a){a.set="replace";let f=d&&this.#l(d)?d.__staleWhileFetching:d;f!==void 0&&(a.oldValue=f);}}else a&&(a.set="update");this.#_&&this.onInsert?.(e,t,e===d?"update":"replace");}if(i!==0&&!this.#g&&this.#M(),this.#g&&(l||this.#j(c,i,r),a&&this.#N(a,c)),!o&&this.#e&&this.#m){let d=this.#m,f;for(;f=d?.shift();)this.#o?.(...f);}return this}pop(){try{for(;this.#h;){let t=this.#i[this.#b];if(this.#B(!0),this.#l(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#e&&this.#m){let t=this.#m,e;for(;e=t?.shift();)this.#o?.(...e);}}}#B(t){let e=this.#b,s=this.#a[e],i=this.#i[e];return this.#A&&this.#l(i)?i.__abortController.abort(new Error("evicted")):(this.#x||this.#e)&&(this.#x&&this.#n?.(i,s,"evict"),this.#e&&this.#m?.push([i,s,"evict"])),this.#P(e),this.#y?.[e]&&(clearTimeout(this.#y[e]),this.#y[e]=void 0),t&&(this.#a[e]=void 0,this.#i[e]=void 0,this.#R.push(e)),this.#h===1?(this.#b=this.#p=0,this.#R.length=0):this.#b=this.#d[e],this.#f.delete(s),this.#h--,e}has(t,e={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#f.get(t);if(r!==void 0){let o=this.#i[r];if(this.#l(o)&&o.__staleWhileFetching===void 0)return false;if(this.#v(r))i&&(i.has="stale",this.#N(i,r));else return s&&this.#k(r),i&&(i.has="hit",this.#N(i,r)),true}else i&&(i.has="miss");return false}peek(t,e={}){let{allowStale:s=this.allowStale}=e,i=this.#f.get(t);if(i===void 0||!s&&this.#v(i))return;let r=this.#i[i];return this.#l(r)?r.__staleWhileFetching:r}#U(t,e,s,i){let r=e===void 0?void 0:this.#i[e];if(this.#l(r))return r;let o=new At$b,{signal:h}=s;h?.addEventListener("abort",()=>o.abort(h.reason),{signal:o.signal});let a={signal:o.signal,options:s,context:i},l=(p,w=false)=>{let{aborted:g}=o.signal,S=s.ignoreFetchAbort&&p!==void 0,E=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&p!==void 0);if(s.status&&(g&&!w?(s.status.fetchAborted=true,s.status.fetchError=o.signal.reason,S&&(s.status.fetchAbortIgnored=true)):s.status.fetchResolved=true),g&&!S&&!w)return c(o.signal.reason,E);let y=f,b=this.#i[e];return (b===f||S&&w&&b===void 0)&&(p===void 0?y.__staleWhileFetching!==void 0?this.#i[e]=y.__staleWhileFetching:this.#O(t,"fetch"):(s.status&&(s.status.fetchUpdated=true),this.set(t,p,a.options))),p},u=p=>(s.status&&(s.status.fetchRejected=true,s.status.fetchError=p),c(p,false)),c=(p,w)=>{let{aborted:g}=o.signal,S=g&&s.allowStaleOnFetchAbort,E=S||s.allowStaleOnFetchRejection,y=E||s.noDeleteOnFetchRejection,b=f;if(this.#i[e]===f&&(!y||!w&&b.__staleWhileFetching===void 0?this.#O(t,"fetch"):S||(this.#i[e]=b.__staleWhileFetching)),E)return s.status&&b.__staleWhileFetching!==void 0&&(s.status.returnedStale=true),b.__staleWhileFetching;if(b.__returned===b)throw p},d=(p,w)=>{let g=this.#S?.(t,r,a);g&&g instanceof Promise&&g.then(S=>p(S===void 0?void 0:S),w),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(p(void 0),s.allowStaleOnFetchAbort&&(p=S=>l(S,true)));});};s.status&&(s.status.fetchDispatched=true);let f=new Promise(d).then(l,u),m=Object.assign(f,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,m,{...a.options,status:void 0}),e=this.#f.get(t)):this.#i[e]=m,m}#l(t){if(!this.#A)return false;let e=t;return !!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof At$b}async fetch(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:p,forceRefresh:w=false,status:g,signal:S}=e;if(!this.#A)return g&&(g.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:g});let E={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:h,size:a,sizeCalculation:l,noUpdateTTL:u,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:f,status:g,signal:S},y=this.#f.get(t);if(y===void 0){g&&(g.fetch="miss");let b=this.#U(t,y,E,p);return b.__returned=b}else {let b=this.#i[y];if(this.#l(b)){let Z=s&&b.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",Z&&(g.returnedStale=true)),Z?b.__staleWhileFetching:b.__returned=b}let z=this.#v(y);if(!w&&!z)return g&&(g.fetch="hit"),this.#W(y),i&&this.#k(y),g&&this.#N(g,y),b;let $=this.#U(t,y,E,p),J=$.__staleWhileFetching!==void 0&&s;return g&&(g.fetch=z?"stale":"refresh",J&&z&&(g.returnedStale=true)),J?$.__staleWhileFetching:$.__returned=$}}async forceFetch(t,e={}){let s=await this.fetch(t,e);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(t,e={}){let s=this.#w;if(!s)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:r,...o}=e,h=this.get(t,o);if(!r&&h!==void 0)return h;let a=s(t,h,{options:o,context:i});return this.set(t,a,o),a}get(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,h=this.#f.get(t);if(h!==void 0){let a=this.#i[h],l=this.#l(a);return o&&this.#N(o,h),this.#v(h)?(o&&(o.get="stale"),l?(o&&s&&a.__staleWhileFetching!==void 0&&(o.returnedStale=true),s?a.__staleWhileFetching:void 0):(r||this.#O(t,"expire"),o&&s&&(o.returnedStale=true),s?a:void 0)):(o&&(o.get="hit"),l?a.__staleWhileFetching:(this.#W(h),i&&this.#k(h),a))}else o&&(o.get="miss");}#$(t,e){this.#E[e]=t,this.#d[t]=e;}#W(t){t!==this.#p&&(t===this.#b?this.#b=this.#d[t]:this.#$(this.#E[t],this.#d[t]),this.#$(this.#p,t),this.#p=t);}delete(t){return this.#O(t,"delete")}#O(t,e){let s=false;if(this.#h!==0){let i=this.#f.get(t);if(i!==void 0)if(this.#y?.[i]&&(clearTimeout(this.#y?.[i]),this.#y[i]=void 0),s=true,this.#h===1)this.#H(e);else {this.#P(i);let r=this.#i[i];if(this.#l(r)?r.__abortController.abort(new Error("deleted")):(this.#x||this.#e)&&(this.#x&&this.#n?.(r,t,e),this.#e&&this.#m?.push([r,t,e])),this.#f.delete(t),this.#a[i]=void 0,this.#i[i]=void 0,i===this.#p)this.#p=this.#E[i];else if(i===this.#b)this.#b=this.#d[i];else {let o=this.#E[i];this.#d[o]=this.#d[i];let h=this.#d[i];this.#E[h]=this.#E[i];}this.#h--,this.#R.push(i);}}if(this.#e&&this.#m?.length){let i=this.#m,r;for(;r=i?.shift();)this.#o?.(...r);}return s}clear(){return this.#H("delete")}#H(t){for(let e of this.#D({allowStale:true})){let s=this.#i[e];if(this.#l(s))s.__abortController.abort(new Error("deleted"));else {let i=this.#a[e];this.#x&&this.#n?.(s,i,t),this.#e&&this.#m?.push([s,i,t]);}}if(this.#f.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#g&&this.#T){this.#g.fill(0),this.#T.fill(0);for(let e of this.#y??[])e!==void 0&&clearTimeout(e);this.#y?.fill(void 0);}if(this.#C&&this.#C.fill(0),this.#b=0,this.#p=0,this.#R.length=0,this.#u=0,this.#h=0,this.#e&&this.#m){let e=this.#m,s;for(;s=e?.shift();)this.#o?.(...s);}}};var Ne$9=typeof process=="object"&&process?process:{stdout:null,stderr:null},oi$9=n=>!!n&&typeof n=="object"&&(n instanceof V$b||n instanceof Pe$9||hi$9(n)||ai$9(n)),hi$9=n=>!!n&&typeof n=="object"&&n instanceof EventEmitter$1&&typeof n.pipe=="function"&&n.pipe!==Pe$9.Writable.prototype.pipe,ai$9=n=>!!n&&typeof n=="object"&&n instanceof EventEmitter$1&&typeof n.write=="function"&&typeof n.end=="function",G$9=Symbol("EOF"),H$9=Symbol("maybeEmitEnd"),K$a=Symbol("emittedEnd"),kt$a=Symbol("emittingEnd"),ut$9=Symbol("emittedError"),Rt$a=Symbol("closed"),_e$a=Symbol("read"),Ot$b=Symbol("flush"),Le$a=Symbol("flushChunk"),P$8=Symbol("encoding"),et$9=Symbol("decoder"),v$7=Symbol("flowing"),dt$8=Symbol("paused"),st$7=Symbol("resume"),C$6=Symbol("buffer"),F$9=Symbol("pipes"),T$4=Symbol("bufferLength"),Yt$8=Symbol("bufferPush"),Ft$a=Symbol("bufferShift"),k$6=Symbol("objectMode"),x$6=Symbol("destroyed"),Xt$a=Symbol("error"),Jt$9=Symbol("emitData"),We$a=Symbol("emitEnd"),Zt$a=Symbol("emitEnd2"),B$7=Symbol("async"),Qt$9=Symbol("abort"),Dt$9=Symbol("aborted"),pt$8=Symbol("signal"),Y$6=Symbol("dataListeners"),M$9=Symbol("discarded"),mt$9=n=>Promise.resolve().then(n),li$9=n=>n(),ci$8=n=>n==="end"||n==="finish"||n==="prefinish",fi$9=n=>n instanceof ArrayBuffer||!!n&&typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,ui$9=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n),Mt$b=class Mt{src;dest;opts;ondrain;constructor(t,e,s){this.src=t,this.dest=e,this.opts=s,this.ondrain=()=>t[st$7](),this.dest.on("drain",this.ondrain);}unpipe(){this.dest.removeListener("drain",this.ondrain);}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end();}},te$b=class te extends Mt$b{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe();}constructor(t,e,s){super(t,e,s),this.proxyErrors=i=>this.dest.emit("error",i),t.on("error",this.proxyErrors);}},di$9=n=>!!n.objectMode,pi$9=n=>!n.objectMode&&!!n.encoding&&n.encoding!=="buffer",V$b=class V extends EventEmitter$1{[v$7]=false;[dt$8]=false;[F$9]=[];[C$6]=[];[k$6];[P$8];[B$7];[et$9];[G$9]=false;[K$a]=false;[kt$a]=false;[Rt$a]=false;[ut$9]=null;[T$4]=0;[x$6]=false;[pt$8];[Dt$9]=false;[Y$6]=0;[M$9]=false;writable=true;readable=true;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");di$9(e)?(this[k$6]=true,this[P$8]=null):pi$9(e)?(this[P$8]=e.encoding,this[k$6]=false):(this[k$6]=false,this[P$8]=null),this[B$7]=!!e.async,this[et$9]=this[P$8]?new StringDecoder(this[P$8]):null,e&&e.debugExposeBuffer===true&&Object.defineProperty(this,"buffer",{get:()=>this[C$6]}),e&&e.debugExposePipes===true&&Object.defineProperty(this,"pipes",{get:()=>this[F$9]});let{signal:s}=e;s&&(this[pt$8]=s,s.aborted?this[Qt$9]():s.addEventListener("abort",()=>this[Qt$9]()));}get bufferLength(){return this[T$4]}get encoding(){return this[P$8]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[k$6]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[B$7]}set async(t){this[B$7]=this[B$7]||!!t;}[Qt$9](){this[Dt$9]=true,this.emit("abort",this[pt$8]?.reason),this.destroy(this[pt$8]?.reason);}get aborted(){return this[Dt$9]}set aborted(t){}write(t,e,s){if(this[Dt$9])return false;if(this[G$9])throw new Error("write after end");if(this[x$6])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),true;typeof e=="function"&&(s=e,e="utf8"),e||(e="utf8");let i=this[B$7]?mt$9:li$9;if(!this[k$6]&&!Buffer.isBuffer(t)){if(ui$9(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(fi$9(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[k$6]?(this[v$7]&&this[T$4]!==0&&this[Ot$b](true),this[v$7]?this.emit("data",t):this[Yt$8](t),this[T$4]!==0&&this.emit("readable"),s&&i(s),this[v$7]):t.length?(typeof t=="string"&&!(e===this[P$8]&&!this[et$9]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[P$8]&&(t=this[et$9].write(t)),this[v$7]&&this[T$4]!==0&&this[Ot$b](true),this[v$7]?this.emit("data",t):this[Yt$8](t),this[T$4]!==0&&this.emit("readable"),s&&i(s),this[v$7]):(this[T$4]!==0&&this.emit("readable"),s&&i(s),this[v$7])}read(t){if(this[x$6])return null;if(this[M$9]=false,this[T$4]===0||t===0||t&&t>this[T$4])return this[H$9](),null;this[k$6]&&(t=null),this[C$6].length>1&&!this[k$6]&&(this[C$6]=[this[P$8]?this[C$6].join(""):Buffer.concat(this[C$6],this[T$4])]);let e=this[_e$a](t||null,this[C$6][0]);return this[H$9](),e}[_e$a](t,e){if(this[k$6])this[Ft$a]();else {let s=e;t===s.length||t===null?this[Ft$a]():typeof s=="string"?(this[C$6][0]=s.slice(t),e=s.slice(0,t),this[T$4]-=t):(this[C$6][0]=s.subarray(t),e=s.subarray(0,t),this[T$4]-=t);}return this.emit("data",e),!this[C$6].length&&!this[G$9]&&this.emit("drain"),e}end(t,e,s){return typeof t=="function"&&(s=t,t=void 0),typeof e=="function"&&(s=e,e="utf8"),t!==void 0&&this.write(t,e),s&&this.once("end",s),this[G$9]=true,this.writable=false,(this[v$7]||!this[dt$8])&&this[H$9](),this}[st$7](){this[x$6]||(!this[Y$6]&&!this[F$9].length&&(this[M$9]=true),this[dt$8]=false,this[v$7]=true,this.emit("resume"),this[C$6].length?this[Ot$b]():this[G$9]?this[H$9]():this.emit("drain"));}resume(){return this[st$7]()}pause(){this[v$7]=false,this[dt$8]=true,this[M$9]=false;}get destroyed(){return this[x$6]}get flowing(){return this[v$7]}get paused(){return this[dt$8]}[Yt$8](t){this[k$6]?this[T$4]+=1:this[T$4]+=t.length,this[C$6].push(t);}[Ft$a](){return this[k$6]?this[T$4]-=1:this[T$4]-=this[C$6][0].length,this[C$6].shift()}[Ot$b](t=false){do;while(this[Le$a](this[Ft$a]())&&this[C$6].length);!t&&!this[C$6].length&&!this[G$9]&&this.emit("drain");}[Le$a](t){return this.emit("data",t),this[v$7]}pipe(t,e){if(this[x$6])return t;this[M$9]=false;let s=this[K$a];return e=e||{},t===Ne$9.stdout||t===Ne$9.stderr?e.end=false:e.end=e.end!==false,e.proxyErrors=!!e.proxyErrors,s?e.end&&t.end():(this[F$9].push(e.proxyErrors?new te$b(this,t,e):new Mt$b(this,t,e)),this[B$7]?mt$9(()=>this[st$7]()):this[st$7]()),t}unpipe(t){let e=this[F$9].find(s=>s.dest===t);e&&(this[F$9].length===1?(this[v$7]&&this[Y$6]===0&&(this[v$7]=false),this[F$9]=[]):this[F$9].splice(this[F$9].indexOf(e),1),e.unpipe());}addListener(t,e){return this.on(t,e)}on(t,e){let s=super.on(t,e);if(t==="data")this[M$9]=false,this[Y$6]++,!this[F$9].length&&!this[v$7]&&this[st$7]();else if(t==="readable"&&this[T$4]!==0)super.emit("readable");else if(ci$8(t)&&this[K$a])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[ut$9]){let i=e;this[B$7]?mt$9(()=>i.call(this,this[ut$9])):i.call(this,this[ut$9]);}return s}removeListener(t,e){return this.off(t,e)}off(t,e){let s=super.off(t,e);return t==="data"&&(this[Y$6]=this.listeners("data").length,this[Y$6]===0&&!this[M$9]&&!this[F$9].length&&(this[v$7]=false)),s}removeAllListeners(t){let e=super.removeAllListeners(t);return (t==="data"||t===void 0)&&(this[Y$6]=0,!this[M$9]&&!this[F$9].length&&(this[v$7]=false)),e}get emittedEnd(){return this[K$a]}[H$9](){!this[kt$a]&&!this[K$a]&&!this[x$6]&&this[C$6].length===0&&this[G$9]&&(this[kt$a]=true,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Rt$a]&&this.emit("close"),this[kt$a]=false);}emit(t,...e){let s=e[0];if(t!=="error"&&t!=="close"&&t!==x$6&&this[x$6])return false;if(t==="data")return !this[k$6]&&!s?false:this[B$7]?(mt$9(()=>this[Jt$9](s)),true):this[Jt$9](s);if(t==="end")return this[We$a]();if(t==="close"){if(this[Rt$a]=true,!this[K$a]&&!this[x$6])return false;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(t==="error"){this[ut$9]=s,super.emit(Xt$a,s);let r=!this[pt$8]||this.listeners("error").length?super.emit("error",s):false;return this[H$9](),r}else if(t==="resume"){let r=super.emit("resume");return this[H$9](),r}else if(t==="finish"||t==="prefinish"){let r=super.emit(t);return this.removeAllListeners(t),r}let i=super.emit(t,...e);return this[H$9](),i}[Jt$9](t){for(let s of this[F$9])s.dest.write(t)===false&&this.pause();let e=this[M$9]?false:super.emit("data",t);return this[H$9](),e}[We$a](){return this[K$a]?false:(this[K$a]=true,this.readable=false,this[B$7]?(mt$9(()=>this[Zt$a]()),true):this[Zt$a]())}[Zt$a](){if(this[et$9]){let e=this[et$9].end();if(e){for(let s of this[F$9])s.dest.write(e);this[M$9]||super.emit("data",e);}}for(let e of this[F$9])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[k$6]||(t.dataLength=0);let e=this.promise();return this.on("data",s=>{t.push(s),this[k$6]||(t.dataLength+=s.length);}),await e,t}async concat(){if(this[k$6])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[P$8]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(x$6,()=>e(new Error("stream destroyed"))),this.on("error",s=>e(s)),this.on("end",()=>t());})}[Symbol.asyncIterator](){this[M$9]=false;let t=false,e=async()=>(this.pause(),t=true,{value:void 0,done:true});return {next:()=>{if(t)return e();let i=this.read();if(i!==null)return Promise.resolve({done:false,value:i});if(this[G$9])return e();let r,o,h=c=>{this.off("data",a),this.off("end",l),this.off(x$6,u),e(),o(c);},a=c=>{this.off("error",h),this.off("end",l),this.off(x$6,u),this.pause(),r({value:c,done:!!this[G$9]});},l=()=>{this.off("error",h),this.off("data",a),this.off(x$6,u),e(),r({done:true,value:void 0});},u=()=>h(new Error("stream destroyed"));return new Promise((c,d)=>{o=d,r=c,this.once(x$6,u),this.once("error",h),this.once("end",l),this.once("data",a);})},throw:e,return:e,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[M$9]=false;let t=false,e=()=>(this.pause(),this.off(Xt$a,e),this.off(x$6,e),this.off("end",e),t=true,{done:true,value:void 0}),s=()=>{if(t)return e();let i=this.read();return i===null?e():{done:false,value:i}};return this.once("end",e),this.once(Xt$a,e),this.once(x$6,e),{next:s,throw:e,return:e,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(t){if(this[x$6])return t?this.emit("error",t):this.emit(x$6),this;this[x$6]=true,this[M$9]=true,this[C$6].length=0,this[T$4]=0;let e=this;return typeof e.close=="function"&&!this[Rt$a]&&e.close(),t?this.emit("error",t):this.emit(x$6),this}static get isStream(){return oi$9}};var vi$9=realpathSync.native,wt$a={lstatSync:lstatSync,readdir:readdir$1,readdirSync:readdirSync,readlinkSync:readlinkSync,realpathSync:vi$9,promises:{lstat:lstat,readdir:readdir,readlink:readlink,realpath:realpath}},Ue$a=n=>!n||n===wt$a||n===fs$8?wt$a:{...wt$a,...n,promises:{...wt$a.promises,...n.promises||{}}},$e$a=/^\\\\\?\\([a-z]:)\\?$/i,Ri$6=n=>n.replace(/\//g,"\\").replace($e$a,"$1\\"),Oi$8=/[\\\/]/,L$8=0,Ge$b=1,He$a=2,U$8=4,qe$9=6,Ke$b=8,X$a=10,Ve$9=12,_$8=15,gt$9=~_$8,se$b=16,je$a=32,yt$9=64,j$8=128,Nt$b=256,Lt$9=512,Ie$a=yt$9|j$8|Lt$9,Fi$7=1023,ie$a=n=>n.isFile()?Ke$b:n.isDirectory()?U$8:n.isSymbolicLink()?X$a:n.isCharacterDevice()?He$a:n.isBlockDevice()?qe$9:n.isSocket()?Ve$9:n.isFIFO()?Ge$b:L$8,ze$a=new ft$9({max:2**12}),bt$c=n=>{let t=ze$a.get(n);if(t)return t;let e=n.normalize("NFKD");return ze$a.set(n,e),e},Be$8=new ft$9({max:2**12}),_t$9=n=>{let t=Be$8.get(n);if(t)return t;let e=bt$c(n.toLowerCase());return Be$8.set(n,e),e},Wt$9=class Wt extends ft$9{constructor(){super({max:256});}},ne$8=class ne extends ft$9{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1});}},Ye$9=Symbol("PathScurry setAsCwd"),R$9=class R{name;root;roots;parent;nocase;isCWD=false;#t;#s;get dev(){return this.#s}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#o;get uid(){return this.#o}#S;get gid(){return this.#S}#w;get rdev(){return this.#w}#c;get blksize(){return this.#c}#h;get ino(){return this.#h}#u;get size(){return this.#u}#f;get blocks(){return this.#f}#a;get atimeMs(){return this.#a}#i;get mtimeMs(){return this.#i}#d;get ctimeMs(){return this.#d}#E;get birthtimeMs(){return this.#E}#b;get atime(){return this.#b}#p;get mtime(){return this.#p}#R;get ctime(){return this.#R}#m;get birthtime(){return this.#m}#C;#T;#g;#y;#x;#A;#e;#_;#M;#k;get parentPath(){return (this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=L$8,s,i,r,o,h){this.name=t,this.#C=r?_t$9(t):bt$c(t),this.#e=e&Fi$7,this.nocase=r,this.roots=i,this.root=s||this,this.#_=o,this.#g=h.fullpath,this.#x=h.relative,this.#A=h.relativePosix,this.parent=h.parent,this.parent?this.#t=this.parent.#t:this.#t=Ue$a(h.fs);}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#_}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#N(i):this.#N(i)}#N(t){let e=this;for(let s of t)e=e.child(s);return e}children(){let t=this.#_.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#_.set(this,e),this.#e&=~se$b,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let s=this.children(),i=this.nocase?_t$9(t):bt$c(t);for(let a of s)if(a.#C===i)return a;let r=this.parent?this.sep:"",o=this.#g?this.#g+r+t:void 0,h=this.newChild(t,L$8,{...e,parent:this,fullpath:o});return this.canReaddir()||(h.#e|=j$8),s.push(h),h}relative(){if(this.isCWD)return "";if(this.#x!==void 0)return this.#x;let t=this.name,e=this.parent;if(!e)return this.#x=this.name;let s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return "";if(this.#A!==void 0)return this.#A;let t=this.name,e=this.parent;if(!e)return this.#A=this.fullpathPosix();let s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#g!==void 0)return this.#g;let t=this.name,e=this.parent;if(!e)return this.#g=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#g=i}fullpathPosix(){if(this.#y!==void 0)return this.#y;if(this.sep==="/")return this.#y=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return /^[a-z]:\//i.test(i)?this.#y=`//?/${i}`:this.#y=i}let t=this.parent,e=t.fullpathPosix(),s=e+(!e||!t.parent?"":"/")+this.name;return this.#y=s}isUnknown(){return (this.#e&_$8)===L$8}isType(t){return this[`is${t}`]()}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.#e&_$8)===Ke$b}isDirectory(){return (this.#e&_$8)===U$8}isCharacterDevice(){return (this.#e&_$8)===He$a}isBlockDevice(){return (this.#e&_$8)===qe$9}isFIFO(){return (this.#e&_$8)===Ge$b}isSocket(){return (this.#e&_$8)===Ve$9}isSymbolicLink(){return (this.#e&X$a)===X$a}lstatCached(){return this.#e&je$a?this:void 0}readlinkCached(){return this.#M}realpathCached(){return this.#k}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#M)return true;if(!this.parent)return false;let t=this.#e&_$8;return !(t!==L$8&&t!==X$a||this.#e&Nt$b||this.#e&j$8)}calledReaddir(){return !!(this.#e&se$b)}isENOENT(){return !!(this.#e&j$8)}isNamed(t){return this.nocase?this.#C===_t$9(t):this.#C===bt$c(t)}async readlink(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),s=(await this.parent.realpath())?.resolve(e);if(s)return this.#M=s}catch(e){this.#D(e.code);return}}readlinkSync(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),s=this.parent.realpathSync()?.resolve(e);if(s)return this.#M=s}catch(e){this.#D(e.code);return}}#j(t){this.#e|=se$b;for(let e=t.provisional;e<t.length;e++){let s=t[e];s&&s.#v();}}#v(){this.#e&j$8||(this.#e=(this.#e|j$8)&gt$9,this.#G());}#G(){let t=this.children();t.provisional=0;for(let e of t)e.#v();}#P(){this.#e|=Lt$9,this.#L();}#L(){if(this.#e&yt$9)return;let t=this.#e;(t&_$8)===U$8&&(t&=gt$9),this.#e=t|yt$9,this.#G();}#I(t=""){t==="ENOTDIR"||t==="EPERM"?this.#L():t==="ENOENT"?this.#v():this.children().provisional=0;}#F(t=""){t==="ENOTDIR"?this.parent.#L():t==="ENOENT"&&this.#v();}#D(t=""){let e=this.#e;e|=Nt$b,t==="ENOENT"&&(e|=j$8),(t==="EINVAL"||t==="UNKNOWN")&&(e&=gt$9),this.#e=e,t==="ENOTDIR"&&this.parent&&this.parent.#L();}#z(t,e){return this.#U(t,e)||this.#B(t,e)}#B(t,e){let s=ie$a(t),i=this.newChild(t.name,s,{parent:this}),r=i.#e&_$8;return r!==U$8&&r!==X$a&&r!==L$8&&(i.#e|=yt$9),e.unshift(i),e.provisional++,i}#U(t,e){for(let s=e.provisional;s<e.length;s++){let i=e[s];if((this.nocase?_t$9(t.name):bt$c(t.name))===i.#C)return this.#l(t,i,s,e)}}#l(t,e,s,i){let r=e.name;return e.#e=e.#e&gt$9|ie$a(t),r!==t.name&&(e.name=t.name),s!==i.provisional&&(s===i.length-1?i.pop():i.splice(s,1),i.unshift(e)),i.provisional++,e}async lstat(){if((this.#e&j$8)===0)try{return this.#$(await this.#t.promises.lstat(this.fullpath())),this}catch(t){this.#F(t.code);}}lstatSync(){if((this.#e&j$8)===0)try{return this.#$(this.#t.lstatSync(this.fullpath())),this}catch(t){this.#F(t.code);}}#$(t){let{atime:e,atimeMs:s,birthtime:i,birthtimeMs:r,blksize:o,blocks:h,ctime:a,ctimeMs:l,dev:u,gid:c,ino:d,mode:f,mtime:m,mtimeMs:p,nlink:w,rdev:g,size:S,uid:E}=t;this.#b=e,this.#a=s,this.#m=i,this.#E=r,this.#c=o,this.#f=h,this.#R=a,this.#d=l,this.#s=u,this.#S=c,this.#h=d,this.#n=f,this.#p=m,this.#i=p,this.#r=w,this.#w=g,this.#u=S,this.#o=E;let y=ie$a(t);this.#e=this.#e&gt$9|y|je$a,y!==L$8&&y!==U$8&&y!==X$a&&(this.#e|=yt$9);}#W=[];#O=false;#H(t){this.#O=false;let e=this.#W.slice();this.#W.length=0,e.forEach(s=>s(null,t));}readdirCB(t,e=false){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let s=this.children();if(this.calledReaddir()){let r=s.slice(0,s.provisional);e?t(null,r):queueMicrotask(()=>t(null,r));return}if(this.#W.push(t),this.#O)return;this.#O=true;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:true},(r,o)=>{if(r)this.#I(r.code),s.provisional=0;else {for(let h of o)this.#z(h,s);this.#j(s);}this.#H(s.slice(0,s.provisional));});}#q;async readdir(){if(!this.canReaddir())return [];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#q)await this.#q;else {let s=()=>{};this.#q=new Promise(i=>s=i);try{for(let i of await this.#t.promises.readdir(e,{withFileTypes:!0}))this.#z(i,t);this.#j(t);}catch(i){this.#I(i.code),t.provisional=0;}this.#q=void 0,s();}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return [];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let s of this.#t.readdirSync(e,{withFileTypes:!0}))this.#z(s,t);this.#j(t);}catch(s){this.#I(s.code),t.provisional=0;}return t.slice(0,t.provisional)}canReaddir(){if(this.#e&Ie$a)return false;let t=_$8&this.#e;return t===L$8||t===U$8||t===X$a}shouldWalk(t,e){return (this.#e&U$8)===U$8&&!(this.#e&Ie$a)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#k)return this.#k;if(!((Lt$9|Nt$b|j$8)&this.#e))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#k=this.resolve(t)}catch{this.#P();}}realpathSync(){if(this.#k)return this.#k;if(!((Lt$9|Nt$b|j$8)&this.#e))try{let t=this.#t.realpathSync(this.fullpath());return this.#k=this.resolve(t)}catch{this.#P();}}[Ye$9](t){if(t===this)return;t.isCWD=false,this.isCWD=true;let e=new Set([]),s=[],i=this;for(;i&&i.parent;)e.add(i),i.#x=s.join(this.sep),i.#A=s.join("/"),i=i.parent,s.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#x=void 0,i.#A=void 0,i=i.parent;}},Pt$b=class n extends R$9{sep="\\";splitSep=Oi$8;constructor(t,e=L$8,s,i,r,o,h){super(t,e,s,i,r,o,h);}newChild(t,e=L$8,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return win32.parse(t).root}getRoot(t){if(t=Ri$6(t.toUpperCase()),t===this.root.name)return this.root;for(let[e,s]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=s;return this.roots[t]=new it$8(t,this).root}sameRoot(t,e=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace($e$a,"$1\\"),t===e}},jt$8=class n extends R$9{splitSep="/";sep="/";constructor(t,e=L$8,s,i,r,o,h){super(t,e,s,i,r,o,h);}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=L$8,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}},It$a=class It{root;rootPath;roots;cwd;#t;#s;#n;nocase;#r;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:o=wt$a}={}){this.#r=Ue$a(o),(t instanceof URL||t.startsWith("file://"))&&(t=fileURLToPath(t));let h=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(h),this.#t=new Wt$9,this.#s=new Wt$9,this.#n=new ne$8(r);let a=h.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]&&a.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,u=a.length-1,c=e.sep,d=this.rootPath,f=false;for(let m of a){let p=u--;l=l.child(m,{relative:new Array(p).fill("..").join(c),relativePosix:new Array(p).fill("..").join("/"),fullpath:d+=(f?"":c)+m}),f=true;}this.cwd=l;}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#t.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpath();return this.#t.set(e,i),i}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#s.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpathPosix();return this.#s.set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:true}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s}=e;if(t.canReaddir()){let i=await t.readdir();return s?i:i.map(r=>r.name)}else return []}readdirSync(t=this.cwd,e={withFileTypes:true}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true}=e;return t.canReaddir()?s?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t.withFileTypes,t=this.cwd);let s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t.withFileTypes,t=this.cwd);let s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t.withFileTypes,t=this.cwd);let s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t.withFileTypes,t=this.cwd);let s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set,l=(c,d)=>{a.add(c),c.readdirCB((f,m)=>{if(f)return d(f);let p=m.length;if(!p)return d();let w=()=>{--p===0&&d();};for(let g of m)(!r||r(g))&&h.push(s?g:g.fullpath()),i&&g.isSymbolicLink()?g.realpath().then(S=>S?.isUnknown()?S.lstat():S).then(S=>S?.shouldWalk(a,o)?l(S,w):w()):g.shouldWalk(a,o)?l(g,w):w();},true);},u=t;return new Promise((c,d)=>{l(u,f=>{if(f)return d(f);c(h);});})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set([t]);for(let l of a){let u=l.readdirSync();for(let c of u){(!r||r(c))&&h.push(s?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(i&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync();}d.shouldWalk(a,o)&&a.add(d);}}return h}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:o}=e;(!r||r(t))&&(yield s?t:t.fullpath());let h=new Set([t]);for(let a of h){let l=a.readdirSync();for(let u of l){(!r||r(u))&&(yield s?u:u.fullpath());let c=u;if(u.isSymbolicLink()){if(!(i&&(c=u.realpathSync())))continue;c.isUnknown()&&c.lstatSync();}c.shouldWalk(h,o)&&h.add(c);}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:o}=e,h=new V$b({objectMode:true});(!r||r(t))&&h.write(s?t:t.fullpath());let a=new Set,l=[t],u=0,c=()=>{let d=false;for(;!d;){let f=l.shift();if(!f){u===0&&h.end();return}u++,a.add(f);let m=(w,g,S=false)=>{if(w)return h.emit("error",w);if(i&&!S){let E=[];for(let y of g)y.isSymbolicLink()&&E.push(y.realpath().then(b=>b?.isUnknown()?b.lstat():b));if(E.length){Promise.all(E).then(()=>m(null,g,true));return}}for(let E of g)E&&(!r||r(E))&&(h.write(s?E:E.fullpath())||(d=true));u--;for(let E of g){let y=E.realpathCached()||E;y.shouldWalk(a,o)&&l.push(y);}d&&!h.flowing?h.once("drain",c):p||c();},p=true;f.readdirCB(m,true),p=false;}};return c(),h}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R$9||(e=t,t=this.cwd);let{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:o}=e,h=new V$b({objectMode:true}),a=new Set;(!r||r(t))&&h.write(s?t:t.fullpath());let l=[t],u=0,c=()=>{let d=false;for(;!d;){let f=l.shift();if(!f){u===0&&h.end();return}u++,a.add(f);let m=f.readdirSync();for(let p of m)(!r||r(p))&&(h.write(s?p:p.fullpath())||(d=true));u--;for(let p of m){let w=p;if(p.isSymbolicLink()){if(!(i&&(w=p.realpathSync())))continue;w.isUnknown()&&w.lstatSync();}w.shouldWalk(a,o)&&l.push(w);}}d&&!h.flowing&&h.once("drain",c);};return c(),h}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[Ye$9](e);}},it$8=class it extends It$a{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:s=true}=e;super(t,win32,"\\",{...e,nocase:s}),this.nocase=s;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase;}parseRootPath(t){return win32.parse(t).root.toUpperCase()}newRoot(t){return new Pt$b(this.rootPath,U$8,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}},rt$b=class rt extends It$a{sep="/";constructor(t=process.cwd(),e={}){let{nocase:s=false}=e;super(t,posix,"/",{...e,nocase:s}),this.nocase=s;}parseRootPath(t){return "/"}newRoot(t){return new jt$8(this.rootPath,U$8,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}},St$b=class St extends rt$b{constructor(t=process.cwd(),e={}){let{nocase:s=true}=e;super(t,{...e,nocase:s});}};process.platform==="win32"?Pt$b:jt$8;var Xe$a=process.platform==="win32"?it$8:process.platform==="darwin"?St$b:rt$b;var Di$7=n=>n.length>=1,Mi$6=n=>n.length>=1,Ni$8=Symbol.for("nodejs.util.inspect.custom"),nt$a=class n{#t;#s;#n;length;#r;#o;#S;#w;#c;#h;#u=true;constructor(t,e,s,i){if(!Di$7(t))throw new TypeError("empty pattern list");if(!Mi$6(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#s=e,this.#n=s,this.#r=i,this.#n===0){if(this.isUNC()){let[r,o,h,a,...l]=this.#t,[u,c,d,f,...m]=this.#s;l[0]===""&&(l.shift(),m.shift());let p=[r,o,h,a,""].join("/"),w=[u,c,d,f,""].join("/");this.#t=[p,...l],this.#s=[w,...m],this.length=this.#t.length;}else if(this.isDrive()||this.isAbsolute()){let[r,...o]=this.#t,[h,...a]=this.#s;o[0]===""&&(o.shift(),a.shift());let l=r+"/",u=h+"/";this.#t=[l,...o],this.#s=[u,...a],this.length=this.#t.length;}}}[Ni$8](){return "Pattern <"+this.#s.slice(this.#n).join("/")+">"}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===A$7}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#S=this.#S||(this.#n===0?this.isAbsolute()?this.#s[0]+this.#s.slice(1).join("/"):this.#s.join("/"):this.#s.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new n(this.#t,this.#s,this.#n+1,this.#r),this.#o.#h=this.#h,this.#o.#c=this.#c,this.#o.#w=this.#w,this.#o):this.#o=null}isUNC(){let t=this.#t;return this.#c!==void 0?this.#c:this.#c=this.#r==="win32"&&this.#n===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#w!==void 0?this.#w:this.#w=this.#r==="win32"&&this.#n===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#h!==void 0?this.#h:this.#h=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#n===0?t:""}checkFollowGlobstar(){return !(this.#n===0||!this.isGlobstar()||!this.#u)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#u?false:(this.#u=false,true)}};var _i$8=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",ot$6=class ot{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:o=_i$8}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:true,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:o,nocomment:true,nonegate:true};for(let h of t)this.add(h);}add(t){let e=new D$4(t,this.mmopts);for(let s=0;s<e.set.length;s++){let i=e.set[s],r=e.globParts[s];if(!i||!r)throw new Error("invalid pattern object");for(;i[0]==="."&&r[0]===".";)i.shift(),r.shift();let o=new nt$a(i,r,0,this.platform),h=new D$4(o.globString(),this.mmopts),a=r[r.length-1]==="**",l=o.isAbsolute();l?this.absolute.push(h):this.relative.push(h),a&&(l?this.absoluteChildren.push(h):this.relativeChildren.push(h));}}ignored(t){let e=t.fullpath(),s=`${e}/`,i=t.relative()||".",r=`${i}/`;for(let o of this.relative)if(o.match(i)||o.match(r))return true;for(let o of this.absolute)if(o.match(e)||o.match(s))return true;return false}childrenIgnored(t){let e=t.fullpath()+"/",s=(t.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(s))return true;for(let i of this.absoluteChildren)if(i.match(e))return true;return false}};var oe$9=class n{store;constructor(t=new Map){this.store=t;}copy(){return new n(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){let s=t.fullpath(),i=this.store.get(s);i?i.add(e.globString()):this.store.set(s,new Set([e.globString()]));}},he$a=class he{store=new Map;add(t,e,s){let i=(e?2:0)|(s?1:0),r=this.store.get(t);this.store.set(t,r===void 0?i:i&r);}entries(){return [...this.store.entries()].map(([t,e])=>[t,!!(e&2),!!(e&1)])}},ae$9=class ae{store=new Map;add(t,e){if(!t.canReaddir())return;let s=this.store.get(t);s?s.find(i=>i.globString()===e.globString())||s.push(e):this.store.set(t,[e]);}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return [...this.store.keys()].filter(t=>t.canReaddir())}},Et$c=class n{hasWalkedCache;matches=new he$a;subwalks=new ae$9;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new oe$9;}processPatterns(t,e){this.patterns=e;let s=e.map(i=>[t,i]);for(let[i,r]of s){this.hasWalkedCache.storeWalked(i,r);let o=r.root(),h=r.isAbsolute()&&this.opts.absolute!==false;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let c=r.rest();if(c)r=c;else {this.matches.add(i,true,false);continue}}if(i.isENOENT())continue;let a,l,u=false;for(;typeof(a=r.pattern())=="string"&&(l=r.rest());)i=i.resolve(a),r=l,u=true;if(a=r.pattern(),l=r.rest(),u){if(this.hasWalkedCache.hasWalked(i,r))continue;this.hasWalkedCache.storeWalked(i,r);}if(typeof a=="string"){let c=a===".."||a===""||a===".";this.matches.add(i.resolve(a),h,c);continue}else if(a===A$7){(!i.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(i,r);let c=l?.pattern(),d=l?.rest();if(!l||(c===""||c===".")&&!d)this.matches.add(i,h,c===""||c===".");else if(c===".."){let f=i.parent||i;d?this.hasWalkedCache.hasWalked(f,d)||this.subwalks.add(f,d):this.matches.add(f,h,true);}}else a instanceof RegExp&&this.subwalks.add(i,r);}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(t,e){let s=this.subwalks.get(t),i=this.child();for(let r of e)for(let o of s){let h=o.isAbsolute(),a=o.pattern(),l=o.rest();a===A$7?i.testGlobstar(r,o,l,h):a instanceof RegExp?i.testRegExp(r,a,l,h):i.testString(r,a,l,h);}return i}testGlobstar(t,e,s,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,false),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(s&&e.checkFollowGlobstar()?this.subwalks.add(t,s):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),s){let r=s.pattern();if(typeof r=="string"&&r!==".."&&r!==""&&r!==".")this.testString(t,r,s.rest(),i);else if(r===".."){let o=t.parent||t;this.subwalks.add(o,s);}else r instanceof RegExp&&this.testRegExp(t,r,s.rest(),i);}}testRegExp(t,e,s,i){e.test(t.name)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,false));}testString(t,e,s,i){t.isNamed(e)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,false));}};var Li$7=(n,t)=>typeof n=="string"?new ot$6([n],t):Array.isArray(n)?new ot$6(n,t):n,zt$8=class zt{path;patterns;opts;seen=new Set;paused=false;aborted=false;#t=[];#s;#n;signal;maxDepth;includeChildMatches;constructor(t,e,s){if(this.patterns=t,this.path=e,this.opts=s,this.#n=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==false,(s.ignore||!this.includeChildMatches)&&(this.#s=Li$7(s.ignore??[],s),!this.includeChildMatches&&typeof this.#s.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0;}));}#r(t){return this.seen.has(t)||!!this.#s?.ignored?.(t)}#o(t){return !!this.#s?.childrenIgnored?.(t)}pause(){this.paused=true;}resume(){if(this.signal?.aborted)return;this.paused=false;let t;for(;!this.paused&&(t=this.#t.shift());)t();}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t());}async matchCheck(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||await t.realpath(),!s)return;t=s;}let r=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=await r.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat();}return this.matchCheckTest(r,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#r(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||t.realpathSync(),!s)return;t=s;}let r=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=r.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync();}return this.matchCheckTest(r,e)}matchFinish(t,e){if(this.#r(t))return;if(!this.includeChildMatches&&this.#s?.add){let r=`${t.relativePosix()}/**`;this.#s.add(r);}let s=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(s){let r=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(r+i);}else {let r=this.opts.posix?t.relativePosix():t.relative(),o=this.opts.dotRelative&&!r.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(r?o+r+i:"."+i);}}async match(t,e,s){let i=await this.matchCheck(t,s);i&&this.matchFinish(i,e);}matchSync(t,e,s){let i=this.matchCheckSync(t,s);i&&this.matchFinish(i,e);}walkCB(t,e,s){this.signal?.aborted&&s(),this.walkCB2(t,e,new Et$c(this.opts),s);}walkCB2(t,e,s,i){if(this.#o(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i();};for(let[h,a,l]of s.matches.entries())this.#r(h)||(r++,this.match(h,a,l).then(()=>o()));for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirCached();h.calledReaddir()?this.walkCB3(h,a,s,o):h.readdirCB((l,u)=>this.walkCB3(h,u,s,o),true);}o();}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i();};for(let[h,a,l]of s.matches.entries())this.#r(h)||(r++,this.match(h,a,l).then(()=>o()));for(let[h,a]of s.subwalks.entries())r++,this.walkCB2(h,a,s.child(),o);o();}walkCBSync(t,e,s){this.signal?.aborted&&s(),this.walkCB2Sync(t,e,new Et$c(this.opts),s);}walkCB2Sync(t,e,s,i){if(this.#o(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i();};for(let[h,a,l]of s.matches.entries())this.#r(h)||this.matchSync(h,a,l);for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirSync();this.walkCB3Sync(h,a,s,o);}o();}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i();};for(let[h,a,l]of s.matches.entries())this.#r(h)||this.matchSync(h,a,l);for(let[h,a]of s.subwalks.entries())r++,this.walkCB2Sync(h,a,s.child(),o);o();}},xt$9=class xt extends zt$8{matches=new Set;constructor(t,e,s){super(t,e,s);}matchEmit(t){this.matches.add(t);}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches);});}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},vt$b=class vt extends zt$8{results;constructor(t,e,s){super(t,e,s),this.results=new V$b({signal:this.signal,objectMode:true}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume());}matchEmit(t){this.results.write(t),this.results.flowing||this.pause();}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end());}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var Pi$7=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",I$7=class I{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(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=fileURLToPath(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==false,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false,this.windowsPathsNoEscape&&(t=t.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(a=>a.includes("/")?a:`./**/${a}`);}if(this.pattern=t,this.platform=e.platform||Pi$7,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else {let a=e.platform==="win32"?it$8:e.platform==="darwin"?St$b:e.platform?rt$b:Xe$a;this.scurry=new a(this.cwd,{nocase:e.nocase,fs:e.fs});}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",i={braceExpandMax:1e4,...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(a=>new D$4(a,i)),[o,h]=r.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=o.map((a,l)=>{let u=h[l];if(!u)throw new Error("invalid pattern object");return new nt$a(a,u,0,this.platform)});}async walk(){return [...await new xt$9(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 xt$9(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 vt$b(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 vt$b(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 le$9=(n,t={})=>{Array.isArray(n)||(n=[n]);for(let e of n)if(new D$4(e,t).hasMagic())return true;return false};function Bt$9(n,t={}){return new I$7(n,t).streamSync()}function Qe$9(n,t={}){return new I$7(n,t).stream()}function ts$6(n,t={}){return new I$7(n,t).walkSync()}async function Je$a(n,t={}){return new I$7(n,t).walk()}function Ut$a(n,t={}){return new I$7(n,t).iterateSync()}function es$7(n,t={}){return new I$7(n,t).iterate()}var ji$7=Bt$9,Ii$7=Object.assign(Qe$9,{sync:Bt$9}),zi$7=Ut$a,Bi$6=Object.assign(es$7,{sync:Ut$a}),Ui$7=Object.assign(ts$6,{stream:Bt$9,iterate:Ut$a}),Ze$a=Object.assign(Je$a,{glob:Je$a,globSync:ts$6,sync:Ui$7,globStream:Qe$9,stream:Ii$7,globStreamSync:Bt$9,streamSync:ji$7,globIterate:es$7,iterate:Bi$6,globIterateSync:Ut$a,iterateSync:zi$7,Glob:I$7,hasMagic:le$9,escape:tt$a,unescape:W$9});Ze$a.glob=Ze$a;
46
46
 
47
- const CWD = process.cwd();
48
- const importMetaUrl = import.meta.url;
49
- const cjsRequire = importMetaUrl
50
- ? createRequire(importMetaUrl)
51
- : require;
52
- const EXTENSIONS = ['.ts', '.tsx', ...Object.keys(cjsRequire.extensions)];
47
+ const cjsRequire = typeof require === 'function' ? require : createRequire(import.meta.url);
48
+ const DEFAULT_EXTENSIONS = cjsRequire.extensions
49
+ ?
50
+ Object.keys(cjsRequire.extensions)
51
+ :
52
+ ['.js', '.json', '.node'];
53
+ const EXTENSIONS = ['.ts', '.tsx', ...DEFAULT_EXTENSIONS];
53
54
 
54
55
  const tryPkg = (pkg) => {
55
56
  try {
@@ -57,39 +58,61 @@ const tryPkg = (pkg) => {
57
58
  }
58
59
  catch { }
59
60
  };
60
- const isPkgAvailable = (pkg) => !!tryPkg(pkg);
61
- const tryFile = (filename, includeDir = false, base = CWD) => {
61
+ const isPkgAvailable = (pkg) => Boolean(tryPkg(pkg));
62
+ const ANY_FILE_TYPES = new Set(['any', true]);
63
+ const isAnyFileType = (type) => ANY_FILE_TYPES.has(type);
64
+ const tryFileStats = (filename, type = 'file', base = process.cwd()) => {
65
+ if (!type) {
66
+ type = 'file';
67
+ }
62
68
  if (typeof filename === 'string') {
63
69
  const filepath = path__default.resolve(base, filename);
64
- return fs__default.existsSync(filepath) &&
65
- (includeDir || fs__default.statSync(filepath).isFile())
66
- ? filepath
67
- : '';
70
+ let stats;
71
+ try {
72
+ stats = fs__default.statSync(filepath, { throwIfNoEntry: false });
73
+ }
74
+ catch { }
75
+ return stats &&
76
+ (isAnyFileType(type) ||
77
+ (Array.isArray(type) ? type : [type]).some(type => stats[`is${type[0].toUpperCase()}${type.slice(1)}`]()))
78
+ ? { filepath, stats }
79
+ : undefined;
68
80
  }
69
81
  for (const file of filename ?? []) {
70
- const filepath = tryFile(file, includeDir, base);
71
- if (filepath) {
72
- return filepath;
82
+ const result = tryFileStats(file, type, base);
83
+ if (result) {
84
+ return result;
73
85
  }
74
86
  }
75
- return '';
76
87
  };
88
+ const tryFile = (filename, type = 'file', base) => tryFileStats(filename, type, base)?.filepath ?? '';
77
89
  const tryExtensions = (filepath, extensions = EXTENSIONS) => {
78
90
  const ext = [...extensions, ''].find(ext => tryFile(filepath + ext));
79
91
  return ext == null ? '' : filepath + ext;
80
92
  };
81
- const findUp = (searchEntry, searchFileOrIncludeDir, includeDir) => {
82
- const isSearchFile = "undefined" === 'string';
83
- const searchFile = 'package.json';
84
- let lastSearchEntry;
93
+ const findUp = (entryOrOptions, options) => {
94
+ if (typeof entryOrOptions === 'string') {
95
+ options = {
96
+ entry: entryOrOptions,
97
+ ...options,
98
+ };
99
+ }
100
+ else if (entryOrOptions) {
101
+ options = options ? { ...entryOrOptions, ...options } : entryOrOptions;
102
+ }
103
+ let { entry = process.cwd(), search = 'package.json', type, stop, } = options ?? {};
104
+ search = Array.isArray(search) ? search : [search];
85
105
  do {
86
- const searched = tryFile(searchFile, isSearchFile, searchEntry);
106
+ const searched = tryFile(search, type, entry);
87
107
  if (searched) {
88
108
  return searched;
89
109
  }
90
- lastSearchEntry = searchEntry;
91
- searchEntry = path__default.dirname(searchEntry);
92
- } while (!lastSearchEntry || lastSearchEntry !== searchEntry);
110
+ const lastEntry = entry;
111
+ entry = path__default.dirname(entry);
112
+ if (entry === lastEntry) {
113
+ break;
114
+ }
115
+ } while (!stop || entry !== stop);
93
116
  return '';
94
117
  };
95
118
 
@@ -42560,7 +42583,12 @@ function requireHybi () {
42560
42583
  if (error) return this._fail('extension_error', error.message);
42561
42584
 
42562
42585
  var payload = message.data;
42563
- if (message.opcode === this.OPCODES.text) payload = this._encode(payload);
42586
+
42587
+ if (payload.length > this._maxLength)
42588
+ return this._fail('too_large', 'WebSocket frame length too large');
42589
+
42590
+ if (message.opcode === this.OPCODES.text)
42591
+ payload = this._encode(payload);
42564
42592
 
42565
42593
  if (payload === null)
42566
42594
  return this._fail('encoding_error', 'Could not decode a text frame as UTF-8');
@@ -42900,6 +42928,7 @@ function requireDraft75 () {
42900
42928
 
42901
42929
  case 1:
42902
42930
  this._length = (octet & 0x7F) + 128 * this._length;
42931
+ if (this._length > this._maxLength) return this.close();
42903
42932
 
42904
42933
  if (this._closing && this._length === 0) {
42905
42934
  return this.close();
@@ -47971,6 +48000,8 @@ function requireUtils () {
47971
48000
  var newIndex = getMaxIndex(target) + 1;
47972
48001
  target[newIndex] = source;
47973
48002
  setMaxIndex(target, newIndex);
48003
+ } else if (options && options.strictMerge) {
48004
+ return [target, source];
47974
48005
  } else if (
47975
48006
  (options && (options.plainObjects || options.allowPrototypes))
47976
48007
  || !has.call(Object.prototype, source)
@@ -48352,7 +48383,7 @@ function requireStringify () {
48352
48383
 
48353
48384
  if (obj === null) {
48354
48385
  if (strictNullHandling) {
48355
- return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
48386
+ return formatter(encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix);
48356
48387
  }
48357
48388
 
48358
48389
  obj = '';
@@ -48376,7 +48407,9 @@ function requireStringify () {
48376
48407
  if (generateArrayPrefix === 'comma' && isArray(obj)) {
48377
48408
  // we need to join elements in
48378
48409
  if (encodeValuesOnly && encoder) {
48379
- obj = utils.maybeMap(obj, encoder);
48410
+ obj = utils.maybeMap(obj, function (v) {
48411
+ return v == null ? v : encoder(v);
48412
+ });
48380
48413
  }
48381
48414
  objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
48382
48415
  } else if (isArray(filter)) {
@@ -48546,6 +48579,11 @@ function requireStringify () {
48546
48579
  var sideChannel = getSideChannel();
48547
48580
  for (var i = 0; i < objKeys.length; ++i) {
48548
48581
  var key = objKeys[i];
48582
+
48583
+ if (typeof key === 'undefined' || key === null) {
48584
+ continue;
48585
+ }
48586
+
48549
48587
  var value = obj[key];
48550
48588
 
48551
48589
  if (options.skipNulls && value === null) {
@@ -48579,10 +48617,10 @@ function requireStringify () {
48579
48617
  if (options.charsetSentinel) {
48580
48618
  if (options.charset === 'iso-8859-1') {
48581
48619
  // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
48582
- prefix += 'utf8=%26%2310003%3B&';
48620
+ prefix += 'utf8=%26%2310003%3B' + options.delimiter;
48583
48621
  } else {
48584
48622
  // encodeURIComponent('✓')
48585
- prefix += 'utf8=%E2%9C%93&';
48623
+ prefix += 'utf8=%E2%9C%93' + options.delimiter;
48586
48624
  }
48587
48625
  }
48588
48626
 
@@ -48623,6 +48661,7 @@ function requireParse () {
48623
48661
  parseArrays: true,
48624
48662
  plainObjects: false,
48625
48663
  strictDepth: false,
48664
+ strictMerge: true,
48626
48665
  strictNullHandling: false,
48627
48666
  throwOnLimitExceeded: false
48628
48667
  };
@@ -48664,10 +48703,10 @@ function requireParse () {
48664
48703
  var limit = options.parameterLimit === Infinity ? void undefined : options.parameterLimit;
48665
48704
  var parts = cleanStr.split(
48666
48705
  options.delimiter,
48667
- options.throwOnLimitExceeded ? limit + 1 : limit
48706
+ options.throwOnLimitExceeded && typeof limit !== 'undefined' ? limit + 1 : limit
48668
48707
  );
48669
48708
 
48670
- if (options.throwOnLimitExceeded && parts.length > limit) {
48709
+ if (options.throwOnLimitExceeded && typeof limit !== 'undefined' && parts.length > limit) {
48671
48710
  throw new RangeError('Parameter limit exceeded. Only ' + limit + ' parameter' + (limit === 1 ? '' : 's') + ' allowed.');
48672
48711
  }
48673
48712
 
@@ -48737,7 +48776,7 @@ function requireParse () {
48737
48776
 
48738
48777
  if (key !== null) {
48739
48778
  var existing = has.call(obj, key);
48740
- if (existing && options.duplicates === 'combine') {
48779
+ if (existing && (options.duplicates === 'combine' || part.indexOf('[]=') > -1)) {
48741
48780
  obj[key] = utils.combine(
48742
48781
  obj[key],
48743
48782
  val,
@@ -48811,9 +48850,12 @@ function requireParse () {
48811
48850
  return leaf;
48812
48851
  };
48813
48852
 
48814
- var splitKeyIntoSegments = function splitKeyIntoSegments(givenKey, options) {
48815
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
48853
+ // Split a key like "a[b][c[]]" into ['a', '[b]', '[c[]]'] while preserving
48854
+ // qs parse semantics for depth/prototype guards.
48855
+ var splitKeyIntoSegments = function splitKeyIntoSegments(originalKey, options) {
48856
+ var key = options.allowDots ? originalKey.replace(/\.([^.[]+)/g, '[$1]') : originalKey;
48816
48857
 
48858
+ // depth <= 0 keeps the whole key as one segment
48817
48859
  if (options.depth <= 0) {
48818
48860
  if (!options.plainObjects && has.call(Object.prototype, key)) {
48819
48861
  if (!options.allowPrototypes) {
@@ -48824,14 +48866,11 @@ function requireParse () {
48824
48866
  return [key];
48825
48867
  }
48826
48868
 
48827
- var brackets = /(\[[^[\]]*])/;
48828
- var child = /(\[[^[\]]*])/g;
48829
-
48830
- var segment = brackets.exec(key);
48831
- var parent = segment ? key.slice(0, segment.index) : key;
48832
-
48833
- var keys = [];
48869
+ var segments = [];
48834
48870
 
48871
+ // parent before the first '[' (may be empty if key starts with '[')
48872
+ var first = key.indexOf('[');
48873
+ var parent = first >= 0 ? key.slice(0, first) : key;
48835
48874
  if (parent) {
48836
48875
  if (!options.plainObjects && has.call(Object.prototype, parent)) {
48837
48876
  if (!options.allowPrototypes) {
@@ -48839,32 +48878,62 @@ function requireParse () {
48839
48878
  }
48840
48879
  }
48841
48880
 
48842
- keys[keys.length] = parent;
48881
+ segments[segments.length] = parent;
48843
48882
  }
48844
48883
 
48845
- var i = 0;
48846
- while ((segment = child.exec(key)) !== null && i < options.depth) {
48847
- i += 1;
48884
+ var n = key.length;
48885
+ var open = first;
48886
+ var collected = 0;
48848
48887
 
48849
- var segmentContent = segment[1].slice(1, -1);
48850
- if (!options.plainObjects && has.call(Object.prototype, segmentContent)) {
48851
- if (!options.allowPrototypes) {
48852
- return;
48888
+ while (open >= 0 && collected < options.depth) {
48889
+ var level = 1;
48890
+ var i = open + 1;
48891
+ var close = -1;
48892
+
48893
+ // balance nested '[' and ']' inside this bracket group using a nesting level counter
48894
+ while (i < n && close < 0) {
48895
+ var cu = key.charCodeAt(i);
48896
+ if (cu === 0x5B) { // '['
48897
+ level += 1;
48898
+ } else if (cu === 0x5D) { // ']'
48899
+ level -= 1;
48900
+ if (level === 0) {
48901
+ close = i; // found matching close; loop will exit by condition
48902
+ }
48853
48903
  }
48904
+ i += 1;
48905
+ }
48906
+
48907
+ if (close < 0) {
48908
+ // Unterminated group: wrap the raw remainder in one bracket pair so it stays
48909
+ // a single literal segment (e.g. "[[]b" -> "[[]b]"); we do not infer missing ']'.
48910
+ segments[segments.length] = '[' + key.slice(open) + ']';
48911
+ return segments;
48854
48912
  }
48855
48913
 
48856
- keys[keys.length] = segment[1];
48914
+ var seg = key.slice(open, close + 1);
48915
+ // prototype guard for the content of this group
48916
+ var content = seg.slice(1, -1);
48917
+ if (!options.plainObjects && has.call(Object.prototype, content) && !options.allowPrototypes) {
48918
+ return;
48919
+ }
48920
+
48921
+ segments[segments.length] = seg;
48922
+ collected += 1;
48923
+
48924
+ // find the next '[' after this balanced group
48925
+ open = key.indexOf('[', close + 1);
48857
48926
  }
48858
48927
 
48859
- if (segment) {
48928
+ if (open >= 0) {
48860
48929
  if (options.strictDepth === true) {
48861
48930
  throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');
48862
48931
  }
48863
48932
 
48864
- keys[keys.length] = '[' + key.slice(segment.index) + ']';
48933
+ segments[segments.length] = '[' + key.slice(open) + ']';
48865
48934
  }
48866
48935
 
48867
- return keys;
48936
+ return segments;
48868
48937
  };
48869
48938
 
48870
48939
  var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
@@ -48937,6 +49006,7 @@ function requireParse () {
48937
49006
  parseArrays: opts.parseArrays !== false,
48938
49007
  plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
48939
49008
  strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth,
49009
+ strictMerge: typeof opts.strictMerge === 'boolean' ? !!opts.strictMerge : defaults.strictMerge,
48940
49010
  strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling,
48941
49011
  throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === 'boolean' ? opts.throwOnLimitExceeded : false
48942
49012
  };
@@ -70032,5 +70102,5 @@ var typescript = /*#__PURE__*/Object.freeze({
70032
70102
  parsers: ld
70033
70103
  });
70034
70104
 
70035
- export { HighlightJS as H, MarkdownIt as M, Ze$a as Z, closest as a, createInstance as b, cliProgress as c, createSyncFn as d, createTwoFilesPatch$1 as e, dedent$1 as f, deflist_plugin as g, distance as h, fm$2 as i, format2 as j, fse as k, inter as l, isCI as m, moduleImporter as n, runAsWorker as o, ts$6 as p, resolveConfig as r, tinylr as t, watch$1 as w };
70036
- //# sourceMappingURL=vendor-DLyCCfC4.mjs.map
70105
+ export { HighlightJS as H, MarkdownIt as M, Ze$a as Z, resolveConfig as a, createTwoFilesPatch$1 as b, createSyncFn as c, dedent$1 as d, deflist_plugin as e, format2 as f, closest as g, distance as h, fm$2 as i, isCI as j, cliProgress as k, tinylr as l, moduleImporter as m, createInstance as n, fse as o, inter as p, runAsWorker as r, ts$6 as t, watch$1 as w };
70106
+ //# sourceMappingURL=vendor-DO1GigtJ.mjs.map