updates 14.1.0 → 14.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  # check for updates
12
12
  npx updates
13
13
 
14
- # update package.json and install them
14
+ # update package.json and install new dependencies
15
15
  npx updates -u && npm i
16
16
  ```
17
17
 
@@ -59,7 +59,7 @@ usage: updates [options]
59
59
 
60
60
  ## Config File
61
61
 
62
- Put a `updates.config.js` or `updates.config.mjs` in the root of your project, usually besides `package.json` to configure certain options of the module. CLI arguments have precedence over them.
62
+ Put a `updates.config.js` or `updates.config.mjs` in the root of your project, usually besides `package.json` to configure certain options of the module. CLI arguments have precedence over options in the config file.
63
63
 
64
64
  ```js
65
65
  export default {
@@ -71,8 +71,9 @@ export default {
71
71
 
72
72
  ### Config Options
73
73
 
74
- - `include` *[]String*: Array of dependencies to include
75
- - `exclude` *[]String*: Array of dependencies to exclude
76
- - `types` *[]String*: Array of dependency types
74
+ - `include` *Array<String>*: Array of dependencies to include
75
+ - `exclude` *Array<String>*: Array of dependencies to exclude
76
+ - `types` *Array<String>*: Array of dependency types
77
+ - `registry` *String*: URL to npm registry
77
78
 
78
79
  © [silverwind](https://github.com/silverwind), distributed under BSD licence
package/bin/updates.js CHANGED
@@ -1,25 +1,25 @@
1
1
  #!/usr/bin/env node
2
2
  import {createRequire} from 'module';const require = createRequire(import.meta.url);
3
- var $h=Object.create;var Bi=Object.defineProperty;var Ch=Object.getOwnPropertyDescriptor;var Oh=Object.getOwnPropertyNames;var Ph=Object.getPrototypeOf,Ih=Object.prototype.hasOwnProperty;var be=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var yr=(r,e)=>()=>(r&&(e=r(r=0)),e);var T=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Lh=(r,e)=>{for(var t in e)Bi(r,t,{get:e[t],enumerable:!0})},xh=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Oh(e))!Ih.call(r,o)&&o!==t&&Bi(r,o,{get:()=>e[o],enumerable:!(i=Ch(e,o))||i.enumerable});return r};var Ce=(r,e,t)=>(t=r!=null?$h(Ph(r)):{},xh(e||!r||!r.__esModule?Bi(t,"default",{value:r,enumerable:!0}):t,r));var Zo=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var et=(r,e,t)=>(Zo(r,e,"read from private field"),t?t.call(r):e.get(r)),Rn=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)};var ne=(r,e,t)=>(Zo(r,e,"access private method"),t);var ta=T((Ab,ea)=>{"use strict";var Ni=be("https"),zi=be("http"),{URL:Jo}=be("url"),ki=class extends zi.Agent{constructor(e){let{proxy:t,proxyRequestOptions:i,...o}=e;super(o),this.proxy=typeof t=="string"?new Jo(t):t,this.proxyRequestOptions=i||{}}createConnection(e,t){let i={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let a=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");i.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(i.servername=this.proxy.hostname);let o=(this.proxy.protocol==="http:"?zi:Ni).request(i);o.once("connect",(a,u,h)=>{o.removeAllListeners(),u.removeAllListeners(),a.statusCode===200?t(null,u):(u.destroy(),t(new Error(`Bad response: ${a.statusCode}`),null))}),o.once("timeout",()=>{o.destroy(new Error("Proxy timeout"))}),o.once("error",a=>{o.removeAllListeners(),t(a,null)}),o.end()}},Wi=class extends Ni.Agent{constructor(e){let{proxy:t,proxyRequestOptions:i,...o}=e;super(o),this.proxy=typeof t=="string"?new Jo(t):t,this.proxyRequestOptions=i||{}}createConnection(e,t){let i={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let a=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");i.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(i.servername=this.proxy.hostname);let o=(this.proxy.protocol==="http:"?zi:Ni).request(i);o.once("connect",(a,u,h)=>{if(o.removeAllListeners(),u.removeAllListeners(),a.statusCode===200){let d=super.createConnection({...e,socket:u});t(null,d)}else u.destroy(),t(new Error(`Bad response: ${a.statusCode}`),null)}),o.once("timeout",()=>{o.destroy(new Error("Proxy timeout"))}),o.once("error",a=>{o.removeAllListeners(),t(a,null)}),o.end()}};ea.exports={HttpProxyAgent:ki,HttpsProxyAgent:Wi}});var sa=T(ia=>{"use strict";var qh=be("url").parse,Dh={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Bh=String.prototype.endsWith||function(r){return r.length<=this.length&&this.indexOf(r,this.length-r.length)!==-1};function Fh(r){var e=typeof r=="string"?qh(r):r||{},t=e.protocol,i=e.host,o=e.port;if(typeof i!="string"||!i||typeof t!="string"||(t=t.split(":",1)[0],i=i.replace(/:\d*$/,""),o=parseInt(o)||Dh[t]||0,!Nh(i,o)))return"";var a=Bt("npm_config_"+t+"_proxy")||Bt(t+"_proxy")||Bt("npm_config_proxy")||Bt("all_proxy");return a&&a.indexOf("://")===-1&&(a=t+"://"+a),a}function Nh(r,e){var t=(Bt("npm_config_no_proxy")||Bt("no_proxy")).toLowerCase();return t?t==="*"?!1:t.split(/[,\s]/).every(function(i){if(!i)return!0;var o=i.match(/^(.+):(\d+)$/),a=o?o[1]:i,u=o?parseInt(o[2]):0;return u&&u!==e?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!Bh.call(r,a)):r!==a}):!0}function Bt(r){return process.env[r.toLowerCase()]||process.env[r.toUpperCase()]||""}ia.getProxyForUrl=Fh});var Mi=T((qb,ca)=>{"use strict";function jh(r,e){var t=r;e.slice(0,-1).forEach(function(o){t=t[o]||{}});var i=e[e.length-1];return i in t}function la(r){return typeof r=="number"||/^0x[0-9a-f]+$/i.test(r)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(r)}function ua(r,e){return e==="constructor"&&typeof r[e]=="function"||e==="__proto__"}ca.exports=function(r,e){e||(e={});var t={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(t.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?t.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(A){t.bools[A]=!0});var i={};function o(A){return i[A].some(function(q){return t.bools[q]})}Object.keys(e.alias||{}).forEach(function(A){i[A]=[].concat(e.alias[A]),i[A].forEach(function(q){i[q]=[A].concat(i[A].filter(function(I){return q!==I}))})}),[].concat(e.string).filter(Boolean).forEach(function(A){t.strings[A]=!0,i[A]&&[].concat(i[A]).forEach(function(q){t.strings[q]=!0})});var a=e.default||{},u={_:[]};function h(A,q){return t.allBools&&/^--[^=]+$/.test(q)||t.strings[A]||t.bools[A]||i[A]}function d(A,q,I){for(var L=A,W=0;W<q.length-1;W++){var Y=q[W];if(ua(L,Y))return;L[Y]===void 0&&(L[Y]={}),(L[Y]===Object.prototype||L[Y]===Number.prototype||L[Y]===String.prototype)&&(L[Y]={}),L[Y]===Array.prototype&&(L[Y]=[]),L=L[Y]}var X=q[q.length-1];ua(L,X)||((L===Object.prototype||L===Number.prototype||L===String.prototype)&&(L={}),L===Array.prototype&&(L=[]),L[X]===void 0||t.bools[X]||typeof L[X]=="boolean"?L[X]=I:Array.isArray(L[X])?L[X].push(I):L[X]=[L[X],I])}function f(A,q,I){if(!(I&&t.unknownFn&&!h(A,I)&&t.unknownFn(I)===!1)){var L=!t.strings[A]&&la(q)?Number(q):q;d(u,A.split("."),L),(i[A]||[]).forEach(function(W){d(u,W.split("."),L)})}}Object.keys(t.bools).forEach(function(A){f(A,a[A]===void 0?!1:a[A])});var m=[];r.indexOf("--")!==-1&&(m=r.slice(r.indexOf("--")+1),r=r.slice(0,r.indexOf("--")));for(var y=0;y<r.length;y++){var g=r[y],p,_;if(/^--.+=/.test(g)){var R=g.match(/^--([^=]+)=([\s\S]*)$/);p=R[1];var S=R[2];t.bools[p]&&(S=S!=="false"),f(p,S,g)}else if(/^--no-.+/.test(g))p=g.match(/^--no-(.+)/)[1],f(p,!1,g);else if(/^--.+/.test(g))p=g.match(/^--(.+)/)[1],_=r[y+1],_!==void 0&&!/^(-|--)[^-]/.test(_)&&!t.bools[p]&&!t.allBools&&(!i[p]||!o(p))?(f(p,_,g),y+=1):/^(true|false)$/.test(_)?(f(p,_==="true",g),y+=1):f(p,t.strings[p]?"":!0,g);else if(/^-[^-]+/.test(g)){for(var v=g.slice(1,-1).split(""),P=!1,D=0;D<v.length;D++){if(_=g.slice(D+2),_==="-"){f(v[D],_,g);continue}if(/[A-Za-z]/.test(v[D])&&_[0]==="="){f(v[D],_.slice(1),g),P=!0;break}if(/[A-Za-z]/.test(v[D])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(_)){f(v[D],_,g),P=!0;break}if(v[D+1]&&v[D+1].match(/\W/)){f(v[D],g.slice(D+2),g),P=!0;break}else f(v[D],t.strings[v[D]]?"":!0,g)}p=g.slice(-1)[0],!P&&p!=="-"&&(r[y+1]&&!/^(-|--)[^-]/.test(r[y+1])&&!t.bools[p]&&(!i[p]||!o(p))?(f(p,r[y+1],g),y+=1):r[y+1]&&/^(true|false)$/.test(r[y+1])?(f(p,r[y+1]==="true",g),y+=1):f(p,t.strings[p]?"":!0,g))}else if((!t.unknownFn||t.unknownFn(g)!==!1)&&u._.push(t.strings._||!la(g)?g:Number(g)),e.stopEarly){u._.push.apply(u._,r.slice(y+1));break}}return Object.keys(a).forEach(function(A){jh(u,A.split("."))||(d(u,A.split("."),a[A]),(i[A]||[]).forEach(function(q){d(u,q.split("."),a[A])}))}),e["--"]?u["--"]=m.slice():m.forEach(function(A){u._.push(A)}),u}});var da=T((vn,ha)=>{(function(r,e){typeof vn=="object"&&typeof ha<"u"?e(vn):typeof define=="function"&&define.amd?define(["exports"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.WebStreamsPolyfill={}))})(vn,function(r){"use strict";let e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:n=>`Symbol(${n})`;function t(){}function i(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}let o=i();function a(n){return typeof n=="object"&&n!==null||typeof n=="function"}let u=t,h=Promise,d=Promise.prototype.then,f=Promise.resolve.bind(h),m=Promise.reject.bind(h);function y(n){return new h(n)}function g(n){return f(n)}function p(n){return m(n)}function _(n,s,l){return d.call(n,s,l)}function R(n,s,l){_(_(n,s,l),void 0,u)}function S(n,s){R(n,s)}function v(n,s){R(n,void 0,s)}function P(n,s,l){return _(n,s,l)}function D(n){_(n,void 0,u)}let A=(()=>{let n=o&&o.queueMicrotask;if(typeof n=="function")return n;let s=g(void 0);return l=>_(s,l)})();function q(n,s,l){if(typeof n!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(n,s,l)}function I(n,s,l){try{return g(q(n,s,l))}catch(c){return p(c)}}let L=16384;class W{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(s){let l=this._back,c=l;l._elements.length===L-1&&(c={_elements:[],_next:void 0}),l._elements.push(s),c!==l&&(this._back=c,l._next=c),++this._size}shift(){let s=this._front,l=s,c=this._cursor,b=c+1,w=s._elements,E=w[c];return b===L&&(l=s._next,b=0),--this._size,this._cursor=b,s!==l&&(this._front=l),w[c]=void 0,E}forEach(s){let l=this._cursor,c=this._front,b=c._elements;for(;(l!==b.length||c._next!==void 0)&&!(l===b.length&&(c=c._next,b=c._elements,l=0,b.length===0));)s(b[l]),++l}peek(){let s=this._front,l=this._cursor;return s._elements[l]}}function Y(n,s){n._ownerReadableStream=s,s._reader=n,s._state==="readable"?si(n):s._state==="closed"?tf(n):Fs(n,s._storedError)}function X(n,s){let l=n._ownerReadableStream;return Te(l,s)}function oe(n){n._ownerReadableStream._state==="readable"?oi(n,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):rf(n,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),n._ownerReadableStream._reader=void 0,n._ownerReadableStream=void 0}function lt(n){return new TypeError("Cannot "+n+" a stream using a released reader")}function si(n){n._closedPromise=y((s,l)=>{n._closedPromise_resolve=s,n._closedPromise_reject=l})}function Fs(n,s){si(n),oi(n,s)}function tf(n){si(n),Ns(n)}function oi(n,s){n._closedPromise_reject!==void 0&&(D(n._closedPromise),n._closedPromise_reject(s),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0)}function rf(n,s){Fs(n,s)}function Ns(n){n._closedPromise_resolve!==void 0&&(n._closedPromise_resolve(void 0),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0)}let zs=e("[[AbortSteps]]"),ks=e("[[ErrorSteps]]"),ai=e("[[CancelSteps]]"),li=e("[[PullSteps]]"),Ws=Number.isFinite||function(n){return typeof n=="number"&&isFinite(n)},nf=Math.trunc||function(n){return n<0?Math.ceil(n):Math.floor(n)};function sf(n){return typeof n=="object"||typeof n=="function"}function Fe(n,s){if(n!==void 0&&!sf(n))throw new TypeError(`${s} is not an object.`)}function ve(n,s){if(typeof n!="function")throw new TypeError(`${s} is not a function.`)}function of(n){return typeof n=="object"&&n!==null||typeof n=="function"}function js(n,s){if(!of(n))throw new TypeError(`${s} is not an object.`)}function Ne(n,s,l){if(n===void 0)throw new TypeError(`Parameter ${s} is required in '${l}'.`)}function ui(n,s,l){if(n===void 0)throw new TypeError(`${s} is required in '${l}'.`)}function ci(n){return Number(n)}function Us(n){return n===0?0:n}function af(n){return Us(nf(n))}function Ms(n,s){let c=Number.MAX_SAFE_INTEGER,b=Number(n);if(b=Us(b),!Ws(b))throw new TypeError(`${s} is not a finite number`);if(b=af(b),b<0||b>c)throw new TypeError(`${s} is outside the accepted range of 0 to ${c}, inclusive`);return!Ws(b)||b===0?0:b}function fi(n,s){if(!Ke(n))throw new TypeError(`${s} is not a ReadableStream.`)}function At(n){return new nr(n)}function Hs(n,s){n._reader._readRequests.push(s)}function hi(n,s,l){let b=n._reader._readRequests.shift();l?b._closeSteps():b._chunkSteps(s)}function Mr(n){return n._reader._readRequests.length}function Gs(n){let s=n._reader;return!(s===void 0||!Ve(s))}class nr{constructor(s){if(Ne(s,1,"ReadableStreamDefaultReader"),fi(s,"First parameter"),Ze(s))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Y(this,s),this._readRequests=new W}get closed(){return Ve(this)?this._closedPromise:p(Hr("closed"))}cancel(s=void 0){return Ve(this)?this._ownerReadableStream===void 0?p(lt("cancel")):X(this,s):p(Hr("cancel"))}read(){if(!Ve(this))return p(Hr("read"));if(this._ownerReadableStream===void 0)return p(lt("read from"));let s,l,c=y((w,E)=>{s=w,l=E});return ir(this,{_chunkSteps:w=>s({value:w,done:!1}),_closeSteps:()=>s({value:void 0,done:!0}),_errorSteps:w=>l(w)}),c}releaseLock(){if(!Ve(this))throw Hr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");oe(this)}}}Object.defineProperties(nr.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(nr.prototype,e.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Ve(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readRequests")?!1:n instanceof nr}function ir(n,s){let l=n._ownerReadableStream;l._disturbed=!0,l._state==="closed"?s._closeSteps():l._state==="errored"?s._errorSteps(l._storedError):l._readableStreamController[li](s)}function Hr(n){return new TypeError(`ReadableStreamDefaultReader.prototype.${n} can only be used on a ReadableStreamDefaultReader`)}let Vs=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ys{constructor(s,l){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=s,this._preventCancel=l}next(){let s=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?P(this._ongoingPromise,s,s):s(),this._ongoingPromise}return(s){let l=()=>this._returnSteps(s);return this._ongoingPromise?P(this._ongoingPromise,l,l):l()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let s=this._reader;if(s._ownerReadableStream===void 0)return p(lt("iterate"));let l,c,b=y((E,$)=>{l=E,c=$});return ir(s,{_chunkSteps:E=>{this._ongoingPromise=void 0,A(()=>l({value:E,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,oe(s),l({value:void 0,done:!0})},_errorSteps:E=>{this._ongoingPromise=void 0,this._isFinished=!0,oe(s),c(E)}}),b}_returnSteps(s){if(this._isFinished)return Promise.resolve({value:s,done:!0});this._isFinished=!0;let l=this._reader;if(l._ownerReadableStream===void 0)return p(lt("finish iterating"));if(!this._preventCancel){let c=X(l,s);return oe(l),P(c,()=>({value:s,done:!0}))}return oe(l),g({value:s,done:!0})}}let Xs={next(){return Qs(this)?this._asyncIteratorImpl.next():p(Ks("next"))},return(n){return Qs(this)?this._asyncIteratorImpl.return(n):p(Ks("return"))}};Vs!==void 0&&Object.setPrototypeOf(Xs,Vs);function lf(n,s){let l=At(n),c=new Ys(l,s),b=Object.create(Xs);return b._asyncIteratorImpl=c,b}function Qs(n){if(!a(n)||!Object.prototype.hasOwnProperty.call(n,"_asyncIteratorImpl"))return!1;try{return n._asyncIteratorImpl instanceof Ys}catch{return!1}}function Ks(n){return new TypeError(`ReadableStreamAsyncIterator.${n} can only be used on a ReadableSteamAsyncIterator`)}let Zs=Number.isNaN||function(n){return n!==n};function sr(n){return n.slice()}function Js(n,s,l,c,b){new Uint8Array(n).set(new Uint8Array(l,c,b),s)}function Eb(n){return n}function Gr(n){return!1}function eo(n,s,l){if(n.slice)return n.slice(s,l);let c=l-s,b=new ArrayBuffer(c);return Js(b,0,n,s,c),b}function uf(n){return!(typeof n!="number"||Zs(n)||n<0)}function to(n){let s=eo(n.buffer,n.byteOffset,n.byteOffset+n.byteLength);return new Uint8Array(s)}function di(n){let s=n._queue.shift();return n._queueTotalSize-=s.size,n._queueTotalSize<0&&(n._queueTotalSize=0),s.value}function pi(n,s,l){if(!uf(l)||l===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");n._queue.push({value:s,size:l}),n._queueTotalSize+=l}function cf(n){return n._queue.peek().value}function Ye(n){n._queue=new W,n._queueTotalSize=0}class or{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!mi(this))throw Si("view");return this._view}respond(s){if(!mi(this))throw Si("respond");if(Ne(s,1,"respond"),s=Ms(s,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Gr(this._view.buffer),Kr(this._associatedReadableByteStreamController,s)}respondWithNewView(s){if(!mi(this))throw Si("respondWithNewView");if(Ne(s,1,"respondWithNewView"),!ArrayBuffer.isView(s))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Gr(s.buffer),Zr(this._associatedReadableByteStreamController,s)}}Object.defineProperties(or.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(or.prototype,e.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Tt{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!ut(this))throw lr("byobRequest");return yi(this)}get desiredSize(){if(!ut(this))throw lr("desiredSize");return uo(this)}close(){if(!ut(this))throw lr("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let s=this._controlledReadableByteStream._state;if(s!=="readable")throw new TypeError(`The stream (in ${s} state) is not in the readable state and cannot be closed`);ar(this)}enqueue(s){if(!ut(this))throw lr("enqueue");if(Ne(s,1,"enqueue"),!ArrayBuffer.isView(s))throw new TypeError("chunk must be an array buffer view");if(s.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(s.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let l=this._controlledReadableByteStream._state;if(l!=="readable")throw new TypeError(`The stream (in ${l} state) is not in the readable state and cannot be enqueued to`);Qr(this,s)}error(s=void 0){if(!ut(this))throw lr("error");Ae(this,s)}[ai](s){ro(this),Ye(this);let l=this._cancelAlgorithm(s);return Xr(this),l}[li](s){let l=this._controlledReadableByteStream;if(this._queueTotalSize>0){let b=this._queue.shift();this._queueTotalSize-=b.byteLength,oo(this);let w=new Uint8Array(b.buffer,b.byteOffset,b.byteLength);s._chunkSteps(w);return}let c=this._autoAllocateChunkSize;if(c!==void 0){let b;try{b=new ArrayBuffer(c)}catch(E){s._errorSteps(E);return}let w={buffer:b,bufferByteLength:c,byteOffset:0,byteLength:c,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(w)}Hs(l,s),ct(this)}}Object.defineProperties(Tt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Tt.prototype,e.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function ut(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledReadableByteStream")?!1:n instanceof Tt}function mi(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_associatedReadableByteStreamController")?!1:n instanceof or}function ct(n){if(!pf(n))return;if(n._pulling){n._pullAgain=!0;return}n._pulling=!0;let l=n._pullAlgorithm();R(l,()=>{n._pulling=!1,n._pullAgain&&(n._pullAgain=!1,ct(n))},c=>{Ae(n,c)})}function ro(n){bi(n),n._pendingPullIntos=new W}function gi(n,s){let l=!1;n._state==="closed"&&(l=!0);let c=no(s);s.readerType==="default"?hi(n,c,l):bf(n,c,l)}function no(n){let s=n.bytesFilled,l=n.elementSize;return new n.viewConstructor(n.buffer,n.byteOffset,s/l)}function Vr(n,s,l,c){n._queue.push({buffer:s,byteOffset:l,byteLength:c}),n._queueTotalSize+=c}function io(n,s){let l=s.elementSize,c=s.bytesFilled-s.bytesFilled%l,b=Math.min(n._queueTotalSize,s.byteLength-s.bytesFilled),w=s.bytesFilled+b,E=w-w%l,$=b,F=!1;E>c&&($=E-s.bytesFilled,F=!0);let k=n._queue;for(;$>0;){let j=k.peek(),U=Math.min($,j.byteLength),K=s.byteOffset+s.bytesFilled;Js(s.buffer,K,j.buffer,j.byteOffset,U),j.byteLength===U?k.shift():(j.byteOffset+=U,j.byteLength-=U),n._queueTotalSize-=U,so(n,U,s),$-=U}return F}function so(n,s,l){l.bytesFilled+=s}function oo(n){n._queueTotalSize===0&&n._closeRequested?(Xr(n),gr(n._controlledReadableByteStream)):ct(n)}function bi(n){n._byobRequest!==null&&(n._byobRequest._associatedReadableByteStreamController=void 0,n._byobRequest._view=null,n._byobRequest=null)}function ao(n){for(;n._pendingPullIntos.length>0;){if(n._queueTotalSize===0)return;let s=n._pendingPullIntos.peek();io(n,s)&&(Yr(n),gi(n._controlledReadableByteStream,s))}}function ff(n,s,l){let c=n._controlledReadableByteStream,b=1;s.constructor!==DataView&&(b=s.constructor.BYTES_PER_ELEMENT);let w=s.constructor,E=s.buffer,$={buffer:E,bufferByteLength:E.byteLength,byteOffset:s.byteOffset,byteLength:s.byteLength,bytesFilled:0,elementSize:b,viewConstructor:w,readerType:"byob"};if(n._pendingPullIntos.length>0){n._pendingPullIntos.push($),ho(c,l);return}if(c._state==="closed"){let F=new w($.buffer,$.byteOffset,0);l._closeSteps(F);return}if(n._queueTotalSize>0){if(io(n,$)){let F=no($);oo(n),l._chunkSteps(F);return}if(n._closeRequested){let F=new TypeError("Insufficient bytes to fill elements in the given buffer");Ae(n,F),l._errorSteps(F);return}}n._pendingPullIntos.push($),ho(c,l),ct(n)}function hf(n,s){let l=n._controlledReadableByteStream;if(_i(l))for(;po(l)>0;){let c=Yr(n);gi(l,c)}}function df(n,s,l){if(so(n,s,l),l.bytesFilled<l.elementSize)return;Yr(n);let c=l.bytesFilled%l.elementSize;if(c>0){let b=l.byteOffset+l.bytesFilled,w=eo(l.buffer,b-c,b);Vr(n,w,0,w.byteLength)}l.bytesFilled-=c,gi(n._controlledReadableByteStream,l),ao(n)}function lo(n,s){let l=n._pendingPullIntos.peek();bi(n),n._controlledReadableByteStream._state==="closed"?hf(n):df(n,s,l),ct(n)}function Yr(n){return n._pendingPullIntos.shift()}function pf(n){let s=n._controlledReadableByteStream;return s._state!=="readable"||n._closeRequested||!n._started?!1:!!(Gs(s)&&Mr(s)>0||_i(s)&&po(s)>0||uo(n)>0)}function Xr(n){n._pullAlgorithm=void 0,n._cancelAlgorithm=void 0}function ar(n){let s=n._controlledReadableByteStream;if(!(n._closeRequested||s._state!=="readable")){if(n._queueTotalSize>0){n._closeRequested=!0;return}if(n._pendingPullIntos.length>0&&n._pendingPullIntos.peek().bytesFilled>0){let c=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ae(n,c),c}Xr(n),gr(s)}}function Qr(n,s){let l=n._controlledReadableByteStream;if(n._closeRequested||l._state!=="readable")return;let c=s.buffer,b=s.byteOffset,w=s.byteLength,E=c;if(n._pendingPullIntos.length>0){let $=n._pendingPullIntos.peek();Gr($.buffer),$.buffer=$.buffer}if(bi(n),Gs(l))if(Mr(l)===0)Vr(n,E,b,w);else{n._pendingPullIntos.length>0&&Yr(n);let $=new Uint8Array(E,b,w);hi(l,$,!1)}else _i(l)?(Vr(n,E,b,w),ao(n)):Vr(n,E,b,w);ct(n)}function Ae(n,s){let l=n._controlledReadableByteStream;l._state==="readable"&&(ro(n),Ye(n),Xr(n),No(l,s))}function yi(n){if(n._byobRequest===null&&n._pendingPullIntos.length>0){let s=n._pendingPullIntos.peek(),l=new Uint8Array(s.buffer,s.byteOffset+s.bytesFilled,s.byteLength-s.bytesFilled),c=Object.create(or.prototype);gf(c,n,l),n._byobRequest=c}return n._byobRequest}function uo(n){let s=n._controlledReadableByteStream._state;return s==="errored"?null:s==="closed"?0:n._strategyHWM-n._queueTotalSize}function Kr(n,s){let l=n._pendingPullIntos.peek();if(n._controlledReadableByteStream._state==="closed"){if(s!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(s===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(l.bytesFilled+s>l.byteLength)throw new RangeError("bytesWritten out of range")}l.buffer=l.buffer,lo(n,s)}function Zr(n,s){let l=n._pendingPullIntos.peek();if(n._controlledReadableByteStream._state==="closed"){if(s.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(s.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(l.byteOffset+l.bytesFilled!==s.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(l.bufferByteLength!==s.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(l.bytesFilled+s.byteLength>l.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let b=s.byteLength;l.buffer=s.buffer,lo(n,b)}function co(n,s,l,c,b,w,E){s._controlledReadableByteStream=n,s._pullAgain=!1,s._pulling=!1,s._byobRequest=null,s._queue=s._queueTotalSize=void 0,Ye(s),s._closeRequested=!1,s._started=!1,s._strategyHWM=w,s._pullAlgorithm=c,s._cancelAlgorithm=b,s._autoAllocateChunkSize=E,s._pendingPullIntos=new W,n._readableStreamController=s;let $=l();R(g($),()=>{s._started=!0,ct(s)},F=>{Ae(s,F)})}function mf(n,s,l){let c=Object.create(Tt.prototype),b=()=>{},w=()=>g(void 0),E=()=>g(void 0);s.start!==void 0&&(b=()=>s.start(c)),s.pull!==void 0&&(w=()=>s.pull(c)),s.cancel!==void 0&&(E=F=>s.cancel(F));let $=s.autoAllocateChunkSize;if($===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");co(n,c,b,w,E,l,$)}function gf(n,s,l){n._associatedReadableByteStreamController=s,n._view=l}function Si(n){return new TypeError(`ReadableStreamBYOBRequest.prototype.${n} can only be used on a ReadableStreamBYOBRequest`)}function lr(n){return new TypeError(`ReadableByteStreamController.prototype.${n} can only be used on a ReadableByteStreamController`)}function fo(n){return new ur(n)}function ho(n,s){n._reader._readIntoRequests.push(s)}function bf(n,s,l){let b=n._reader._readIntoRequests.shift();l?b._closeSteps(s):b._chunkSteps(s)}function po(n){return n._reader._readIntoRequests.length}function _i(n){let s=n._reader;return!(s===void 0||!ft(s))}class ur{constructor(s){if(Ne(s,1,"ReadableStreamBYOBReader"),fi(s,"First parameter"),Ze(s))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ut(s._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Y(this,s),this._readIntoRequests=new W}get closed(){return ft(this)?this._closedPromise:p(Jr("closed"))}cancel(s=void 0){return ft(this)?this._ownerReadableStream===void 0?p(lt("cancel")):X(this,s):p(Jr("cancel"))}read(s){if(!ft(this))return p(Jr("read"));if(!ArrayBuffer.isView(s))return p(new TypeError("view must be an array buffer view"));if(s.byteLength===0)return p(new TypeError("view must have non-zero byteLength"));if(s.buffer.byteLength===0)return p(new TypeError("view's buffer must have non-zero byteLength"));if(Gr(s.buffer),this._ownerReadableStream===void 0)return p(lt("read from"));let l,c,b=y((E,$)=>{l=E,c=$});return mo(this,s,{_chunkSteps:E=>l({value:E,done:!1}),_closeSteps:E=>l({value:E,done:!0}),_errorSteps:E=>c(E)}),b}releaseLock(){if(!ft(this))throw Jr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");oe(this)}}}Object.defineProperties(ur.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(ur.prototype,e.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function ft(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readIntoRequests")?!1:n instanceof ur}function mo(n,s,l){let c=n._ownerReadableStream;c._disturbed=!0,c._state==="errored"?l._errorSteps(c._storedError):ff(c._readableStreamController,s,l)}function Jr(n){return new TypeError(`ReadableStreamBYOBReader.prototype.${n} can only be used on a ReadableStreamBYOBReader`)}function cr(n,s){let{highWaterMark:l}=n;if(l===void 0)return s;if(Zs(l)||l<0)throw new RangeError("Invalid highWaterMark");return l}function en(n){let{size:s}=n;return s||(()=>1)}function tn(n,s){Fe(n,s);let l=n==null?void 0:n.highWaterMark,c=n==null?void 0:n.size;return{highWaterMark:l===void 0?void 0:ci(l),size:c===void 0?void 0:yf(c,`${s} has member 'size' that`)}}function yf(n,s){return ve(n,s),l=>ci(n(l))}function Sf(n,s){Fe(n,s);let l=n==null?void 0:n.abort,c=n==null?void 0:n.close,b=n==null?void 0:n.start,w=n==null?void 0:n.type,E=n==null?void 0:n.write;return{abort:l===void 0?void 0:_f(l,n,`${s} has member 'abort' that`),close:c===void 0?void 0:wf(c,n,`${s} has member 'close' that`),start:b===void 0?void 0:Ef(b,n,`${s} has member 'start' that`),write:E===void 0?void 0:Rf(E,n,`${s} has member 'write' that`),type:w}}function _f(n,s,l){return ve(n,l),c=>I(n,s,[c])}function wf(n,s,l){return ve(n,l),()=>I(n,s,[])}function Ef(n,s,l){return ve(n,l),c=>q(n,s,[c])}function Rf(n,s,l){return ve(n,l),(c,b)=>I(n,s,[c,b])}function go(n,s){if(!$t(n))throw new TypeError(`${s} is not a WritableStream.`)}function vf(n){if(typeof n!="object"||n===null)return!1;try{return typeof n.aborted=="boolean"}catch{return!1}}let Af=typeof AbortController=="function";function Tf(){if(Af)return new AbortController}class fr{constructor(s={},l={}){s===void 0?s=null:js(s,"First parameter");let c=tn(l,"Second parameter"),b=Sf(s,"First parameter");if(yo(this),b.type!==void 0)throw new RangeError("Invalid type is specified");let E=en(c),$=cr(c,1);kf(this,b,$,E)}get locked(){if(!$t(this))throw an("locked");return Ct(this)}abort(s=void 0){return $t(this)?Ct(this)?p(new TypeError("Cannot abort a stream that already has a writer")):rn(this,s):p(an("abort"))}close(){return $t(this)?Ct(this)?p(new TypeError("Cannot close a stream that already has a writer")):Ie(this)?p(new TypeError("Cannot close an already-closing stream")):So(this):p(an("close"))}getWriter(){if(!$t(this))throw an("getWriter");return bo(this)}}Object.defineProperties(fr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(fr.prototype,e.toStringTag,{value:"WritableStream",configurable:!0});function bo(n){return new hr(n)}function $f(n,s,l,c,b=1,w=()=>1){let E=Object.create(fr.prototype);yo(E);let $=Object.create(Ot.prototype);return Ao(E,$,n,s,l,c,b,w),E}function yo(n){n._state="writable",n._storedError=void 0,n._writer=void 0,n._writableStreamController=void 0,n._writeRequests=new W,n._inFlightWriteRequest=void 0,n._closeRequest=void 0,n._inFlightCloseRequest=void 0,n._pendingAbortRequest=void 0,n._backpressure=!1}function $t(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_writableStreamController")?!1:n instanceof fr}function Ct(n){return n._writer!==void 0}function rn(n,s){var l;if(n._state==="closed"||n._state==="errored")return g(void 0);n._writableStreamController._abortReason=s,(l=n._writableStreamController._abortController)===null||l===void 0||l.abort();let c=n._state;if(c==="closed"||c==="errored")return g(void 0);if(n._pendingAbortRequest!==void 0)return n._pendingAbortRequest._promise;let b=!1;c==="erroring"&&(b=!0,s=void 0);let w=y((E,$)=>{n._pendingAbortRequest={_promise:void 0,_resolve:E,_reject:$,_reason:s,_wasAlreadyErroring:b}});return n._pendingAbortRequest._promise=w,b||Ei(n,s),w}function So(n){let s=n._state;if(s==="closed"||s==="errored")return p(new TypeError(`The stream (in ${s} state) is not in the writable state and cannot be closed`));let l=y((b,w)=>{let E={_resolve:b,_reject:w};n._closeRequest=E}),c=n._writer;return c!==void 0&&n._backpressure&&s==="writable"&&Ii(c),Wf(n._writableStreamController),l}function Cf(n){return y((l,c)=>{let b={_resolve:l,_reject:c};n._writeRequests.push(b)})}function wi(n,s){if(n._state==="writable"){Ei(n,s);return}Ri(n)}function Ei(n,s){let l=n._writableStreamController;n._state="erroring",n._storedError=s;let c=n._writer;c!==void 0&&wo(c,s),!xf(n)&&l._started&&Ri(n)}function Ri(n){n._state="errored",n._writableStreamController[ks]();let s=n._storedError;if(n._writeRequests.forEach(b=>{b._reject(s)}),n._writeRequests=new W,n._pendingAbortRequest===void 0){nn(n);return}let l=n._pendingAbortRequest;if(n._pendingAbortRequest=void 0,l._wasAlreadyErroring){l._reject(s),nn(n);return}let c=n._writableStreamController[zs](l._reason);R(c,()=>{l._resolve(),nn(n)},b=>{l._reject(b),nn(n)})}function Of(n){n._inFlightWriteRequest._resolve(void 0),n._inFlightWriteRequest=void 0}function Pf(n,s){n._inFlightWriteRequest._reject(s),n._inFlightWriteRequest=void 0,wi(n,s)}function If(n){n._inFlightCloseRequest._resolve(void 0),n._inFlightCloseRequest=void 0,n._state==="erroring"&&(n._storedError=void 0,n._pendingAbortRequest!==void 0&&(n._pendingAbortRequest._resolve(),n._pendingAbortRequest=void 0)),n._state="closed";let l=n._writer;l!==void 0&&Oo(l)}function Lf(n,s){n._inFlightCloseRequest._reject(s),n._inFlightCloseRequest=void 0,n._pendingAbortRequest!==void 0&&(n._pendingAbortRequest._reject(s),n._pendingAbortRequest=void 0),wi(n,s)}function Ie(n){return!(n._closeRequest===void 0&&n._inFlightCloseRequest===void 0)}function xf(n){return!(n._inFlightWriteRequest===void 0&&n._inFlightCloseRequest===void 0)}function qf(n){n._inFlightCloseRequest=n._closeRequest,n._closeRequest=void 0}function Df(n){n._inFlightWriteRequest=n._writeRequests.shift()}function nn(n){n._closeRequest!==void 0&&(n._closeRequest._reject(n._storedError),n._closeRequest=void 0);let s=n._writer;s!==void 0&&Oi(s,n._storedError)}function vi(n,s){let l=n._writer;l!==void 0&&s!==n._backpressure&&(s?Yf(l):Ii(l)),n._backpressure=s}class hr{constructor(s){if(Ne(s,1,"WritableStreamDefaultWriter"),go(s,"First parameter"),Ct(s))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=s,s._writer=this;let l=s._state;if(l==="writable")!Ie(s)&&s._backpressure?un(this):Po(this),ln(this);else if(l==="erroring")Pi(this,s._storedError),ln(this);else if(l==="closed")Po(this),Gf(this);else{let c=s._storedError;Pi(this,c),Co(this,c)}}get closed(){return ht(this)?this._closedPromise:p(dt("closed"))}get desiredSize(){if(!ht(this))throw dt("desiredSize");if(this._ownerWritableStream===void 0)throw dr("desiredSize");return zf(this)}get ready(){return ht(this)?this._readyPromise:p(dt("ready"))}abort(s=void 0){return ht(this)?this._ownerWritableStream===void 0?p(dr("abort")):Bf(this,s):p(dt("abort"))}close(){if(!ht(this))return p(dt("close"));let s=this._ownerWritableStream;return s===void 0?p(dr("close")):Ie(s)?p(new TypeError("Cannot close an already-closing stream")):_o(this)}releaseLock(){if(!ht(this))throw dt("releaseLock");this._ownerWritableStream!==void 0&&Eo(this)}write(s=void 0){return ht(this)?this._ownerWritableStream===void 0?p(dr("write to")):Ro(this,s):p(dt("write"))}}Object.defineProperties(hr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(hr.prototype,e.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function ht(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_ownerWritableStream")?!1:n instanceof hr}function Bf(n,s){let l=n._ownerWritableStream;return rn(l,s)}function _o(n){let s=n._ownerWritableStream;return So(s)}function Ff(n){let s=n._ownerWritableStream,l=s._state;return Ie(s)||l==="closed"?g(void 0):l==="errored"?p(s._storedError):_o(n)}function Nf(n,s){n._closedPromiseState==="pending"?Oi(n,s):Vf(n,s)}function wo(n,s){n._readyPromiseState==="pending"?Io(n,s):Xf(n,s)}function zf(n){let s=n._ownerWritableStream,l=s._state;return l==="errored"||l==="erroring"?null:l==="closed"?0:To(s._writableStreamController)}function Eo(n){let s=n._ownerWritableStream,l=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");wo(n,l),Nf(n,l),s._writer=void 0,n._ownerWritableStream=void 0}function Ro(n,s){let l=n._ownerWritableStream,c=l._writableStreamController,b=jf(c,s);if(l!==n._ownerWritableStream)return p(dr("write to"));let w=l._state;if(w==="errored")return p(l._storedError);if(Ie(l)||w==="closed")return p(new TypeError("The stream is closing or closed and cannot be written to"));if(w==="erroring")return p(l._storedError);let E=Cf(l);return Uf(c,s,b),E}let vo={};class Ot{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Ai(this))throw Ci("abortReason");return this._abortReason}get signal(){if(!Ai(this))throw Ci("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(s=void 0){if(!Ai(this))throw Ci("error");this._controlledWritableStream._state==="writable"&&$o(this,s)}[zs](s){let l=this._abortAlgorithm(s);return sn(this),l}[ks](){Ye(this)}}Object.defineProperties(Ot.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Ot.prototype,e.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Ai(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledWritableStream")?!1:n instanceof Ot}function Ao(n,s,l,c,b,w,E,$){s._controlledWritableStream=n,n._writableStreamController=s,s._queue=void 0,s._queueTotalSize=void 0,Ye(s),s._abortReason=void 0,s._abortController=Tf(),s._started=!1,s._strategySizeAlgorithm=$,s._strategyHWM=E,s._writeAlgorithm=c,s._closeAlgorithm=b,s._abortAlgorithm=w;let F=$i(s);vi(n,F);let k=l(),j=g(k);R(j,()=>{s._started=!0,on(s)},U=>{s._started=!0,wi(n,U)})}function kf(n,s,l,c){let b=Object.create(Ot.prototype),w=()=>{},E=()=>g(void 0),$=()=>g(void 0),F=()=>g(void 0);s.start!==void 0&&(w=()=>s.start(b)),s.write!==void 0&&(E=k=>s.write(k,b)),s.close!==void 0&&($=()=>s.close()),s.abort!==void 0&&(F=k=>s.abort(k)),Ao(n,b,w,E,$,F,l,c)}function sn(n){n._writeAlgorithm=void 0,n._closeAlgorithm=void 0,n._abortAlgorithm=void 0,n._strategySizeAlgorithm=void 0}function Wf(n){pi(n,vo,0),on(n)}function jf(n,s){try{return n._strategySizeAlgorithm(s)}catch(l){return Ti(n,l),1}}function To(n){return n._strategyHWM-n._queueTotalSize}function Uf(n,s,l){try{pi(n,s,l)}catch(b){Ti(n,b);return}let c=n._controlledWritableStream;if(!Ie(c)&&c._state==="writable"){let b=$i(n);vi(c,b)}on(n)}function on(n){let s=n._controlledWritableStream;if(!n._started||s._inFlightWriteRequest!==void 0)return;if(s._state==="erroring"){Ri(s);return}if(n._queue.length===0)return;let c=cf(n);c===vo?Mf(n):Hf(n,c)}function Ti(n,s){n._controlledWritableStream._state==="writable"&&$o(n,s)}function Mf(n){let s=n._controlledWritableStream;qf(s),di(n);let l=n._closeAlgorithm();sn(n),R(l,()=>{If(s)},c=>{Lf(s,c)})}function Hf(n,s){let l=n._controlledWritableStream;Df(l);let c=n._writeAlgorithm(s);R(c,()=>{Of(l);let b=l._state;if(di(n),!Ie(l)&&b==="writable"){let w=$i(n);vi(l,w)}on(n)},b=>{l._state==="writable"&&sn(n),Pf(l,b)})}function $i(n){return To(n)<=0}function $o(n,s){let l=n._controlledWritableStream;sn(n),Ei(l,s)}function an(n){return new TypeError(`WritableStream.prototype.${n} can only be used on a WritableStream`)}function Ci(n){return new TypeError(`WritableStreamDefaultController.prototype.${n} can only be used on a WritableStreamDefaultController`)}function dt(n){return new TypeError(`WritableStreamDefaultWriter.prototype.${n} can only be used on a WritableStreamDefaultWriter`)}function dr(n){return new TypeError("Cannot "+n+" a stream using a released writer")}function ln(n){n._closedPromise=y((s,l)=>{n._closedPromise_resolve=s,n._closedPromise_reject=l,n._closedPromiseState="pending"})}function Co(n,s){ln(n),Oi(n,s)}function Gf(n){ln(n),Oo(n)}function Oi(n,s){n._closedPromise_reject!==void 0&&(D(n._closedPromise),n._closedPromise_reject(s),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0,n._closedPromiseState="rejected")}function Vf(n,s){Co(n,s)}function Oo(n){n._closedPromise_resolve!==void 0&&(n._closedPromise_resolve(void 0),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0,n._closedPromiseState="resolved")}function un(n){n._readyPromise=y((s,l)=>{n._readyPromise_resolve=s,n._readyPromise_reject=l}),n._readyPromiseState="pending"}function Pi(n,s){un(n),Io(n,s)}function Po(n){un(n),Ii(n)}function Io(n,s){n._readyPromise_reject!==void 0&&(D(n._readyPromise),n._readyPromise_reject(s),n._readyPromise_resolve=void 0,n._readyPromise_reject=void 0,n._readyPromiseState="rejected")}function Yf(n){un(n)}function Xf(n,s){Pi(n,s)}function Ii(n){n._readyPromise_resolve!==void 0&&(n._readyPromise_resolve(void 0),n._readyPromise_resolve=void 0,n._readyPromise_reject=void 0,n._readyPromiseState="fulfilled")}let Lo=typeof DOMException<"u"?DOMException:void 0;function Qf(n){if(!(typeof n=="function"||typeof n=="object"))return!1;try{return new n,!0}catch{return!1}}function Kf(){let n=function(l,c){this.message=l||"",this.name=c||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return n.prototype=Object.create(Error.prototype),Object.defineProperty(n.prototype,"constructor",{value:n,writable:!0,configurable:!0}),n}let Zf=Qf(Lo)?Lo:Kf();function xo(n,s,l,c,b,w){let E=At(n),$=bo(s);n._disturbed=!0;let F=!1,k=g(void 0);return y((j,U)=>{let K;if(w!==void 0){if(K=()=>{let x=new Zf("Aborted","AbortError"),z=[];c||z.push(()=>s._state==="writable"?rn(s,x):g(void 0)),b||z.push(()=>n._state==="readable"?Te(n,x):g(void 0)),he(()=>Promise.all(z.map(G=>G())),!0,x)},w.aborted){K();return}w.addEventListener("abort",K)}function $e(){return y((x,z)=>{function G(ge){ge?x():_(Lt(),G,z)}G(!1)})}function Lt(){return F?g(!0):_($._readyPromise,()=>y((x,z)=>{ir(E,{_chunkSteps:G=>{k=_(Ro($,G),void 0,t),x(!1)},_closeSteps:()=>x(!0),_errorSteps:z})}))}if(ze(n,E._closedPromise,x=>{c?Se(!0,x):he(()=>rn(s,x),!0,x)}),ze(s,$._closedPromise,x=>{b?Se(!0,x):he(()=>Te(n,x),!0,x)}),le(n,E._closedPromise,()=>{l?Se():he(()=>Ff($))}),Ie(s)||s._state==="closed"){let x=new TypeError("the destination writable stream closed before all data could be piped to it");b?Se(!0,x):he(()=>Te(n,x),!0,x)}D($e());function Je(){let x=k;return _(k,()=>x!==k?Je():void 0)}function ze(x,z,G){x._state==="errored"?G(x._storedError):v(z,G)}function le(x,z,G){x._state==="closed"?G():S(z,G)}function he(x,z,G){if(F)return;F=!0,s._state==="writable"&&!Ie(s)?S(Je(),ge):ge();function ge(){R(x(),()=>ke(z,G),xt=>ke(!0,xt))}}function Se(x,z){F||(F=!0,s._state==="writable"&&!Ie(s)?S(Je(),()=>ke(x,z)):ke(x,z))}function ke(x,z){Eo($),oe(E),w!==void 0&&w.removeEventListener("abort",K),x?U(z):j(void 0)}})}class Pt{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!cn(this))throw dn("desiredSize");return Li(this)}close(){if(!cn(this))throw dn("close");if(!It(this))throw new TypeError("The stream is not in a state that permits close");mr(this)}enqueue(s=void 0){if(!cn(this))throw dn("enqueue");if(!It(this))throw new TypeError("The stream is not in a state that permits enqueue");return hn(this,s)}error(s=void 0){if(!cn(this))throw dn("error");Xe(this,s)}[ai](s){Ye(this);let l=this._cancelAlgorithm(s);return fn(this),l}[li](s){let l=this._controlledReadableStream;if(this._queue.length>0){let c=di(this);this._closeRequested&&this._queue.length===0?(fn(this),gr(l)):pr(this),s._chunkSteps(c)}else Hs(l,s),pr(this)}}Object.defineProperties(Pt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Pt.prototype,e.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function cn(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledReadableStream")?!1:n instanceof Pt}function pr(n){if(!qo(n))return;if(n._pulling){n._pullAgain=!0;return}n._pulling=!0;let l=n._pullAlgorithm();R(l,()=>{n._pulling=!1,n._pullAgain&&(n._pullAgain=!1,pr(n))},c=>{Xe(n,c)})}function qo(n){let s=n._controlledReadableStream;return!It(n)||!n._started?!1:!!(Ze(s)&&Mr(s)>0||Li(n)>0)}function fn(n){n._pullAlgorithm=void 0,n._cancelAlgorithm=void 0,n._strategySizeAlgorithm=void 0}function mr(n){if(!It(n))return;let s=n._controlledReadableStream;n._closeRequested=!0,n._queue.length===0&&(fn(n),gr(s))}function hn(n,s){if(!It(n))return;let l=n._controlledReadableStream;if(Ze(l)&&Mr(l)>0)hi(l,s,!1);else{let c;try{c=n._strategySizeAlgorithm(s)}catch(b){throw Xe(n,b),b}try{pi(n,s,c)}catch(b){throw Xe(n,b),b}}pr(n)}function Xe(n,s){let l=n._controlledReadableStream;l._state==="readable"&&(Ye(n),fn(n),No(l,s))}function Li(n){let s=n._controlledReadableStream._state;return s==="errored"?null:s==="closed"?0:n._strategyHWM-n._queueTotalSize}function Jf(n){return!qo(n)}function It(n){let s=n._controlledReadableStream._state;return!n._closeRequested&&s==="readable"}function Do(n,s,l,c,b,w,E){s._controlledReadableStream=n,s._queue=void 0,s._queueTotalSize=void 0,Ye(s),s._started=!1,s._closeRequested=!1,s._pullAgain=!1,s._pulling=!1,s._strategySizeAlgorithm=E,s._strategyHWM=w,s._pullAlgorithm=c,s._cancelAlgorithm=b,n._readableStreamController=s;let $=l();R(g($),()=>{s._started=!0,pr(s)},F=>{Xe(s,F)})}function eh(n,s,l,c){let b=Object.create(Pt.prototype),w=()=>{},E=()=>g(void 0),$=()=>g(void 0);s.start!==void 0&&(w=()=>s.start(b)),s.pull!==void 0&&(E=()=>s.pull(b)),s.cancel!==void 0&&($=F=>s.cancel(F)),Do(n,b,w,E,$,l,c)}function dn(n){return new TypeError(`ReadableStreamDefaultController.prototype.${n} can only be used on a ReadableStreamDefaultController`)}function th(n,s){return ut(n._readableStreamController)?nh(n):rh(n)}function rh(n,s){let l=At(n),c=!1,b=!1,w=!1,E=!1,$,F,k,j,U,K=y(le=>{U=le});function $e(){return c?(b=!0,g(void 0)):(c=!0,ir(l,{_chunkSteps:he=>{A(()=>{b=!1;let Se=he,ke=he;w||hn(k._readableStreamController,Se),E||hn(j._readableStreamController,ke),c=!1,b&&$e()})},_closeSteps:()=>{c=!1,w||mr(k._readableStreamController),E||mr(j._readableStreamController),(!w||!E)&&U(void 0)},_errorSteps:()=>{c=!1}}),g(void 0))}function Lt(le){if(w=!0,$=le,E){let he=sr([$,F]),Se=Te(n,he);U(Se)}return K}function Je(le){if(E=!0,F=le,w){let he=sr([$,F]),Se=Te(n,he);U(Se)}return K}function ze(){}return k=xi(ze,$e,Lt),j=xi(ze,$e,Je),v(l._closedPromise,le=>{Xe(k._readableStreamController,le),Xe(j._readableStreamController,le),(!w||!E)&&U(void 0)}),[k,j]}function nh(n){let s=At(n),l=!1,c=!1,b=!1,w=!1,E=!1,$,F,k,j,U,K=y(x=>{U=x});function $e(x){v(x._closedPromise,z=>{x===s&&(Ae(k._readableStreamController,z),Ae(j._readableStreamController,z),(!w||!E)&&U(void 0))})}function Lt(){ft(s)&&(oe(s),s=At(n),$e(s)),ir(s,{_chunkSteps:z=>{A(()=>{c=!1,b=!1;let G=z,ge=z;if(!w&&!E)try{ge=to(z)}catch(xt){Ae(k._readableStreamController,xt),Ae(j._readableStreamController,xt),U(Te(n,xt));return}w||Qr(k._readableStreamController,G),E||Qr(j._readableStreamController,ge),l=!1,c?ze():b&&le()})},_closeSteps:()=>{l=!1,w||ar(k._readableStreamController),E||ar(j._readableStreamController),k._readableStreamController._pendingPullIntos.length>0&&Kr(k._readableStreamController,0),j._readableStreamController._pendingPullIntos.length>0&&Kr(j._readableStreamController,0),(!w||!E)&&U(void 0)},_errorSteps:()=>{l=!1}})}function Je(x,z){Ve(s)&&(oe(s),s=fo(n),$e(s));let G=z?j:k,ge=z?k:j;mo(s,x,{_chunkSteps:qt=>{A(()=>{c=!1,b=!1;let Dt=z?E:w;if(z?w:E)Dt||Zr(G._readableStreamController,qt);else{let Ko;try{Ko=to(qt)}catch(Di){Ae(G._readableStreamController,Di),Ae(ge._readableStreamController,Di),U(Te(n,Di));return}Dt||Zr(G._readableStreamController,qt),Qr(ge._readableStreamController,Ko)}l=!1,c?ze():b&&le()})},_closeSteps:qt=>{l=!1;let Dt=z?E:w,En=z?w:E;Dt||ar(G._readableStreamController),En||ar(ge._readableStreamController),qt!==void 0&&(Dt||Zr(G._readableStreamController,qt),!En&&ge._readableStreamController._pendingPullIntos.length>0&&Kr(ge._readableStreamController,0)),(!Dt||!En)&&U(void 0)},_errorSteps:()=>{l=!1}})}function ze(){if(l)return c=!0,g(void 0);l=!0;let x=yi(k._readableStreamController);return x===null?Lt():Je(x._view,!1),g(void 0)}function le(){if(l)return b=!0,g(void 0);l=!0;let x=yi(j._readableStreamController);return x===null?Lt():Je(x._view,!0),g(void 0)}function he(x){if(w=!0,$=x,E){let z=sr([$,F]),G=Te(n,z);U(G)}return K}function Se(x){if(E=!0,F=x,w){let z=sr([$,F]),G=Te(n,z);U(G)}return K}function ke(){}return k=Fo(ke,ze,he),j=Fo(ke,le,Se),$e(s),[k,j]}function ih(n,s){Fe(n,s);let l=n,c=l==null?void 0:l.autoAllocateChunkSize,b=l==null?void 0:l.cancel,w=l==null?void 0:l.pull,E=l==null?void 0:l.start,$=l==null?void 0:l.type;return{autoAllocateChunkSize:c===void 0?void 0:Ms(c,`${s} has member 'autoAllocateChunkSize' that`),cancel:b===void 0?void 0:sh(b,l,`${s} has member 'cancel' that`),pull:w===void 0?void 0:oh(w,l,`${s} has member 'pull' that`),start:E===void 0?void 0:ah(E,l,`${s} has member 'start' that`),type:$===void 0?void 0:lh($,`${s} has member 'type' that`)}}function sh(n,s,l){return ve(n,l),c=>I(n,s,[c])}function oh(n,s,l){return ve(n,l),c=>I(n,s,[c])}function ah(n,s,l){return ve(n,l),c=>q(n,s,[c])}function lh(n,s){if(n=`${n}`,n!=="bytes")throw new TypeError(`${s} '${n}' is not a valid enumeration value for ReadableStreamType`);return n}function uh(n,s){Fe(n,s);let l=n==null?void 0:n.mode;return{mode:l===void 0?void 0:ch(l,`${s} has member 'mode' that`)}}function ch(n,s){if(n=`${n}`,n!=="byob")throw new TypeError(`${s} '${n}' is not a valid enumeration value for ReadableStreamReaderMode`);return n}function fh(n,s){return Fe(n,s),{preventCancel:!!(n==null?void 0:n.preventCancel)}}function Bo(n,s){Fe(n,s);let l=n==null?void 0:n.preventAbort,c=n==null?void 0:n.preventCancel,b=n==null?void 0:n.preventClose,w=n==null?void 0:n.signal;return w!==void 0&&hh(w,`${s} has member 'signal' that`),{preventAbort:!!l,preventCancel:!!c,preventClose:!!b,signal:w}}function hh(n,s){if(!vf(n))throw new TypeError(`${s} is not an AbortSignal.`)}function dh(n,s){Fe(n,s);let l=n==null?void 0:n.readable;ui(l,"readable","ReadableWritablePair"),fi(l,`${s} has member 'readable' that`);let c=n==null?void 0:n.writable;return ui(c,"writable","ReadableWritablePair"),go(c,`${s} has member 'writable' that`),{readable:l,writable:c}}class Qe{constructor(s={},l={}){s===void 0?s=null:js(s,"First parameter");let c=tn(l,"Second parameter"),b=ih(s,"First parameter");if(qi(this),b.type==="bytes"){if(c.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let w=cr(c,0);mf(this,b,w)}else{let w=en(c),E=cr(c,1);eh(this,b,E,w)}}get locked(){if(!Ke(this))throw pt("locked");return Ze(this)}cancel(s=void 0){return Ke(this)?Ze(this)?p(new TypeError("Cannot cancel a stream that already has a reader")):Te(this,s):p(pt("cancel"))}getReader(s=void 0){if(!Ke(this))throw pt("getReader");return uh(s,"First parameter").mode===void 0?At(this):fo(this)}pipeThrough(s,l={}){if(!Ke(this))throw pt("pipeThrough");Ne(s,1,"pipeThrough");let c=dh(s,"First parameter"),b=Bo(l,"Second parameter");if(Ze(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Ct(c.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let w=xo(this,c.writable,b.preventClose,b.preventAbort,b.preventCancel,b.signal);return D(w),c.readable}pipeTo(s,l={}){if(!Ke(this))return p(pt("pipeTo"));if(s===void 0)return p("Parameter 1 is required in 'pipeTo'.");if(!$t(s))return p(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let c;try{c=Bo(l,"Second parameter")}catch(b){return p(b)}return Ze(this)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Ct(s)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):xo(this,s,c.preventClose,c.preventAbort,c.preventCancel,c.signal)}tee(){if(!Ke(this))throw pt("tee");let s=th(this);return sr(s)}values(s=void 0){if(!Ke(this))throw pt("values");let l=fh(s,"First parameter");return lf(this,l.preventCancel)}}Object.defineProperties(Qe.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Qe.prototype,e.toStringTag,{value:"ReadableStream",configurable:!0}),typeof e.asyncIterator=="symbol"&&Object.defineProperty(Qe.prototype,e.asyncIterator,{value:Qe.prototype.values,writable:!0,configurable:!0});function xi(n,s,l,c=1,b=()=>1){let w=Object.create(Qe.prototype);qi(w);let E=Object.create(Pt.prototype);return Do(w,E,n,s,l,c,b),w}function Fo(n,s,l){let c=Object.create(Qe.prototype);qi(c);let b=Object.create(Tt.prototype);return co(c,b,n,s,l,0,void 0),c}function qi(n){n._state="readable",n._reader=void 0,n._storedError=void 0,n._disturbed=!1}function Ke(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readableStreamController")?!1:n instanceof Qe}function Ze(n){return n._reader!==void 0}function Te(n,s){if(n._disturbed=!0,n._state==="closed")return g(void 0);if(n._state==="errored")return p(n._storedError);gr(n);let l=n._reader;l!==void 0&&ft(l)&&(l._readIntoRequests.forEach(b=>{b._closeSteps(void 0)}),l._readIntoRequests=new W);let c=n._readableStreamController[ai](s);return P(c,t)}function gr(n){n._state="closed";let s=n._reader;s!==void 0&&(Ns(s),Ve(s)&&(s._readRequests.forEach(l=>{l._closeSteps()}),s._readRequests=new W))}function No(n,s){n._state="errored",n._storedError=s;let l=n._reader;l!==void 0&&(oi(l,s),Ve(l)?(l._readRequests.forEach(c=>{c._errorSteps(s)}),l._readRequests=new W):(l._readIntoRequests.forEach(c=>{c._errorSteps(s)}),l._readIntoRequests=new W))}function pt(n){return new TypeError(`ReadableStream.prototype.${n} can only be used on a ReadableStream`)}function zo(n,s){Fe(n,s);let l=n==null?void 0:n.highWaterMark;return ui(l,"highWaterMark","QueuingStrategyInit"),{highWaterMark:ci(l)}}let ko=n=>n.byteLength;try{Object.defineProperty(ko,"name",{value:"size",configurable:!0})}catch{}class pn{constructor(s){Ne(s,1,"ByteLengthQueuingStrategy"),s=zo(s,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=s.highWaterMark}get highWaterMark(){if(!jo(this))throw Wo("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!jo(this))throw Wo("size");return ko}}Object.defineProperties(pn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(pn.prototype,e.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Wo(n){return new TypeError(`ByteLengthQueuingStrategy.prototype.${n} can only be used on a ByteLengthQueuingStrategy`)}function jo(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_byteLengthQueuingStrategyHighWaterMark")?!1:n instanceof pn}let Uo=()=>1;try{Object.defineProperty(Uo,"name",{value:"size",configurable:!0})}catch{}class mn{constructor(s){Ne(s,1,"CountQueuingStrategy"),s=zo(s,"First parameter"),this._countQueuingStrategyHighWaterMark=s.highWaterMark}get highWaterMark(){if(!Ho(this))throw Mo("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Ho(this))throw Mo("size");return Uo}}Object.defineProperties(mn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(mn.prototype,e.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Mo(n){return new TypeError(`CountQueuingStrategy.prototype.${n} can only be used on a CountQueuingStrategy`)}function Ho(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_countQueuingStrategyHighWaterMark")?!1:n instanceof mn}function ph(n,s){Fe(n,s);let l=n==null?void 0:n.flush,c=n==null?void 0:n.readableType,b=n==null?void 0:n.start,w=n==null?void 0:n.transform,E=n==null?void 0:n.writableType;return{flush:l===void 0?void 0:mh(l,n,`${s} has member 'flush' that`),readableType:c,start:b===void 0?void 0:gh(b,n,`${s} has member 'start' that`),transform:w===void 0?void 0:bh(w,n,`${s} has member 'transform' that`),writableType:E}}function mh(n,s,l){return ve(n,l),c=>I(n,s,[c])}function gh(n,s,l){return ve(n,l),c=>q(n,s,[c])}function bh(n,s,l){return ve(n,l),(c,b)=>I(n,s,[c,b])}class gn{constructor(s={},l={},c={}){s===void 0&&(s=null);let b=tn(l,"Second parameter"),w=tn(c,"Third parameter"),E=ph(s,"First parameter");if(E.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(E.writableType!==void 0)throw new RangeError("Invalid writableType specified");let $=cr(w,0),F=en(w),k=cr(b,1),j=en(b),U,K=y($e=>{U=$e});yh(this,K,k,j,$,F),_h(this,E),E.start!==void 0?U(E.start(this._transformStreamController)):U(void 0)}get readable(){if(!Go(this))throw Qo("readable");return this._readable}get writable(){if(!Go(this))throw Qo("writable");return this._writable}}Object.defineProperties(gn.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(gn.prototype,e.toStringTag,{value:"TransformStream",configurable:!0});function yh(n,s,l,c,b,w){function E(){return s}function $(K){return Rh(n,K)}function F(K){return vh(n,K)}function k(){return Ah(n)}n._writable=$f(E,$,k,F,l,c);function j(){return Th(n)}function U(K){return yn(n,K),g(void 0)}n._readable=xi(E,j,U,b,w),n._backpressure=void 0,n._backpressureChangePromise=void 0,n._backpressureChangePromise_resolve=void 0,Sn(n,!0),n._transformStreamController=void 0}function Go(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_transformStreamController")?!1:n instanceof gn}function bn(n,s){Xe(n._readable._readableStreamController,s),yn(n,s)}function yn(n,s){Vo(n._transformStreamController),Ti(n._writable._writableStreamController,s),n._backpressure&&Sn(n,!1)}function Sn(n,s){n._backpressureChangePromise!==void 0&&n._backpressureChangePromise_resolve(),n._backpressureChangePromise=y(l=>{n._backpressureChangePromise_resolve=l}),n._backpressure=s}class br{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!_n(this))throw wn("desiredSize");let s=this._controlledTransformStream._readable._readableStreamController;return Li(s)}enqueue(s=void 0){if(!_n(this))throw wn("enqueue");Yo(this,s)}error(s=void 0){if(!_n(this))throw wn("error");wh(this,s)}terminate(){if(!_n(this))throw wn("terminate");Eh(this)}}Object.defineProperties(br.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(br.prototype,e.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function _n(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledTransformStream")?!1:n instanceof br}function Sh(n,s,l,c){s._controlledTransformStream=n,n._transformStreamController=s,s._transformAlgorithm=l,s._flushAlgorithm=c}function _h(n,s){let l=Object.create(br.prototype),c=w=>{try{return Yo(l,w),g(void 0)}catch(E){return p(E)}},b=()=>g(void 0);s.transform!==void 0&&(c=w=>s.transform(w,l)),s.flush!==void 0&&(b=()=>s.flush(l)),Sh(n,l,c,b)}function Vo(n){n._transformAlgorithm=void 0,n._flushAlgorithm=void 0}function Yo(n,s){let l=n._controlledTransformStream,c=l._readable._readableStreamController;if(!It(c))throw new TypeError("Readable side is not in a state that permits enqueue");try{hn(c,s)}catch(w){throw yn(l,w),l._readable._storedError}Jf(c)!==l._backpressure&&Sn(l,!0)}function wh(n,s){bn(n._controlledTransformStream,s)}function Xo(n,s){let l=n._transformAlgorithm(s);return P(l,void 0,c=>{throw bn(n._controlledTransformStream,c),c})}function Eh(n){let s=n._controlledTransformStream,l=s._readable._readableStreamController;mr(l);let c=new TypeError("TransformStream terminated");yn(s,c)}function Rh(n,s){let l=n._transformStreamController;if(n._backpressure){let c=n._backpressureChangePromise;return P(c,()=>{let b=n._writable;if(b._state==="erroring")throw b._storedError;return Xo(l,s)})}return Xo(l,s)}function vh(n,s){return bn(n,s),g(void 0)}function Ah(n){let s=n._readable,l=n._transformStreamController,c=l._flushAlgorithm();return Vo(l),P(c,()=>{if(s._state==="errored")throw s._storedError;mr(s._readableStreamController)},b=>{throw bn(n,b),s._storedError})}function Th(n){return Sn(n,!1),n._backpressureChangePromise}function wn(n){return new TypeError(`TransformStreamDefaultController.prototype.${n} can only be used on a TransformStreamDefaultController`)}function Qo(n){return new TypeError(`TransformStream.prototype.${n} can only be used on a TransformStream`)}r.ByteLengthQueuingStrategy=pn,r.CountQueuingStrategy=mn,r.ReadableByteStreamController=Tt,r.ReadableStream=Qe,r.ReadableStreamBYOBReader=ur,r.ReadableStreamBYOBRequest=or,r.ReadableStreamDefaultController=Pt,r.ReadableStreamDefaultReader=nr,r.TransformStream=gn,r.TransformStreamDefaultController=br,r.WritableStream=fr,r.WritableStreamDefaultController=Ot,r.WritableStreamDefaultWriter=hr,Object.defineProperty(r,"__esModule",{value:!0})})});var pa=T(()=>{if(!globalThis.ReadableStream)try{let r=be("node:process"),{emitWarning:e}=r;try{r.emitWarning=()=>{},Object.assign(globalThis,be("node:stream/web")),r.emitWarning=e}catch(t){throw r.emitWarning=e,t}}catch{Object.assign(globalThis,da())}try{let{Blob:r}=be("buffer");r&&!r.prototype.stream&&(r.prototype.stream=function(t){let i=0,o=this;return new ReadableStream({type:"bytes",async pull(a){let h=await o.slice(i,Math.min(o.size,i+65536)).arrayBuffer();i+=h.byteLength,a.enqueue(new Uint8Array(h)),i===o.size&&a.close()}})})}catch{}});async function*Hi(r,e=!0){for(let t of r)if("stream"in t)yield*t.stream();else if(ArrayBuffer.isView(t))if(e){let i=t.byteOffset,o=t.byteOffset+t.byteLength;for(;i!==o;){let a=Math.min(o-i,ma),u=t.buffer.slice(i,i+a);i+=u.byteLength,yield new Uint8Array(u)}}else yield t;else{let i=0,o=t;for(;i!==o.size;){let u=await o.slice(i,Math.min(o.size,i+ma)).arrayBuffer();i+=u.byteLength,yield new Uint8Array(u)}}}var Nb,ma,ga,Mh,We,wr=yr(()=>{Nb=Ce(pa(),1);ma=65536;ga=class Gi{#e=[];#t="";#r=0;#n="transparent";constructor(e=[],t={}){if(typeof e!="object"||e===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof e[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof t!="object"&&typeof t!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");t===null&&(t={});let i=new TextEncoder;for(let a of e){let u;ArrayBuffer.isView(a)?u=new Uint8Array(a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength)):a instanceof ArrayBuffer?u=new Uint8Array(a.slice(0)):a instanceof Gi?u=a:u=i.encode(`${a}`),this.#r+=ArrayBuffer.isView(u)?u.byteLength:u.size,this.#e.push(u)}this.#n=`${t.endings===void 0?"transparent":t.endings}`;let o=t.type===void 0?"":String(t.type);this.#t=/^[\x20-\x7E]*$/.test(o)?o:""}get size(){return this.#r}get type(){return this.#t}async text(){let e=new TextDecoder,t="";for await(let i of Hi(this.#e,!1))t+=e.decode(i,{stream:!0});return t+=e.decode(),t}async arrayBuffer(){let e=new Uint8Array(this.size),t=0;for await(let i of Hi(this.#e,!1))e.set(i,t),t+=i.length;return e.buffer}stream(){let e=Hi(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(t){let i=await e.next();i.done?t.close():t.enqueue(i.value)},async cancel(){await e.return()}})}slice(e=0,t=this.size,i=""){let{size:o}=this,a=e<0?Math.max(o+e,0):Math.min(e,o),u=t<0?Math.max(o+t,0):Math.min(t,o),h=Math.max(u-a,0),d=this.#e,f=[],m=0;for(let g of d){if(m>=h)break;let p=ArrayBuffer.isView(g)?g.byteLength:g.size;if(a&&p<=a)a-=p,u-=p;else{let _;ArrayBuffer.isView(g)?(_=g.subarray(a,Math.min(p,u)),m+=_.byteLength):(_=g.slice(a,Math.min(p,u)),m+=_.size),u-=p,f.push(_),a=0}}let y=new Gi([],{type:String(i).toLowerCase()});return y.#r=h,y.#e=f,y}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e=="object"&&typeof e.constructor=="function"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}};Object.defineProperties(ga.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});Mh=ga,We=Mh});var Hh,Gh,Ft,Vi=yr(()=>{wr();Hh=class extends We{#e=0;#t="";constructor(e,t,i={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(e,i),i===null&&(i={});let o=i.lastModified===void 0?Date.now():Number(i.lastModified);Number.isNaN(o)||(this.#e=o),this.#t=String(t)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](e){return!!e&&e instanceof We&&/^(File)$/.test(e[Symbol.toStringTag])}},Gh=Hh,Ft=Gh});function Sa(r,e=We){var t=`${ba()}${ba()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),i=[],o=`--${t}\r
4
- Content-Disposition: form-data; name="`;return r.forEach((a,u)=>typeof a=="string"?i.push(o+Yi(u)+`"\r
3
+ var Fh=Object.create;var Fi=Object.defineProperty;var Nh=Object.getOwnPropertyDescriptor;var zh=Object.getOwnPropertyNames;var kh=Object.getPrototypeOf,Wh=Object.prototype.hasOwnProperty;var ye=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var Sr=(r,e)=>()=>(r&&(e=r(r=0)),e);var A=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),jh=(r,e)=>{for(var t in e)Fi(r,t,{get:e[t],enumerable:!0})},Uh=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of zh(e))!Wh.call(r,o)&&o!==t&&Fi(r,o,{get:()=>e[o],enumerable:!(i=Nh(e,o))||i.enumerable});return r};var Ie=(r,e,t)=>(t=r!=null?Fh(kh(r)):{},Uh(e||!r||!r.__esModule?Fi(t,"default",{value:r,enumerable:!0}):t,r));var na=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var nt=(r,e,t)=>(na(r,e,"read from private field"),t?t.call(r):e.get(r)),vn=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)};var se=(r,e,t)=>(na(r,e,"access private method"),t);var oa=A((zb,sa)=>{"use strict";var zi=ye("https"),ki=ye("http"),{URL:ia}=ye("url"),Wi=class extends ki.Agent{constructor(e){let{proxy:t,proxyRequestOptions:i,...o}=e;super(o),this.proxy=typeof t=="string"?new ia(t):t,this.proxyRequestOptions=i||{}}createConnection(e,t){let i={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let a=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");i.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(i.servername=this.proxy.hostname);let o=(this.proxy.protocol==="http:"?ki:zi).request(i);o.once("connect",(a,u,h)=>{o.removeAllListeners(),u.removeAllListeners(),a.statusCode===200?t(null,u):(u.destroy(),t(new Error(`Bad response: ${a.statusCode}`),null))}),o.once("timeout",()=>{o.destroy(new Error("Proxy timeout"))}),o.once("error",a=>{o.removeAllListeners(),t(a,null)}),o.end()}},ji=class extends zi.Agent{constructor(e){let{proxy:t,proxyRequestOptions:i,...o}=e;super(o),this.proxy=typeof t=="string"?new ia(t):t,this.proxyRequestOptions=i||{}}createConnection(e,t){let i={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let a=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");i.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(i.servername=this.proxy.hostname);let o=(this.proxy.protocol==="http:"?ki:zi).request(i);o.once("connect",(a,u,h)=>{if(o.removeAllListeners(),u.removeAllListeners(),a.statusCode===200){let d=super.createConnection({...e,socket:u});t(null,d)}else u.destroy(),t(new Error(`Bad response: ${a.statusCode}`),null)}),o.once("timeout",()=>{o.destroy(new Error("Proxy timeout"))}),o.once("error",a=>{o.removeAllListeners(),t(a,null)}),o.end()}};sa.exports={HttpProxyAgent:Wi,HttpsProxyAgent:ji}});var ca=A(ua=>{"use strict";var Mh=ye("url").parse,Hh={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Gh=String.prototype.endsWith||function(r){return r.length<=this.length&&this.indexOf(r,this.length-r.length)!==-1};function Vh(r){var e=typeof r=="string"?Mh(r):r||{},t=e.protocol,i=e.host,o=e.port;if(typeof i!="string"||!i||typeof t!="string"||(t=t.split(":",1)[0],i=i.replace(/:\d*$/,""),o=parseInt(o)||Hh[t]||0,!Yh(i,o)))return"";var a=Nt("npm_config_"+t+"_proxy")||Nt(t+"_proxy")||Nt("npm_config_proxy")||Nt("all_proxy");return a&&a.indexOf("://")===-1&&(a=t+"://"+a),a}function Yh(r,e){var t=(Nt("npm_config_no_proxy")||Nt("no_proxy")).toLowerCase();return t?t==="*"?!1:t.split(/[,\s]/).every(function(i){if(!i)return!0;var o=i.match(/^(.+):(\d+)$/),a=o?o[1]:i,u=o?parseInt(o[2]):0;return u&&u!==e?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!Gh.call(r,a)):r!==a}):!0}function Nt(r){return process.env[r.toLowerCase()]||process.env[r.toUpperCase()]||""}ua.getProxyForUrl=Vh});var Hi=A((Yb,ma)=>{"use strict";function Zh(r,e){var t=r;e.slice(0,-1).forEach(function(o){t=t[o]||{}});var i=e[e.length-1];return i in t}function da(r){return typeof r=="number"||/^0x[0-9a-f]+$/i.test(r)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(r)}function pa(r,e){return e==="constructor"&&typeof r[e]=="function"||e==="__proto__"}ma.exports=function(r,e){e||(e={});var t={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(t.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?t.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(v){t.bools[v]=!0});var i={};function o(v){return i[v].some(function(x){return t.bools[x]})}Object.keys(e.alias||{}).forEach(function(v){i[v]=[].concat(e.alias[v]),i[v].forEach(function(x){i[x]=[v].concat(i[v].filter(function(q){return x!==q}))})}),[].concat(e.string).filter(Boolean).forEach(function(v){t.strings[v]=!0,i[v]&&[].concat(i[v]).forEach(function(x){t.strings[x]=!0})});var a=e.default||{},u={_:[]};function h(v,x){return t.allBools&&/^--[^=]+$/.test(x)||t.strings[v]||t.bools[v]||i[v]}function d(v,x,q){for(var D=v,W=0;W<x.length-1;W++){var G=x[W];if(pa(D,G))return;D[G]===void 0&&(D[G]={}),(D[G]===Object.prototype||D[G]===Number.prototype||D[G]===String.prototype)&&(D[G]={}),D[G]===Array.prototype&&(D[G]=[]),D=D[G]}var K=x[x.length-1];pa(D,K)||((D===Object.prototype||D===Number.prototype||D===String.prototype)&&(D={}),D===Array.prototype&&(D=[]),D[K]===void 0||t.bools[K]||typeof D[K]=="boolean"?D[K]=q:Array.isArray(D[K])?D[K].push(q):D[K]=[D[K],q])}function f(v,x,q){if(!(q&&t.unknownFn&&!h(v,q)&&t.unknownFn(q)===!1)){var D=!t.strings[v]&&da(x)?Number(x):x;d(u,v.split("."),D),(i[v]||[]).forEach(function(W){d(u,W.split("."),D)})}}Object.keys(t.bools).forEach(function(v){f(v,a[v]===void 0?!1:a[v])});var g=[];r.indexOf("--")!==-1&&(g=r.slice(r.indexOf("--")+1),r=r.slice(0,r.indexOf("--")));for(var y=0;y<r.length;y++){var m=r[y],p,S;if(/^--.+=/.test(m)){var R=m.match(/^--([^=]+)=([\s\S]*)$/);p=R[1];var T=R[2];t.bools[p]&&(T=T!=="false"),f(p,T,m)}else if(/^--no-.+/.test(m))p=m.match(/^--no-(.+)/)[1],f(p,!1,m);else if(/^--.+/.test(m))p=m.match(/^--(.+)/)[1],S=r[y+1],S!==void 0&&!/^(-|--)[^-]/.test(S)&&!t.bools[p]&&!t.allBools&&(!i[p]||!o(p))?(f(p,S,m),y+=1):/^(true|false)$/.test(S)?(f(p,S==="true",m),y+=1):f(p,t.strings[p]?"":!0,m);else if(/^-[^-]+/.test(m)){for(var _=m.slice(1,-1).split(""),P=!1,I=0;I<_.length;I++){if(S=m.slice(I+2),S==="-"){f(_[I],S,m);continue}if(/[A-Za-z]/.test(_[I])&&S[0]==="="){f(_[I],S.slice(1),m),P=!0;break}if(/[A-Za-z]/.test(_[I])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(S)){f(_[I],S,m),P=!0;break}if(_[I+1]&&_[I+1].match(/\W/)){f(_[I],m.slice(I+2),m),P=!0;break}else f(_[I],t.strings[_[I]]?"":!0,m)}p=m.slice(-1)[0],!P&&p!=="-"&&(r[y+1]&&!/^(-|--)[^-]/.test(r[y+1])&&!t.bools[p]&&(!i[p]||!o(p))?(f(p,r[y+1],m),y+=1):r[y+1]&&/^(true|false)$/.test(r[y+1])?(f(p,r[y+1]==="true",m),y+=1):f(p,t.strings[p]?"":!0,m))}else if((!t.unknownFn||t.unknownFn(m)!==!1)&&u._.push(t.strings._||!da(m)?m:Number(m)),e.stopEarly){u._.push.apply(u._,r.slice(y+1));break}}return Object.keys(a).forEach(function(v){Zh(u,v.split("."))||(d(u,v.split("."),a[v]),(i[v]||[]).forEach(function(x){d(u,x.split("."),a[v])}))}),e["--"]?u["--"]=g.slice():g.forEach(function(v){u._.push(v)}),u}});var ya=A((Tn,ba)=>{(function(r,e){typeof Tn=="object"&&typeof ba<"u"?e(Tn):typeof define=="function"&&define.amd?define(["exports"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.WebStreamsPolyfill={}))})(Tn,function(r){"use strict";let e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:n=>`Symbol(${n})`;function t(){}function i(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}let o=i();function a(n){return typeof n=="object"&&n!==null||typeof n=="function"}let u=t,h=Promise,d=Promise.prototype.then,f=Promise.resolve.bind(h),g=Promise.reject.bind(h);function y(n){return new h(n)}function m(n){return f(n)}function p(n){return g(n)}function S(n,s,l){return d.call(n,s,l)}function R(n,s,l){S(S(n,s,l),void 0,u)}function T(n,s){R(n,s)}function _(n,s){R(n,void 0,s)}function P(n,s,l){return S(n,s,l)}function I(n){S(n,void 0,u)}let v=(()=>{let n=o&&o.queueMicrotask;if(typeof n=="function")return n;let s=m(void 0);return l=>S(s,l)})();function x(n,s,l){if(typeof n!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(n,s,l)}function q(n,s,l){try{return m(x(n,s,l))}catch(c){return p(c)}}let D=16384;class W{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(s){let l=this._back,c=l;l._elements.length===D-1&&(c={_elements:[],_next:void 0}),l._elements.push(s),c!==l&&(this._back=c,l._next=c),++this._size}shift(){let s=this._front,l=s,c=this._cursor,b=c+1,w=s._elements,E=w[c];return b===D&&(l=s._next,b=0),--this._size,this._cursor=b,s!==l&&(this._front=l),w[c]=void 0,E}forEach(s){let l=this._cursor,c=this._front,b=c._elements;for(;(l!==b.length||c._next!==void 0)&&!(l===b.length&&(c=c._next,b=c._elements,l=0,b.length===0));)s(b[l]),++l}peek(){let s=this._front,l=this._cursor;return s._elements[l]}}function G(n,s){n._ownerReadableStream=s,s._reader=n,s._state==="readable"?oi(n):s._state==="closed"?hf(n):js(n,s._storedError)}function K(n,s){let l=n._ownerReadableStream;return Oe(l,s)}function te(n){n._ownerReadableStream._state==="readable"?ai(n,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):df(n,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),n._ownerReadableStream._reader=void 0,n._ownerReadableStream=void 0}function qe(n){return new TypeError("Cannot "+n+" a stream using a released reader")}function oi(n){n._closedPromise=y((s,l)=>{n._closedPromise_resolve=s,n._closedPromise_reject=l})}function js(n,s){oi(n),ai(n,s)}function hf(n){oi(n),Us(n)}function ai(n,s){n._closedPromise_reject!==void 0&&(I(n._closedPromise),n._closedPromise_reject(s),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0)}function df(n,s){js(n,s)}function Us(n){n._closedPromise_resolve!==void 0&&(n._closedPromise_resolve(void 0),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0)}let Ms=e("[[AbortSteps]]"),Hs=e("[[ErrorSteps]]"),li=e("[[CancelSteps]]"),ui=e("[[PullSteps]]"),Gs=Number.isFinite||function(n){return typeof n=="number"&&isFinite(n)},pf=Math.trunc||function(n){return n<0?Math.ceil(n):Math.floor(n)};function mf(n){return typeof n=="object"||typeof n=="function"}function ke(n,s){if(n!==void 0&&!mf(n))throw new TypeError(`${s} is not an object.`)}function Ce(n,s){if(typeof n!="function")throw new TypeError(`${s} is not a function.`)}function gf(n){return typeof n=="object"&&n!==null||typeof n=="function"}function Vs(n,s){if(!gf(n))throw new TypeError(`${s} is not an object.`)}function We(n,s,l){if(n===void 0)throw new TypeError(`Parameter ${s} is required in '${l}'.`)}function ci(n,s,l){if(n===void 0)throw new TypeError(`${s} is required in '${l}'.`)}function fi(n){return Number(n)}function Ys(n){return n===0?0:n}function bf(n){return Ys(pf(n))}function Xs(n,s){let c=Number.MAX_SAFE_INTEGER,b=Number(n);if(b=Ys(b),!Gs(b))throw new TypeError(`${s} is not a finite number`);if(b=bf(b),b<0||b>c)throw new TypeError(`${s} is outside the accepted range of 0 to ${c}, inclusive`);return!Gs(b)||b===0?0:b}function hi(n,s){if(!et(n))throw new TypeError(`${s} is not a ReadableStream.`)}function Ct(n){return new ir(n)}function Qs(n,s){n._reader._readRequests.push(s)}function di(n,s,l){let b=n._reader._readRequests.shift();l?b._closeSteps():b._chunkSteps(s)}function Hr(n){return n._reader._readRequests.length}function Ks(n){let s=n._reader;return!(s===void 0||!Qe(s))}class ir{constructor(s){if(We(s,1,"ReadableStreamDefaultReader"),hi(s,"First parameter"),tt(s))throw new TypeError("This stream has already been locked for exclusive reading by another reader");G(this,s),this._readRequests=new W}get closed(){return Qe(this)?this._closedPromise:p(Gr("closed"))}cancel(s=void 0){return Qe(this)?this._ownerReadableStream===void 0?p(qe("cancel")):K(this,s):p(Gr("cancel"))}read(){if(!Qe(this))return p(Gr("read"));if(this._ownerReadableStream===void 0)return p(qe("read from"));let s,l,c=y((w,E)=>{s=w,l=E});return sr(this,{_chunkSteps:w=>s({value:w,done:!1}),_closeSteps:()=>s({value:void 0,done:!0}),_errorSteps:w=>l(w)}),c}releaseLock(){if(!Qe(this))throw Gr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");te(this)}}}Object.defineProperties(ir.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(ir.prototype,e.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Qe(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readRequests")?!1:n instanceof ir}function sr(n,s){let l=n._ownerReadableStream;l._disturbed=!0,l._state==="closed"?s._closeSteps():l._state==="errored"?s._errorSteps(l._storedError):l._readableStreamController[ui](s)}function Gr(n){return new TypeError(`ReadableStreamDefaultReader.prototype.${n} can only be used on a ReadableStreamDefaultReader`)}let Zs=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Js{constructor(s,l){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=s,this._preventCancel=l}next(){let s=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?P(this._ongoingPromise,s,s):s(),this._ongoingPromise}return(s){let l=()=>this._returnSteps(s);return this._ongoingPromise?P(this._ongoingPromise,l,l):l()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let s=this._reader;if(s._ownerReadableStream===void 0)return p(qe("iterate"));let l,c,b=y((E,C)=>{l=E,c=C});return sr(s,{_chunkSteps:E=>{this._ongoingPromise=void 0,v(()=>l({value:E,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,te(s),l({value:void 0,done:!0})},_errorSteps:E=>{this._ongoingPromise=void 0,this._isFinished=!0,te(s),c(E)}}),b}_returnSteps(s){if(this._isFinished)return Promise.resolve({value:s,done:!0});this._isFinished=!0;let l=this._reader;if(l._ownerReadableStream===void 0)return p(qe("finish iterating"));if(!this._preventCancel){let c=K(l,s);return te(l),P(c,()=>({value:s,done:!0}))}return te(l),m({value:s,done:!0})}}let eo={next(){return to(this)?this._asyncIteratorImpl.next():p(ro("next"))},return(n){return to(this)?this._asyncIteratorImpl.return(n):p(ro("return"))}};Zs!==void 0&&Object.setPrototypeOf(eo,Zs);function yf(n,s){let l=Ct(n),c=new Js(l,s),b=Object.create(eo);return b._asyncIteratorImpl=c,b}function to(n){if(!a(n)||!Object.prototype.hasOwnProperty.call(n,"_asyncIteratorImpl"))return!1;try{return n._asyncIteratorImpl instanceof Js}catch{return!1}}function ro(n){return new TypeError(`ReadableStreamAsyncIterator.${n} can only be used on a ReadableSteamAsyncIterator`)}let no=Number.isNaN||function(n){return n!==n};function or(n){return n.slice()}function io(n,s,l,c,b){new Uint8Array(n).set(new Uint8Array(l,c,b),s)}function Bb(n){return n}function Vr(n){return!1}function so(n,s,l){if(n.slice)return n.slice(s,l);let c=l-s,b=new ArrayBuffer(c);return io(b,0,n,s,c),b}function Sf(n){return!(typeof n!="number"||no(n)||n<0)}function oo(n){let s=so(n.buffer,n.byteOffset,n.byteOffset+n.byteLength);return new Uint8Array(s)}function pi(n){let s=n._queue.shift();return n._queueTotalSize-=s.size,n._queueTotalSize<0&&(n._queueTotalSize=0),s.value}function mi(n,s,l){if(!Sf(l)||l===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");n._queue.push({value:s,size:l}),n._queueTotalSize+=l}function _f(n){return n._queue.peek().value}function Ke(n){n._queue=new W,n._queueTotalSize=0}class ar{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!gi(this))throw _i("view");return this._view}respond(s){if(!gi(this))throw _i("respond");if(We(s,1,"respond"),s=Xs(s,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Vr(this._view.buffer),Zr(this._associatedReadableByteStreamController,s)}respondWithNewView(s){if(!gi(this))throw _i("respondWithNewView");if(We(s,1,"respondWithNewView"),!ArrayBuffer.isView(s))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Vr(s.buffer),Jr(this._associatedReadableByteStreamController,s)}}Object.defineProperties(ar.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(ar.prototype,e.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class $t{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!ft(this))throw ur("byobRequest");return Si(this)}get desiredSize(){if(!ft(this))throw ur("desiredSize");return mo(this)}close(){if(!ft(this))throw ur("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let s=this._controlledReadableByteStream._state;if(s!=="readable")throw new TypeError(`The stream (in ${s} state) is not in the readable state and cannot be closed`);lr(this)}enqueue(s){if(!ft(this))throw ur("enqueue");if(We(s,1,"enqueue"),!ArrayBuffer.isView(s))throw new TypeError("chunk must be an array buffer view");if(s.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(s.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let l=this._controlledReadableByteStream._state;if(l!=="readable")throw new TypeError(`The stream (in ${l} state) is not in the readable state and cannot be enqueued to`);Kr(this,s)}error(s=void 0){if(!ft(this))throw ur("error");$e(this,s)}[li](s){ao(this),Ke(this);let l=this._cancelAlgorithm(s);return Qr(this),l}[ui](s){let l=this._controlledReadableByteStream;if(this._queueTotalSize>0){let b=this._queue.shift();this._queueTotalSize-=b.byteLength,fo(this);let w=new Uint8Array(b.buffer,b.byteOffset,b.byteLength);s._chunkSteps(w);return}let c=this._autoAllocateChunkSize;if(c!==void 0){let b;try{b=new ArrayBuffer(c)}catch(E){s._errorSteps(E);return}let w={buffer:b,bufferByteLength:c,byteOffset:0,byteLength:c,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(w)}Qs(l,s),ht(this)}}Object.defineProperties($t.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty($t.prototype,e.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function ft(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledReadableByteStream")?!1:n instanceof $t}function gi(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_associatedReadableByteStreamController")?!1:n instanceof ar}function ht(n){if(!vf(n))return;if(n._pulling){n._pullAgain=!0;return}n._pulling=!0;let l=n._pullAlgorithm();R(l,()=>{n._pulling=!1,n._pullAgain&&(n._pullAgain=!1,ht(n))},c=>{$e(n,c)})}function ao(n){yi(n),n._pendingPullIntos=new W}function bi(n,s){let l=!1;n._state==="closed"&&(l=!0);let c=lo(s);s.readerType==="default"?di(n,c,l):Cf(n,c,l)}function lo(n){let s=n.bytesFilled,l=n.elementSize;return new n.viewConstructor(n.buffer,n.byteOffset,s/l)}function Yr(n,s,l,c){n._queue.push({buffer:s,byteOffset:l,byteLength:c}),n._queueTotalSize+=c}function uo(n,s){let l=s.elementSize,c=s.bytesFilled-s.bytesFilled%l,b=Math.min(n._queueTotalSize,s.byteLength-s.bytesFilled),w=s.bytesFilled+b,E=w-w%l,C=b,F=!1;E>c&&(C=E-s.bytesFilled,F=!0);let k=n._queue;for(;C>0;){let j=k.peek(),U=Math.min(C,j.byteLength),Z=s.byteOffset+s.bytesFilled;io(s.buffer,Z,j.buffer,j.byteOffset,U),j.byteLength===U?k.shift():(j.byteOffset+=U,j.byteLength-=U),n._queueTotalSize-=U,co(n,U,s),C-=U}return F}function co(n,s,l){l.bytesFilled+=s}function fo(n){n._queueTotalSize===0&&n._closeRequested?(Qr(n),br(n._controlledReadableByteStream)):ht(n)}function yi(n){n._byobRequest!==null&&(n._byobRequest._associatedReadableByteStreamController=void 0,n._byobRequest._view=null,n._byobRequest=null)}function ho(n){for(;n._pendingPullIntos.length>0;){if(n._queueTotalSize===0)return;let s=n._pendingPullIntos.peek();uo(n,s)&&(Xr(n),bi(n._controlledReadableByteStream,s))}}function wf(n,s,l){let c=n._controlledReadableByteStream,b=1;s.constructor!==DataView&&(b=s.constructor.BYTES_PER_ELEMENT);let w=s.constructor,E=s.buffer,C={buffer:E,bufferByteLength:E.byteLength,byteOffset:s.byteOffset,byteLength:s.byteLength,bytesFilled:0,elementSize:b,viewConstructor:w,readerType:"byob"};if(n._pendingPullIntos.length>0){n._pendingPullIntos.push(C),yo(c,l);return}if(c._state==="closed"){let F=new w(C.buffer,C.byteOffset,0);l._closeSteps(F);return}if(n._queueTotalSize>0){if(uo(n,C)){let F=lo(C);fo(n),l._chunkSteps(F);return}if(n._closeRequested){let F=new TypeError("Insufficient bytes to fill elements in the given buffer");$e(n,F),l._errorSteps(F);return}}n._pendingPullIntos.push(C),yo(c,l),ht(n)}function Ef(n,s){let l=n._controlledReadableByteStream;if(wi(l))for(;So(l)>0;){let c=Xr(n);bi(l,c)}}function Rf(n,s,l){if(co(n,s,l),l.bytesFilled<l.elementSize)return;Xr(n);let c=l.bytesFilled%l.elementSize;if(c>0){let b=l.byteOffset+l.bytesFilled,w=so(l.buffer,b-c,b);Yr(n,w,0,w.byteLength)}l.bytesFilled-=c,bi(n._controlledReadableByteStream,l),ho(n)}function po(n,s){let l=n._pendingPullIntos.peek();yi(n),n._controlledReadableByteStream._state==="closed"?Ef(n):Rf(n,s,l),ht(n)}function Xr(n){return n._pendingPullIntos.shift()}function vf(n){let s=n._controlledReadableByteStream;return s._state!=="readable"||n._closeRequested||!n._started?!1:!!(Ks(s)&&Hr(s)>0||wi(s)&&So(s)>0||mo(n)>0)}function Qr(n){n._pullAlgorithm=void 0,n._cancelAlgorithm=void 0}function lr(n){let s=n._controlledReadableByteStream;if(!(n._closeRequested||s._state!=="readable")){if(n._queueTotalSize>0){n._closeRequested=!0;return}if(n._pendingPullIntos.length>0&&n._pendingPullIntos.peek().bytesFilled>0){let c=new TypeError("Insufficient bytes to fill elements in the given buffer");throw $e(n,c),c}Qr(n),br(s)}}function Kr(n,s){let l=n._controlledReadableByteStream;if(n._closeRequested||l._state!=="readable")return;let c=s.buffer,b=s.byteOffset,w=s.byteLength,E=c;if(n._pendingPullIntos.length>0){let C=n._pendingPullIntos.peek();Vr(C.buffer),C.buffer=C.buffer}if(yi(n),Ks(l))if(Hr(l)===0)Yr(n,E,b,w);else{n._pendingPullIntos.length>0&&Xr(n);let C=new Uint8Array(E,b,w);di(l,C,!1)}else wi(l)?(Yr(n,E,b,w),ho(n)):Yr(n,E,b,w);ht(n)}function $e(n,s){let l=n._controlledReadableByteStream;l._state==="readable"&&(ao(n),Ke(n),Qr(n),Uo(l,s))}function Si(n){if(n._byobRequest===null&&n._pendingPullIntos.length>0){let s=n._pendingPullIntos.peek(),l=new Uint8Array(s.buffer,s.byteOffset+s.bytesFilled,s.byteLength-s.bytesFilled),c=Object.create(ar.prototype);Af(c,n,l),n._byobRequest=c}return n._byobRequest}function mo(n){let s=n._controlledReadableByteStream._state;return s==="errored"?null:s==="closed"?0:n._strategyHWM-n._queueTotalSize}function Zr(n,s){let l=n._pendingPullIntos.peek();if(n._controlledReadableByteStream._state==="closed"){if(s!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(s===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(l.bytesFilled+s>l.byteLength)throw new RangeError("bytesWritten out of range")}l.buffer=l.buffer,po(n,s)}function Jr(n,s){let l=n._pendingPullIntos.peek();if(n._controlledReadableByteStream._state==="closed"){if(s.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(s.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(l.byteOffset+l.bytesFilled!==s.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(l.bufferByteLength!==s.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(l.bytesFilled+s.byteLength>l.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let b=s.byteLength;l.buffer=s.buffer,po(n,b)}function go(n,s,l,c,b,w,E){s._controlledReadableByteStream=n,s._pullAgain=!1,s._pulling=!1,s._byobRequest=null,s._queue=s._queueTotalSize=void 0,Ke(s),s._closeRequested=!1,s._started=!1,s._strategyHWM=w,s._pullAlgorithm=c,s._cancelAlgorithm=b,s._autoAllocateChunkSize=E,s._pendingPullIntos=new W,n._readableStreamController=s;let C=l();R(m(C),()=>{s._started=!0,ht(s)},F=>{$e(s,F)})}function Tf(n,s,l){let c=Object.create($t.prototype),b=()=>{},w=()=>m(void 0),E=()=>m(void 0);s.start!==void 0&&(b=()=>s.start(c)),s.pull!==void 0&&(w=()=>s.pull(c)),s.cancel!==void 0&&(E=F=>s.cancel(F));let C=s.autoAllocateChunkSize;if(C===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");go(n,c,b,w,E,l,C)}function Af(n,s,l){n._associatedReadableByteStreamController=s,n._view=l}function _i(n){return new TypeError(`ReadableStreamBYOBRequest.prototype.${n} can only be used on a ReadableStreamBYOBRequest`)}function ur(n){return new TypeError(`ReadableByteStreamController.prototype.${n} can only be used on a ReadableByteStreamController`)}function bo(n){return new cr(n)}function yo(n,s){n._reader._readIntoRequests.push(s)}function Cf(n,s,l){let b=n._reader._readIntoRequests.shift();l?b._closeSteps(s):b._chunkSteps(s)}function So(n){return n._reader._readIntoRequests.length}function wi(n){let s=n._reader;return!(s===void 0||!dt(s))}class cr{constructor(s){if(We(s,1,"ReadableStreamBYOBReader"),hi(s,"First parameter"),tt(s))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ft(s._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");G(this,s),this._readIntoRequests=new W}get closed(){return dt(this)?this._closedPromise:p(en("closed"))}cancel(s=void 0){return dt(this)?this._ownerReadableStream===void 0?p(qe("cancel")):K(this,s):p(en("cancel"))}read(s){if(!dt(this))return p(en("read"));if(!ArrayBuffer.isView(s))return p(new TypeError("view must be an array buffer view"));if(s.byteLength===0)return p(new TypeError("view must have non-zero byteLength"));if(s.buffer.byteLength===0)return p(new TypeError("view's buffer must have non-zero byteLength"));if(Vr(s.buffer),this._ownerReadableStream===void 0)return p(qe("read from"));let l,c,b=y((E,C)=>{l=E,c=C});return _o(this,s,{_chunkSteps:E=>l({value:E,done:!1}),_closeSteps:E=>l({value:E,done:!0}),_errorSteps:E=>c(E)}),b}releaseLock(){if(!dt(this))throw en("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");te(this)}}}Object.defineProperties(cr.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(cr.prototype,e.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function dt(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readIntoRequests")?!1:n instanceof cr}function _o(n,s,l){let c=n._ownerReadableStream;c._disturbed=!0,c._state==="errored"?l._errorSteps(c._storedError):wf(c._readableStreamController,s,l)}function en(n){return new TypeError(`ReadableStreamBYOBReader.prototype.${n} can only be used on a ReadableStreamBYOBReader`)}function fr(n,s){let{highWaterMark:l}=n;if(l===void 0)return s;if(no(l)||l<0)throw new RangeError("Invalid highWaterMark");return l}function tn(n){let{size:s}=n;return s||(()=>1)}function rn(n,s){ke(n,s);let l=n==null?void 0:n.highWaterMark,c=n==null?void 0:n.size;return{highWaterMark:l===void 0?void 0:fi(l),size:c===void 0?void 0:$f(c,`${s} has member 'size' that`)}}function $f(n,s){return Ce(n,s),l=>fi(n(l))}function Of(n,s){ke(n,s);let l=n==null?void 0:n.abort,c=n==null?void 0:n.close,b=n==null?void 0:n.start,w=n==null?void 0:n.type,E=n==null?void 0:n.write;return{abort:l===void 0?void 0:Pf(l,n,`${s} has member 'abort' that`),close:c===void 0?void 0:If(c,n,`${s} has member 'close' that`),start:b===void 0?void 0:xf(b,n,`${s} has member 'start' that`),write:E===void 0?void 0:Lf(E,n,`${s} has member 'write' that`),type:w}}function Pf(n,s,l){return Ce(n,l),c=>q(n,s,[c])}function If(n,s,l){return Ce(n,l),()=>q(n,s,[])}function xf(n,s,l){return Ce(n,l),c=>x(n,s,[c])}function Lf(n,s,l){return Ce(n,l),(c,b)=>q(n,s,[c,b])}function wo(n,s){if(!Ot(n))throw new TypeError(`${s} is not a WritableStream.`)}function qf(n){if(typeof n!="object"||n===null)return!1;try{return typeof n.aborted=="boolean"}catch{return!1}}let Df=typeof AbortController=="function";function Bf(){if(Df)return new AbortController}class hr{constructor(s={},l={}){s===void 0?s=null:Vs(s,"First parameter");let c=rn(l,"Second parameter"),b=Of(s,"First parameter");if(Ro(this),b.type!==void 0)throw new RangeError("Invalid type is specified");let E=tn(c),C=fr(c,1);Qf(this,b,C,E)}get locked(){if(!Ot(this))throw ln("locked");return Pt(this)}abort(s=void 0){return Ot(this)?Pt(this)?p(new TypeError("Cannot abort a stream that already has a writer")):nn(this,s):p(ln("abort"))}close(){return Ot(this)?Pt(this)?p(new TypeError("Cannot close a stream that already has a writer")):De(this)?p(new TypeError("Cannot close an already-closing stream")):vo(this):p(ln("close"))}getWriter(){if(!Ot(this))throw ln("getWriter");return Eo(this)}}Object.defineProperties(hr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(hr.prototype,e.toStringTag,{value:"WritableStream",configurable:!0});function Eo(n){return new dr(n)}function Ff(n,s,l,c,b=1,w=()=>1){let E=Object.create(hr.prototype);Ro(E);let C=Object.create(It.prototype);return Po(E,C,n,s,l,c,b,w),E}function Ro(n){n._state="writable",n._storedError=void 0,n._writer=void 0,n._writableStreamController=void 0,n._writeRequests=new W,n._inFlightWriteRequest=void 0,n._closeRequest=void 0,n._inFlightCloseRequest=void 0,n._pendingAbortRequest=void 0,n._backpressure=!1}function Ot(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_writableStreamController")?!1:n instanceof hr}function Pt(n){return n._writer!==void 0}function nn(n,s){var l;if(n._state==="closed"||n._state==="errored")return m(void 0);n._writableStreamController._abortReason=s,(l=n._writableStreamController._abortController)===null||l===void 0||l.abort();let c=n._state;if(c==="closed"||c==="errored")return m(void 0);if(n._pendingAbortRequest!==void 0)return n._pendingAbortRequest._promise;let b=!1;c==="erroring"&&(b=!0,s=void 0);let w=y((E,C)=>{n._pendingAbortRequest={_promise:void 0,_resolve:E,_reject:C,_reason:s,_wasAlreadyErroring:b}});return n._pendingAbortRequest._promise=w,b||Ri(n,s),w}function vo(n){let s=n._state;if(s==="closed"||s==="errored")return p(new TypeError(`The stream (in ${s} state) is not in the writable state and cannot be closed`));let l=y((b,w)=>{let E={_resolve:b,_reject:w};n._closeRequest=E}),c=n._writer;return c!==void 0&&n._backpressure&&s==="writable"&&xi(c),Kf(n._writableStreamController),l}function Nf(n){return y((l,c)=>{let b={_resolve:l,_reject:c};n._writeRequests.push(b)})}function Ei(n,s){if(n._state==="writable"){Ri(n,s);return}vi(n)}function Ri(n,s){let l=n._writableStreamController;n._state="erroring",n._storedError=s;let c=n._writer;c!==void 0&&Ao(c,s),!Uf(n)&&l._started&&vi(n)}function vi(n){n._state="errored",n._writableStreamController[Hs]();let s=n._storedError;if(n._writeRequests.forEach(b=>{b._reject(s)}),n._writeRequests=new W,n._pendingAbortRequest===void 0){sn(n);return}let l=n._pendingAbortRequest;if(n._pendingAbortRequest=void 0,l._wasAlreadyErroring){l._reject(s),sn(n);return}let c=n._writableStreamController[Ms](l._reason);R(c,()=>{l._resolve(),sn(n)},b=>{l._reject(b),sn(n)})}function zf(n){n._inFlightWriteRequest._resolve(void 0),n._inFlightWriteRequest=void 0}function kf(n,s){n._inFlightWriteRequest._reject(s),n._inFlightWriteRequest=void 0,Ei(n,s)}function Wf(n){n._inFlightCloseRequest._resolve(void 0),n._inFlightCloseRequest=void 0,n._state==="erroring"&&(n._storedError=void 0,n._pendingAbortRequest!==void 0&&(n._pendingAbortRequest._resolve(),n._pendingAbortRequest=void 0)),n._state="closed";let l=n._writer;l!==void 0&&qo(l)}function jf(n,s){n._inFlightCloseRequest._reject(s),n._inFlightCloseRequest=void 0,n._pendingAbortRequest!==void 0&&(n._pendingAbortRequest._reject(s),n._pendingAbortRequest=void 0),Ei(n,s)}function De(n){return!(n._closeRequest===void 0&&n._inFlightCloseRequest===void 0)}function Uf(n){return!(n._inFlightWriteRequest===void 0&&n._inFlightCloseRequest===void 0)}function Mf(n){n._inFlightCloseRequest=n._closeRequest,n._closeRequest=void 0}function Hf(n){n._inFlightWriteRequest=n._writeRequests.shift()}function sn(n){n._closeRequest!==void 0&&(n._closeRequest._reject(n._storedError),n._closeRequest=void 0);let s=n._writer;s!==void 0&&Pi(s,n._storedError)}function Ti(n,s){let l=n._writer;l!==void 0&&s!==n._backpressure&&(s?ih(l):xi(l)),n._backpressure=s}class dr{constructor(s){if(We(s,1,"WritableStreamDefaultWriter"),wo(s,"First parameter"),Pt(s))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=s,s._writer=this;let l=s._state;if(l==="writable")!De(s)&&s._backpressure?cn(this):Do(this),un(this);else if(l==="erroring")Ii(this,s._storedError),un(this);else if(l==="closed")Do(this),rh(this);else{let c=s._storedError;Ii(this,c),Lo(this,c)}}get closed(){return pt(this)?this._closedPromise:p(mt("closed"))}get desiredSize(){if(!pt(this))throw mt("desiredSize");if(this._ownerWritableStream===void 0)throw pr("desiredSize");return Xf(this)}get ready(){return pt(this)?this._readyPromise:p(mt("ready"))}abort(s=void 0){return pt(this)?this._ownerWritableStream===void 0?p(pr("abort")):Gf(this,s):p(mt("abort"))}close(){if(!pt(this))return p(mt("close"));let s=this._ownerWritableStream;return s===void 0?p(pr("close")):De(s)?p(new TypeError("Cannot close an already-closing stream")):To(this)}releaseLock(){if(!pt(this))throw mt("releaseLock");this._ownerWritableStream!==void 0&&Co(this)}write(s=void 0){return pt(this)?this._ownerWritableStream===void 0?p(pr("write to")):$o(this,s):p(mt("write"))}}Object.defineProperties(dr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(dr.prototype,e.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function pt(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_ownerWritableStream")?!1:n instanceof dr}function Gf(n,s){let l=n._ownerWritableStream;return nn(l,s)}function To(n){let s=n._ownerWritableStream;return vo(s)}function Vf(n){let s=n._ownerWritableStream,l=s._state;return De(s)||l==="closed"?m(void 0):l==="errored"?p(s._storedError):To(n)}function Yf(n,s){n._closedPromiseState==="pending"?Pi(n,s):nh(n,s)}function Ao(n,s){n._readyPromiseState==="pending"?Bo(n,s):sh(n,s)}function Xf(n){let s=n._ownerWritableStream,l=s._state;return l==="errored"||l==="erroring"?null:l==="closed"?0:Io(s._writableStreamController)}function Co(n){let s=n._ownerWritableStream,l=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Ao(n,l),Yf(n,l),s._writer=void 0,n._ownerWritableStream=void 0}function $o(n,s){let l=n._ownerWritableStream,c=l._writableStreamController,b=Zf(c,s);if(l!==n._ownerWritableStream)return p(pr("write to"));let w=l._state;if(w==="errored")return p(l._storedError);if(De(l)||w==="closed")return p(new TypeError("The stream is closing or closed and cannot be written to"));if(w==="erroring")return p(l._storedError);let E=Nf(l);return Jf(c,s,b),E}let Oo={};class It{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Ai(this))throw Oi("abortReason");return this._abortReason}get signal(){if(!Ai(this))throw Oi("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(s=void 0){if(!Ai(this))throw Oi("error");this._controlledWritableStream._state==="writable"&&xo(this,s)}[Ms](s){let l=this._abortAlgorithm(s);return on(this),l}[Hs](){Ke(this)}}Object.defineProperties(It.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(It.prototype,e.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Ai(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledWritableStream")?!1:n instanceof It}function Po(n,s,l,c,b,w,E,C){s._controlledWritableStream=n,n._writableStreamController=s,s._queue=void 0,s._queueTotalSize=void 0,Ke(s),s._abortReason=void 0,s._abortController=Bf(),s._started=!1,s._strategySizeAlgorithm=C,s._strategyHWM=E,s._writeAlgorithm=c,s._closeAlgorithm=b,s._abortAlgorithm=w;let F=$i(s);Ti(n,F);let k=l(),j=m(k);R(j,()=>{s._started=!0,an(s)},U=>{s._started=!0,Ei(n,U)})}function Qf(n,s,l,c){let b=Object.create(It.prototype),w=()=>{},E=()=>m(void 0),C=()=>m(void 0),F=()=>m(void 0);s.start!==void 0&&(w=()=>s.start(b)),s.write!==void 0&&(E=k=>s.write(k,b)),s.close!==void 0&&(C=()=>s.close()),s.abort!==void 0&&(F=k=>s.abort(k)),Po(n,b,w,E,C,F,l,c)}function on(n){n._writeAlgorithm=void 0,n._closeAlgorithm=void 0,n._abortAlgorithm=void 0,n._strategySizeAlgorithm=void 0}function Kf(n){mi(n,Oo,0),an(n)}function Zf(n,s){try{return n._strategySizeAlgorithm(s)}catch(l){return Ci(n,l),1}}function Io(n){return n._strategyHWM-n._queueTotalSize}function Jf(n,s,l){try{mi(n,s,l)}catch(b){Ci(n,b);return}let c=n._controlledWritableStream;if(!De(c)&&c._state==="writable"){let b=$i(n);Ti(c,b)}an(n)}function an(n){let s=n._controlledWritableStream;if(!n._started||s._inFlightWriteRequest!==void 0)return;if(s._state==="erroring"){vi(s);return}if(n._queue.length===0)return;let c=_f(n);c===Oo?eh(n):th(n,c)}function Ci(n,s){n._controlledWritableStream._state==="writable"&&xo(n,s)}function eh(n){let s=n._controlledWritableStream;Mf(s),pi(n);let l=n._closeAlgorithm();on(n),R(l,()=>{Wf(s)},c=>{jf(s,c)})}function th(n,s){let l=n._controlledWritableStream;Hf(l);let c=n._writeAlgorithm(s);R(c,()=>{zf(l);let b=l._state;if(pi(n),!De(l)&&b==="writable"){let w=$i(n);Ti(l,w)}an(n)},b=>{l._state==="writable"&&on(n),kf(l,b)})}function $i(n){return Io(n)<=0}function xo(n,s){let l=n._controlledWritableStream;on(n),Ri(l,s)}function ln(n){return new TypeError(`WritableStream.prototype.${n} can only be used on a WritableStream`)}function Oi(n){return new TypeError(`WritableStreamDefaultController.prototype.${n} can only be used on a WritableStreamDefaultController`)}function mt(n){return new TypeError(`WritableStreamDefaultWriter.prototype.${n} can only be used on a WritableStreamDefaultWriter`)}function pr(n){return new TypeError("Cannot "+n+" a stream using a released writer")}function un(n){n._closedPromise=y((s,l)=>{n._closedPromise_resolve=s,n._closedPromise_reject=l,n._closedPromiseState="pending"})}function Lo(n,s){un(n),Pi(n,s)}function rh(n){un(n),qo(n)}function Pi(n,s){n._closedPromise_reject!==void 0&&(I(n._closedPromise),n._closedPromise_reject(s),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0,n._closedPromiseState="rejected")}function nh(n,s){Lo(n,s)}function qo(n){n._closedPromise_resolve!==void 0&&(n._closedPromise_resolve(void 0),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0,n._closedPromiseState="resolved")}function cn(n){n._readyPromise=y((s,l)=>{n._readyPromise_resolve=s,n._readyPromise_reject=l}),n._readyPromiseState="pending"}function Ii(n,s){cn(n),Bo(n,s)}function Do(n){cn(n),xi(n)}function Bo(n,s){n._readyPromise_reject!==void 0&&(I(n._readyPromise),n._readyPromise_reject(s),n._readyPromise_resolve=void 0,n._readyPromise_reject=void 0,n._readyPromiseState="rejected")}function ih(n){cn(n)}function sh(n,s){Ii(n,s)}function xi(n){n._readyPromise_resolve!==void 0&&(n._readyPromise_resolve(void 0),n._readyPromise_resolve=void 0,n._readyPromise_reject=void 0,n._readyPromiseState="fulfilled")}let Fo=typeof DOMException<"u"?DOMException:void 0;function oh(n){if(!(typeof n=="function"||typeof n=="object"))return!1;try{return new n,!0}catch{return!1}}function ah(){let n=function(l,c){this.message=l||"",this.name=c||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return n.prototype=Object.create(Error.prototype),Object.defineProperty(n.prototype,"constructor",{value:n,writable:!0,configurable:!0}),n}let lh=oh(Fo)?Fo:ah();function No(n,s,l,c,b,w){let E=Ct(n),C=Eo(s);n._disturbed=!0;let F=!1,k=m(void 0);return y((j,U)=>{let Z;if(w!==void 0){if(Z=()=>{let L=new lh("Aborted","AbortError"),z=[];c||z.push(()=>s._state==="writable"?nn(s,L):m(void 0)),b||z.push(()=>n._state==="readable"?Oe(n,L):m(void 0)),de(()=>Promise.all(z.map(V=>V())),!0,L)},w.aborted){Z();return}w.addEventListener("abort",Z)}function Pe(){return y((L,z)=>{function V(be){be?L():S(qt(),V,z)}V(!1)})}function qt(){return F?m(!0):S(C._readyPromise,()=>y((L,z)=>{sr(E,{_chunkSteps:V=>{k=S($o(C,V),void 0,t),L(!1)},_closeSteps:()=>L(!0),_errorSteps:z})}))}if(je(n,E._closedPromise,L=>{c?_e(!0,L):de(()=>nn(s,L),!0,L)}),je(s,C._closedPromise,L=>{b?_e(!0,L):de(()=>Oe(n,L),!0,L)}),ue(n,E._closedPromise,()=>{l?_e():de(()=>Vf(C))}),De(s)||s._state==="closed"){let L=new TypeError("the destination writable stream closed before all data could be piped to it");b?_e(!0,L):de(()=>Oe(n,L),!0,L)}I(Pe());function rt(){let L=k;return S(k,()=>L!==k?rt():void 0)}function je(L,z,V){L._state==="errored"?V(L._storedError):_(z,V)}function ue(L,z,V){L._state==="closed"?V():T(z,V)}function de(L,z,V){if(F)return;F=!0,s._state==="writable"&&!De(s)?T(rt(),be):be();function be(){R(L(),()=>Ue(z,V),Dt=>Ue(!0,Dt))}}function _e(L,z){F||(F=!0,s._state==="writable"&&!De(s)?T(rt(),()=>Ue(L,z)):Ue(L,z))}function Ue(L,z){Co(C),te(E),w!==void 0&&w.removeEventListener("abort",Z),L?U(z):j(void 0)}})}class xt{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!fn(this))throw pn("desiredSize");return Li(this)}close(){if(!fn(this))throw pn("close");if(!Lt(this))throw new TypeError("The stream is not in a state that permits close");gr(this)}enqueue(s=void 0){if(!fn(this))throw pn("enqueue");if(!Lt(this))throw new TypeError("The stream is not in a state that permits enqueue");return dn(this,s)}error(s=void 0){if(!fn(this))throw pn("error");Ze(this,s)}[li](s){Ke(this);let l=this._cancelAlgorithm(s);return hn(this),l}[ui](s){let l=this._controlledReadableStream;if(this._queue.length>0){let c=pi(this);this._closeRequested&&this._queue.length===0?(hn(this),br(l)):mr(this),s._chunkSteps(c)}else Qs(l,s),mr(this)}}Object.defineProperties(xt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(xt.prototype,e.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function fn(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledReadableStream")?!1:n instanceof xt}function mr(n){if(!zo(n))return;if(n._pulling){n._pullAgain=!0;return}n._pulling=!0;let l=n._pullAlgorithm();R(l,()=>{n._pulling=!1,n._pullAgain&&(n._pullAgain=!1,mr(n))},c=>{Ze(n,c)})}function zo(n){let s=n._controlledReadableStream;return!Lt(n)||!n._started?!1:!!(tt(s)&&Hr(s)>0||Li(n)>0)}function hn(n){n._pullAlgorithm=void 0,n._cancelAlgorithm=void 0,n._strategySizeAlgorithm=void 0}function gr(n){if(!Lt(n))return;let s=n._controlledReadableStream;n._closeRequested=!0,n._queue.length===0&&(hn(n),br(s))}function dn(n,s){if(!Lt(n))return;let l=n._controlledReadableStream;if(tt(l)&&Hr(l)>0)di(l,s,!1);else{let c;try{c=n._strategySizeAlgorithm(s)}catch(b){throw Ze(n,b),b}try{mi(n,s,c)}catch(b){throw Ze(n,b),b}}mr(n)}function Ze(n,s){let l=n._controlledReadableStream;l._state==="readable"&&(Ke(n),hn(n),Uo(l,s))}function Li(n){let s=n._controlledReadableStream._state;return s==="errored"?null:s==="closed"?0:n._strategyHWM-n._queueTotalSize}function uh(n){return!zo(n)}function Lt(n){let s=n._controlledReadableStream._state;return!n._closeRequested&&s==="readable"}function ko(n,s,l,c,b,w,E){s._controlledReadableStream=n,s._queue=void 0,s._queueTotalSize=void 0,Ke(s),s._started=!1,s._closeRequested=!1,s._pullAgain=!1,s._pulling=!1,s._strategySizeAlgorithm=E,s._strategyHWM=w,s._pullAlgorithm=c,s._cancelAlgorithm=b,n._readableStreamController=s;let C=l();R(m(C),()=>{s._started=!0,mr(s)},F=>{Ze(s,F)})}function ch(n,s,l,c){let b=Object.create(xt.prototype),w=()=>{},E=()=>m(void 0),C=()=>m(void 0);s.start!==void 0&&(w=()=>s.start(b)),s.pull!==void 0&&(E=()=>s.pull(b)),s.cancel!==void 0&&(C=F=>s.cancel(F)),ko(n,b,w,E,C,l,c)}function pn(n){return new TypeError(`ReadableStreamDefaultController.prototype.${n} can only be used on a ReadableStreamDefaultController`)}function fh(n,s){return ft(n._readableStreamController)?dh(n):hh(n)}function hh(n,s){let l=Ct(n),c=!1,b=!1,w=!1,E=!1,C,F,k,j,U,Z=y(ue=>{U=ue});function Pe(){return c?(b=!0,m(void 0)):(c=!0,sr(l,{_chunkSteps:de=>{v(()=>{b=!1;let _e=de,Ue=de;w||dn(k._readableStreamController,_e),E||dn(j._readableStreamController,Ue),c=!1,b&&Pe()})},_closeSteps:()=>{c=!1,w||gr(k._readableStreamController),E||gr(j._readableStreamController),(!w||!E)&&U(void 0)},_errorSteps:()=>{c=!1}}),m(void 0))}function qt(ue){if(w=!0,C=ue,E){let de=or([C,F]),_e=Oe(n,de);U(_e)}return Z}function rt(ue){if(E=!0,F=ue,w){let de=or([C,F]),_e=Oe(n,de);U(_e)}return Z}function je(){}return k=qi(je,Pe,qt),j=qi(je,Pe,rt),_(l._closedPromise,ue=>{Ze(k._readableStreamController,ue),Ze(j._readableStreamController,ue),(!w||!E)&&U(void 0)}),[k,j]}function dh(n){let s=Ct(n),l=!1,c=!1,b=!1,w=!1,E=!1,C,F,k,j,U,Z=y(L=>{U=L});function Pe(L){_(L._closedPromise,z=>{L===s&&($e(k._readableStreamController,z),$e(j._readableStreamController,z),(!w||!E)&&U(void 0))})}function qt(){dt(s)&&(te(s),s=Ct(n),Pe(s)),sr(s,{_chunkSteps:z=>{v(()=>{c=!1,b=!1;let V=z,be=z;if(!w&&!E)try{be=oo(z)}catch(Dt){$e(k._readableStreamController,Dt),$e(j._readableStreamController,Dt),U(Oe(n,Dt));return}w||Kr(k._readableStreamController,V),E||Kr(j._readableStreamController,be),l=!1,c?je():b&&ue()})},_closeSteps:()=>{l=!1,w||lr(k._readableStreamController),E||lr(j._readableStreamController),k._readableStreamController._pendingPullIntos.length>0&&Zr(k._readableStreamController,0),j._readableStreamController._pendingPullIntos.length>0&&Zr(j._readableStreamController,0),(!w||!E)&&U(void 0)},_errorSteps:()=>{l=!1}})}function rt(L,z){Qe(s)&&(te(s),s=bo(n),Pe(s));let V=z?j:k,be=z?k:j;_o(s,L,{_chunkSteps:Bt=>{v(()=>{c=!1,b=!1;let Ft=z?E:w;if(z?w:E)Ft||Jr(V._readableStreamController,Bt);else{let ra;try{ra=oo(Bt)}catch(Bi){$e(V._readableStreamController,Bi),$e(be._readableStreamController,Bi),U(Oe(n,Bi));return}Ft||Jr(V._readableStreamController,Bt),Kr(be._readableStreamController,ra)}l=!1,c?je():b&&ue()})},_closeSteps:Bt=>{l=!1;let Ft=z?E:w,Rn=z?w:E;Ft||lr(V._readableStreamController),Rn||lr(be._readableStreamController),Bt!==void 0&&(Ft||Jr(V._readableStreamController,Bt),!Rn&&be._readableStreamController._pendingPullIntos.length>0&&Zr(be._readableStreamController,0)),(!Ft||!Rn)&&U(void 0)},_errorSteps:()=>{l=!1}})}function je(){if(l)return c=!0,m(void 0);l=!0;let L=Si(k._readableStreamController);return L===null?qt():rt(L._view,!1),m(void 0)}function ue(){if(l)return b=!0,m(void 0);l=!0;let L=Si(j._readableStreamController);return L===null?qt():rt(L._view,!0),m(void 0)}function de(L){if(w=!0,C=L,E){let z=or([C,F]),V=Oe(n,z);U(V)}return Z}function _e(L){if(E=!0,F=L,w){let z=or([C,F]),V=Oe(n,z);U(V)}return Z}function Ue(){}return k=jo(Ue,je,de),j=jo(Ue,ue,_e),Pe(s),[k,j]}function ph(n,s){ke(n,s);let l=n,c=l==null?void 0:l.autoAllocateChunkSize,b=l==null?void 0:l.cancel,w=l==null?void 0:l.pull,E=l==null?void 0:l.start,C=l==null?void 0:l.type;return{autoAllocateChunkSize:c===void 0?void 0:Xs(c,`${s} has member 'autoAllocateChunkSize' that`),cancel:b===void 0?void 0:mh(b,l,`${s} has member 'cancel' that`),pull:w===void 0?void 0:gh(w,l,`${s} has member 'pull' that`),start:E===void 0?void 0:bh(E,l,`${s} has member 'start' that`),type:C===void 0?void 0:yh(C,`${s} has member 'type' that`)}}function mh(n,s,l){return Ce(n,l),c=>q(n,s,[c])}function gh(n,s,l){return Ce(n,l),c=>q(n,s,[c])}function bh(n,s,l){return Ce(n,l),c=>x(n,s,[c])}function yh(n,s){if(n=`${n}`,n!=="bytes")throw new TypeError(`${s} '${n}' is not a valid enumeration value for ReadableStreamType`);return n}function Sh(n,s){ke(n,s);let l=n==null?void 0:n.mode;return{mode:l===void 0?void 0:_h(l,`${s} has member 'mode' that`)}}function _h(n,s){if(n=`${n}`,n!=="byob")throw new TypeError(`${s} '${n}' is not a valid enumeration value for ReadableStreamReaderMode`);return n}function wh(n,s){return ke(n,s),{preventCancel:!!(n==null?void 0:n.preventCancel)}}function Wo(n,s){ke(n,s);let l=n==null?void 0:n.preventAbort,c=n==null?void 0:n.preventCancel,b=n==null?void 0:n.preventClose,w=n==null?void 0:n.signal;return w!==void 0&&Eh(w,`${s} has member 'signal' that`),{preventAbort:!!l,preventCancel:!!c,preventClose:!!b,signal:w}}function Eh(n,s){if(!qf(n))throw new TypeError(`${s} is not an AbortSignal.`)}function Rh(n,s){ke(n,s);let l=n==null?void 0:n.readable;ci(l,"readable","ReadableWritablePair"),hi(l,`${s} has member 'readable' that`);let c=n==null?void 0:n.writable;return ci(c,"writable","ReadableWritablePair"),wo(c,`${s} has member 'writable' that`),{readable:l,writable:c}}class Je{constructor(s={},l={}){s===void 0?s=null:Vs(s,"First parameter");let c=rn(l,"Second parameter"),b=ph(s,"First parameter");if(Di(this),b.type==="bytes"){if(c.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let w=fr(c,0);Tf(this,b,w)}else{let w=tn(c),E=fr(c,1);ch(this,b,E,w)}}get locked(){if(!et(this))throw gt("locked");return tt(this)}cancel(s=void 0){return et(this)?tt(this)?p(new TypeError("Cannot cancel a stream that already has a reader")):Oe(this,s):p(gt("cancel"))}getReader(s=void 0){if(!et(this))throw gt("getReader");return Sh(s,"First parameter").mode===void 0?Ct(this):bo(this)}pipeThrough(s,l={}){if(!et(this))throw gt("pipeThrough");We(s,1,"pipeThrough");let c=Rh(s,"First parameter"),b=Wo(l,"Second parameter");if(tt(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Pt(c.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let w=No(this,c.writable,b.preventClose,b.preventAbort,b.preventCancel,b.signal);return I(w),c.readable}pipeTo(s,l={}){if(!et(this))return p(gt("pipeTo"));if(s===void 0)return p("Parameter 1 is required in 'pipeTo'.");if(!Ot(s))return p(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let c;try{c=Wo(l,"Second parameter")}catch(b){return p(b)}return tt(this)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Pt(s)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):No(this,s,c.preventClose,c.preventAbort,c.preventCancel,c.signal)}tee(){if(!et(this))throw gt("tee");let s=fh(this);return or(s)}values(s=void 0){if(!et(this))throw gt("values");let l=wh(s,"First parameter");return yf(this,l.preventCancel)}}Object.defineProperties(Je.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Je.prototype,e.toStringTag,{value:"ReadableStream",configurable:!0}),typeof e.asyncIterator=="symbol"&&Object.defineProperty(Je.prototype,e.asyncIterator,{value:Je.prototype.values,writable:!0,configurable:!0});function qi(n,s,l,c=1,b=()=>1){let w=Object.create(Je.prototype);Di(w);let E=Object.create(xt.prototype);return ko(w,E,n,s,l,c,b),w}function jo(n,s,l){let c=Object.create(Je.prototype);Di(c);let b=Object.create($t.prototype);return go(c,b,n,s,l,0,void 0),c}function Di(n){n._state="readable",n._reader=void 0,n._storedError=void 0,n._disturbed=!1}function et(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readableStreamController")?!1:n instanceof Je}function tt(n){return n._reader!==void 0}function Oe(n,s){if(n._disturbed=!0,n._state==="closed")return m(void 0);if(n._state==="errored")return p(n._storedError);br(n);let l=n._reader;l!==void 0&&dt(l)&&(l._readIntoRequests.forEach(b=>{b._closeSteps(void 0)}),l._readIntoRequests=new W);let c=n._readableStreamController[li](s);return P(c,t)}function br(n){n._state="closed";let s=n._reader;s!==void 0&&(Us(s),Qe(s)&&(s._readRequests.forEach(l=>{l._closeSteps()}),s._readRequests=new W))}function Uo(n,s){n._state="errored",n._storedError=s;let l=n._reader;l!==void 0&&(ai(l,s),Qe(l)?(l._readRequests.forEach(c=>{c._errorSteps(s)}),l._readRequests=new W):(l._readIntoRequests.forEach(c=>{c._errorSteps(s)}),l._readIntoRequests=new W))}function gt(n){return new TypeError(`ReadableStream.prototype.${n} can only be used on a ReadableStream`)}function Mo(n,s){ke(n,s);let l=n==null?void 0:n.highWaterMark;return ci(l,"highWaterMark","QueuingStrategyInit"),{highWaterMark:fi(l)}}let Ho=n=>n.byteLength;try{Object.defineProperty(Ho,"name",{value:"size",configurable:!0})}catch{}class mn{constructor(s){We(s,1,"ByteLengthQueuingStrategy"),s=Mo(s,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=s.highWaterMark}get highWaterMark(){if(!Vo(this))throw Go("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Vo(this))throw Go("size");return Ho}}Object.defineProperties(mn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(mn.prototype,e.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Go(n){return new TypeError(`ByteLengthQueuingStrategy.prototype.${n} can only be used on a ByteLengthQueuingStrategy`)}function Vo(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_byteLengthQueuingStrategyHighWaterMark")?!1:n instanceof mn}let Yo=()=>1;try{Object.defineProperty(Yo,"name",{value:"size",configurable:!0})}catch{}class gn{constructor(s){We(s,1,"CountQueuingStrategy"),s=Mo(s,"First parameter"),this._countQueuingStrategyHighWaterMark=s.highWaterMark}get highWaterMark(){if(!Qo(this))throw Xo("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Qo(this))throw Xo("size");return Yo}}Object.defineProperties(gn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(gn.prototype,e.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Xo(n){return new TypeError(`CountQueuingStrategy.prototype.${n} can only be used on a CountQueuingStrategy`)}function Qo(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_countQueuingStrategyHighWaterMark")?!1:n instanceof gn}function vh(n,s){ke(n,s);let l=n==null?void 0:n.flush,c=n==null?void 0:n.readableType,b=n==null?void 0:n.start,w=n==null?void 0:n.transform,E=n==null?void 0:n.writableType;return{flush:l===void 0?void 0:Th(l,n,`${s} has member 'flush' that`),readableType:c,start:b===void 0?void 0:Ah(b,n,`${s} has member 'start' that`),transform:w===void 0?void 0:Ch(w,n,`${s} has member 'transform' that`),writableType:E}}function Th(n,s,l){return Ce(n,l),c=>q(n,s,[c])}function Ah(n,s,l){return Ce(n,l),c=>x(n,s,[c])}function Ch(n,s,l){return Ce(n,l),(c,b)=>q(n,s,[c,b])}class bn{constructor(s={},l={},c={}){s===void 0&&(s=null);let b=rn(l,"Second parameter"),w=rn(c,"Third parameter"),E=vh(s,"First parameter");if(E.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(E.writableType!==void 0)throw new RangeError("Invalid writableType specified");let C=fr(w,0),F=tn(w),k=fr(b,1),j=tn(b),U,Z=y(Pe=>{U=Pe});$h(this,Z,k,j,C,F),Ph(this,E),E.start!==void 0?U(E.start(this._transformStreamController)):U(void 0)}get readable(){if(!Ko(this))throw ta("readable");return this._readable}get writable(){if(!Ko(this))throw ta("writable");return this._writable}}Object.defineProperties(bn.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(bn.prototype,e.toStringTag,{value:"TransformStream",configurable:!0});function $h(n,s,l,c,b,w){function E(){return s}function C(Z){return Lh(n,Z)}function F(Z){return qh(n,Z)}function k(){return Dh(n)}n._writable=Ff(E,C,k,F,l,c);function j(){return Bh(n)}function U(Z){return Sn(n,Z),m(void 0)}n._readable=qi(E,j,U,b,w),n._backpressure=void 0,n._backpressureChangePromise=void 0,n._backpressureChangePromise_resolve=void 0,_n(n,!0),n._transformStreamController=void 0}function Ko(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_transformStreamController")?!1:n instanceof bn}function yn(n,s){Ze(n._readable._readableStreamController,s),Sn(n,s)}function Sn(n,s){Zo(n._transformStreamController),Ci(n._writable._writableStreamController,s),n._backpressure&&_n(n,!1)}function _n(n,s){n._backpressureChangePromise!==void 0&&n._backpressureChangePromise_resolve(),n._backpressureChangePromise=y(l=>{n._backpressureChangePromise_resolve=l}),n._backpressure=s}class yr{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!wn(this))throw En("desiredSize");let s=this._controlledTransformStream._readable._readableStreamController;return Li(s)}enqueue(s=void 0){if(!wn(this))throw En("enqueue");Jo(this,s)}error(s=void 0){if(!wn(this))throw En("error");Ih(this,s)}terminate(){if(!wn(this))throw En("terminate");xh(this)}}Object.defineProperties(yr.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(yr.prototype,e.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function wn(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledTransformStream")?!1:n instanceof yr}function Oh(n,s,l,c){s._controlledTransformStream=n,n._transformStreamController=s,s._transformAlgorithm=l,s._flushAlgorithm=c}function Ph(n,s){let l=Object.create(yr.prototype),c=w=>{try{return Jo(l,w),m(void 0)}catch(E){return p(E)}},b=()=>m(void 0);s.transform!==void 0&&(c=w=>s.transform(w,l)),s.flush!==void 0&&(b=()=>s.flush(l)),Oh(n,l,c,b)}function Zo(n){n._transformAlgorithm=void 0,n._flushAlgorithm=void 0}function Jo(n,s){let l=n._controlledTransformStream,c=l._readable._readableStreamController;if(!Lt(c))throw new TypeError("Readable side is not in a state that permits enqueue");try{dn(c,s)}catch(w){throw Sn(l,w),l._readable._storedError}uh(c)!==l._backpressure&&_n(l,!0)}function Ih(n,s){yn(n._controlledTransformStream,s)}function ea(n,s){let l=n._transformAlgorithm(s);return P(l,void 0,c=>{throw yn(n._controlledTransformStream,c),c})}function xh(n){let s=n._controlledTransformStream,l=s._readable._readableStreamController;gr(l);let c=new TypeError("TransformStream terminated");Sn(s,c)}function Lh(n,s){let l=n._transformStreamController;if(n._backpressure){let c=n._backpressureChangePromise;return P(c,()=>{let b=n._writable;if(b._state==="erroring")throw b._storedError;return ea(l,s)})}return ea(l,s)}function qh(n,s){return yn(n,s),m(void 0)}function Dh(n){let s=n._readable,l=n._transformStreamController,c=l._flushAlgorithm();return Zo(l),P(c,()=>{if(s._state==="errored")throw s._storedError;gr(s._readableStreamController)},b=>{throw yn(n,b),s._storedError})}function Bh(n){return _n(n,!1),n._backpressureChangePromise}function En(n){return new TypeError(`TransformStreamDefaultController.prototype.${n} can only be used on a TransformStreamDefaultController`)}function ta(n){return new TypeError(`TransformStream.prototype.${n} can only be used on a TransformStream`)}r.ByteLengthQueuingStrategy=mn,r.CountQueuingStrategy=gn,r.ReadableByteStreamController=$t,r.ReadableStream=Je,r.ReadableStreamBYOBReader=cr,r.ReadableStreamBYOBRequest=ar,r.ReadableStreamDefaultController=xt,r.ReadableStreamDefaultReader=ir,r.TransformStream=bn,r.TransformStreamDefaultController=yr,r.WritableStream=hr,r.WritableStreamDefaultController=It,r.WritableStreamDefaultWriter=dr,Object.defineProperty(r,"__esModule",{value:!0})})});var Sa=A(()=>{if(!globalThis.ReadableStream)try{let r=ye("node:process"),{emitWarning:e}=r;try{r.emitWarning=()=>{},Object.assign(globalThis,ye("node:stream/web")),r.emitWarning=e}catch(t){throw r.emitWarning=e,t}}catch{Object.assign(globalThis,ya())}try{let{Blob:r}=ye("buffer");r&&!r.prototype.stream&&(r.prototype.stream=function(t){let i=0,o=this;return new ReadableStream({type:"bytes",async pull(a){let h=await o.slice(i,Math.min(o.size,i+65536)).arrayBuffer();i+=h.byteLength,a.enqueue(new Uint8Array(h)),i===o.size&&a.close()}})})}catch{}});async function*Gi(r,e=!0){for(let t of r)if("stream"in t)yield*t.stream();else if(ArrayBuffer.isView(t))if(e){let i=t.byteOffset,o=t.byteOffset+t.byteLength;for(;i!==o;){let a=Math.min(o-i,_a),u=t.buffer.slice(i,i+a);i+=u.byteLength,yield new Uint8Array(u)}}else yield t;else{let i=0,o=t;for(;i!==o.size;){let u=await o.slice(i,Math.min(o.size,i+_a)).arrayBuffer();i+=u.byteLength,yield new Uint8Array(u)}}}var Zb,_a,wa,ed,Me,Er=Sr(()=>{Zb=Ie(Sa(),1);_a=65536;wa=class Vi{#e=[];#t="";#r=0;#n="transparent";constructor(e=[],t={}){if(typeof e!="object"||e===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof e[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof t!="object"&&typeof t!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");t===null&&(t={});let i=new TextEncoder;for(let a of e){let u;ArrayBuffer.isView(a)?u=new Uint8Array(a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength)):a instanceof ArrayBuffer?u=new Uint8Array(a.slice(0)):a instanceof Vi?u=a:u=i.encode(`${a}`),this.#r+=ArrayBuffer.isView(u)?u.byteLength:u.size,this.#e.push(u)}this.#n=`${t.endings===void 0?"transparent":t.endings}`;let o=t.type===void 0?"":String(t.type);this.#t=/^[\x20-\x7E]*$/.test(o)?o:""}get size(){return this.#r}get type(){return this.#t}async text(){let e=new TextDecoder,t="";for await(let i of Gi(this.#e,!1))t+=e.decode(i,{stream:!0});return t+=e.decode(),t}async arrayBuffer(){let e=new Uint8Array(this.size),t=0;for await(let i of Gi(this.#e,!1))e.set(i,t),t+=i.length;return e.buffer}stream(){let e=Gi(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(t){let i=await e.next();i.done?t.close():t.enqueue(i.value)},async cancel(){await e.return()}})}slice(e=0,t=this.size,i=""){let{size:o}=this,a=e<0?Math.max(o+e,0):Math.min(e,o),u=t<0?Math.max(o+t,0):Math.min(t,o),h=Math.max(u-a,0),d=this.#e,f=[],g=0;for(let m of d){if(g>=h)break;let p=ArrayBuffer.isView(m)?m.byteLength:m.size;if(a&&p<=a)a-=p,u-=p;else{let S;ArrayBuffer.isView(m)?(S=m.subarray(a,Math.min(p,u)),g+=S.byteLength):(S=m.slice(a,Math.min(p,u)),g+=S.size),u-=p,f.push(S),a=0}}let y=new Vi([],{type:String(i).toLowerCase()});return y.#r=h,y.#e=f,y}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e=="object"&&typeof e.constructor=="function"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}};Object.defineProperties(wa.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});ed=wa,Me=ed});var td,rd,zt,Yi=Sr(()=>{Er();td=class extends Me{#e=0;#t="";constructor(e,t,i={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(e,i),i===null&&(i={});let o=i.lastModified===void 0?Date.now():Number(i.lastModified);Number.isNaN(o)||(this.#e=o),this.#t=String(t)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](e){return!!e&&e instanceof Me&&/^(File)$/.test(e[Symbol.toStringTag])}},rd=td,zt=rd});function va(r,e=Me){var t=`${Ea()}${Ea()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),i=[],o=`--${t}\r
4
+ Content-Disposition: form-data; name="`;return r.forEach((a,u)=>typeof a=="string"?i.push(o+Xi(u)+`"\r
5
5
  \r
6
6
  ${a.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
7
7
  `)}\r
8
- `):i.push(o+Yi(u)+`"; filename="${Yi(a.name,1)}"\r
8
+ `):i.push(o+Xi(u)+`"; filename="${Xi(a.name,1)}"\r
9
9
  Content-Type: ${a.type||"application/octet-stream"}\r
10
10
  \r
11
11
  `,a,`\r
12
- `)),i.push(`--${t}--`),new e(i,{type:"multipart/form-data; boundary="+t})}var Er,Vh,Yh,ba,Xh,ya,Yi,mt,gt,An=yr(()=>{wr();Vi();({toStringTag:Er,iterator:Vh,hasInstance:Yh}=Symbol),ba=Math.random,Xh="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),ya=(r,e,t)=>(r+="",/^(Blob|File)$/.test(e&&e[Er])?[(t=t!==void 0?t+"":e[Er]=="File"?e.name:"blob",r),e.name!==t||e[Er]=="blob"?new Ft([e],t,e):e]:[r,e+""]),Yi=(r,e)=>(e?r:r.replace(/\r?\n|\r/g,`\r
13
- `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),mt=(r,e,t)=>{if(e.length<t)throw new TypeError(`Failed to execute '${r}' on 'FormData': ${t} arguments required, but only ${e.length} present.`)},gt=class{#e=[];constructor(...e){if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[Er](){return"FormData"}[Vh](){return this.entries()}static[Yh](e){return e&&typeof e=="object"&&e[Er]==="FormData"&&!Xh.some(t=>typeof e[t]!="function")}append(...e){mt("append",arguments,2),this.#e.push(ya(...e))}delete(e){mt("delete",arguments,1),e+="",this.#e=this.#e.filter(([t])=>t!==e)}get(e){mt("get",arguments,1),e+="";for(var t=this.#e,i=t.length,o=0;o<i;o++)if(t[o][0]===e)return t[o][1];return null}getAll(e,t){return mt("getAll",arguments,1),t=[],e+="",this.#e.forEach(i=>i[0]===e&&t.push(i[1])),t}has(e){return mt("has",arguments,1),e+="",this.#e.some(t=>t[0]===e)}forEach(e,t){mt("forEach",arguments,1);for(var[i,o]of this)e.call(t,o,i,this)}set(...e){mt("set",arguments,2);var t=[],i=!0;e=ya(...e),this.#e.forEach(o=>{o[0]===e[0]?i&&(i=!t.push(e)):t.push(o)}),i&&t.push(e),this.#e=t}*entries(){yield*this.#e}*keys(){for(var[e]of this)yield e}*values(){for(var[,e]of this)yield e}}});var va=T((Kb,Ra)=>{if(!globalThis.DOMException)try{let{MessageChannel:r}=be("worker_threads"),e=new r().port1,t=new ArrayBuffer;e.postMessage(t,[t,t])}catch(r){r.constructor.name==="DOMException"&&(globalThis.DOMException=r.constructor)}Ra.exports=globalThis.DOMException});import{statSync as Jb,createReadStream as Qh,promises as Kh}from"node:fs";var Aa,Zh,$n,Qi=yr(()=>{Aa=Ce(va(),1);Vi();wr();({stat:Zh}=Kh),$n=class{#e;#t;constructor(e){this.#e=e.path,this.#t=e.start,this.size=e.size,this.lastModified=e.lastModified}slice(e,t){return new $n({path:this.#e,lastModified:this.lastModified,size:t-e,start:this.#t+e})}async*stream(){let{mtimeMs:e}=await Zh(this.#e);if(e>this.lastModified)throw new Aa.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*Qh(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var $a={};Lh($a,{toFormData:()=>sd});function id(r){let e=r.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!e)return;let t=e[2]||e[3]||"",i=t.slice(t.lastIndexOf("\\")+1);return i=i.replace(/%22/g,'"'),i=i.replace(/&#(\d{4});/g,(o,a)=>String.fromCharCode(a)),i}async function sd(r,e){if(!/multipart/i.test(e))throw new TypeError("Failed to fetch");let t=e.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!t)throw new TypeError("no or bad content-type header, no multipart boundary");let i=new Ki(t[1]||t[2]),o,a,u,h,d,f,m=[],y=new gt,g=v=>{u+=S.decode(v,{stream:!0})},p=v=>{m.push(v)},_=()=>{let v=new Ft(m,f,{type:d});y.append(h,v)},R=()=>{y.append(h,u)},S=new TextDecoder("utf-8");S.decode(),i.onPartBegin=function(){i.onPartData=g,i.onPartEnd=R,o="",a="",u="",h="",d="",f=null,m.length=0},i.onHeaderField=function(v){o+=S.decode(v,{stream:!0})},i.onHeaderValue=function(v){a+=S.decode(v,{stream:!0})},i.onHeaderEnd=function(){if(a+=S.decode(),o=o.toLowerCase(),o==="content-disposition"){let v=a.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);v&&(h=v[2]||v[3]||""),f=id(a),f&&(i.onPartData=p,i.onPartEnd=_)}else o==="content-type"&&(d=a);a="",o=""};for await(let v of r)i.write(v);return i.end(),y}var Le,V,Ta,tt,Cn,On,Jh,vr,ed,td,rd,nd,bt,Ki,Ca=yr(()=>{Qi();An();Le=0,V={START_BOUNDARY:Le++,HEADER_FIELD_START:Le++,HEADER_FIELD:Le++,HEADER_VALUE_START:Le++,HEADER_VALUE:Le++,HEADER_VALUE_ALMOST_DONE:Le++,HEADERS_ALMOST_DONE:Le++,PART_DATA_START:Le++,PART_DATA:Le++,END:Le++},Ta=1,tt={PART_BOUNDARY:Ta,LAST_BOUNDARY:Ta*=2},Cn=10,On=13,Jh=32,vr=45,ed=58,td=97,rd=122,nd=r=>r|32,bt=()=>{},Ki=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=bt,this.onHeaderField=bt,this.onHeadersEnd=bt,this.onHeaderValue=bt,this.onPartBegin=bt,this.onPartData=bt,this.onPartEnd=bt,this.boundaryChars={},e=`\r
14
- --`+e;let t=new Uint8Array(e.length);for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i),this.boundaryChars[t[i]]=!0;this.boundary=t,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=V.START_BOUNDARY}write(e){let t=0,i=e.length,o=this.index,{lookbehind:a,boundary:u,boundaryChars:h,index:d,state:f,flags:m}=this,y=this.boundary.length,g=y-1,p=e.length,_,R,S=A=>{this[A+"Mark"]=t},v=A=>{delete this[A+"Mark"]},P=(A,q,I,L)=>{(q===void 0||q!==I)&&this[A](L&&L.subarray(q,I))},D=(A,q)=>{let I=A+"Mark";I in this&&(q?(P(A,this[I],t,e),delete this[I]):(P(A,this[I],e.length,e),this[I]=0))};for(t=0;t<i;t++)switch(_=e[t],f){case V.START_BOUNDARY:if(d===u.length-2){if(_===vr)m|=tt.LAST_BOUNDARY;else if(_!==On)return;d++;break}else if(d-1===u.length-2){if(m&tt.LAST_BOUNDARY&&_===vr)f=V.END,m=0;else if(!(m&tt.LAST_BOUNDARY)&&_===Cn)d=0,P("onPartBegin"),f=V.HEADER_FIELD_START;else return;break}_!==u[d+2]&&(d=-2),_===u[d+2]&&d++;break;case V.HEADER_FIELD_START:f=V.HEADER_FIELD,S("onHeaderField"),d=0;case V.HEADER_FIELD:if(_===On){v("onHeaderField"),f=V.HEADERS_ALMOST_DONE;break}if(d++,_===vr)break;if(_===ed){if(d===1)return;D("onHeaderField",!0),f=V.HEADER_VALUE_START;break}if(R=nd(_),R<td||R>rd)return;break;case V.HEADER_VALUE_START:if(_===Jh)break;S("onHeaderValue"),f=V.HEADER_VALUE;case V.HEADER_VALUE:_===On&&(D("onHeaderValue",!0),P("onHeaderEnd"),f=V.HEADER_VALUE_ALMOST_DONE);break;case V.HEADER_VALUE_ALMOST_DONE:if(_!==Cn)return;f=V.HEADER_FIELD_START;break;case V.HEADERS_ALMOST_DONE:if(_!==Cn)return;P("onHeadersEnd"),f=V.PART_DATA_START;break;case V.PART_DATA_START:f=V.PART_DATA,S("onPartData");case V.PART_DATA:if(o=d,d===0){for(t+=g;t<p&&!(e[t]in h);)t+=y;t-=g,_=e[t]}if(d<u.length)u[d]===_?(d===0&&D("onPartData",!0),d++):d=0;else if(d===u.length)d++,_===On?m|=tt.PART_BOUNDARY:_===vr?m|=tt.LAST_BOUNDARY:d=0;else if(d-1===u.length)if(m&tt.PART_BOUNDARY){if(d=0,_===Cn){m&=~tt.PART_BOUNDARY,P("onPartEnd"),P("onPartBegin"),f=V.HEADER_FIELD_START;break}}else m&tt.LAST_BOUNDARY&&_===vr?(P("onPartEnd"),f=V.END,m=0):d=0;if(d>0)a[d-1]=_;else if(o>0){let A=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);P("onPartData",0,o,A),o=0,S("onPartData"),t--}break;case V.END:break;default:throw new Error(`Unexpected state entered: ${f}`)}D("onHeaderField"),D("onHeaderValue"),D("onPartData"),this.index=d,this.state=f,this.flags=m}end(){if(this.state===V.HEADER_FIELD_START&&this.index===0||this.state===V.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==V.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}});var Ga=T((nS,Ha)=>{function Sd(r){return Buffer.from(r,"base64").toString("utf8")}function _d(r){return Buffer.from(r,"utf8").toString("base64")}Ha.exports={decodeBase64:Sd,encodeBase64:_d}});var Qa=T(yt=>{yt.parse=yt.decode=wd;yt.stringify=yt.encode=Va;yt.safe=jt;yt.unsafe=Fn;var ts=typeof process<"u"&&process.platform==="win32"?`\r
12
+ `)),i.push(`--${t}--`),new e(i,{type:"multipart/form-data; boundary="+t})}var Rr,nd,id,Ea,sd,Ra,Xi,bt,yt,An=Sr(()=>{Er();Yi();({toStringTag:Rr,iterator:nd,hasInstance:id}=Symbol),Ea=Math.random,sd="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),Ra=(r,e,t)=>(r+="",/^(Blob|File)$/.test(e&&e[Rr])?[(t=t!==void 0?t+"":e[Rr]=="File"?e.name:"blob",r),e.name!==t||e[Rr]=="blob"?new zt([e],t,e):e]:[r,e+""]),Xi=(r,e)=>(e?r:r.replace(/\r?\n|\r/g,`\r
13
+ `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),bt=(r,e,t)=>{if(e.length<t)throw new TypeError(`Failed to execute '${r}' on 'FormData': ${t} arguments required, but only ${e.length} present.`)},yt=class{#e=[];constructor(...e){if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[Rr](){return"FormData"}[nd](){return this.entries()}static[id](e){return e&&typeof e=="object"&&e[Rr]==="FormData"&&!sd.some(t=>typeof e[t]!="function")}append(...e){bt("append",arguments,2),this.#e.push(Ra(...e))}delete(e){bt("delete",arguments,1),e+="",this.#e=this.#e.filter(([t])=>t!==e)}get(e){bt("get",arguments,1),e+="";for(var t=this.#e,i=t.length,o=0;o<i;o++)if(t[o][0]===e)return t[o][1];return null}getAll(e,t){return bt("getAll",arguments,1),t=[],e+="",this.#e.forEach(i=>i[0]===e&&t.push(i[1])),t}has(e){return bt("has",arguments,1),e+="",this.#e.some(t=>t[0]===e)}forEach(e,t){bt("forEach",arguments,1);for(var[i,o]of this)e.call(t,o,i,this)}set(...e){bt("set",arguments,2);var t=[],i=!0;e=Ra(...e),this.#e.forEach(o=>{o[0]===e[0]?i&&(i=!t.push(e)):t.push(o)}),i&&t.push(e),this.#e=t}*entries(){yield*this.#e}*keys(){for(var[e]of this)yield e}*values(){for(var[,e]of this)yield e}}});var Oa=A((fy,$a)=>{if(!globalThis.DOMException)try{let{MessageChannel:r}=ye("worker_threads"),e=new r().port1,t=new ArrayBuffer;e.postMessage(t,[t,t])}catch(r){r.constructor.name==="DOMException"&&(globalThis.DOMException=r.constructor)}$a.exports=globalThis.DOMException});import{statSync as dy,createReadStream as od,promises as ad}from"node:fs";var Pa,ld,$n,Ki=Sr(()=>{Pa=Ie(Oa(),1);Yi();Er();({stat:ld}=ad),$n=class{#e;#t;constructor(e){this.#e=e.path,this.#t=e.start,this.size=e.size,this.lastModified=e.lastModified}slice(e,t){return new $n({path:this.#e,lastModified:this.lastModified,size:t-e,start:this.#t+e})}async*stream(){let{mtimeMs:e}=await ld(this.#e);if(e>this.lastModified)throw new Pa.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*od(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var xa={};jh(xa,{toFormData:()=>md});function pd(r){let e=r.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!e)return;let t=e[2]||e[3]||"",i=t.slice(t.lastIndexOf("\\")+1);return i=i.replace(/%22/g,'"'),i=i.replace(/&#(\d{4});/g,(o,a)=>String.fromCharCode(a)),i}async function md(r,e){if(!/multipart/i.test(e))throw new TypeError("Failed to fetch");let t=e.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!t)throw new TypeError("no or bad content-type header, no multipart boundary");let i=new Zi(t[1]||t[2]),o,a,u,h,d,f,g=[],y=new yt,m=_=>{u+=T.decode(_,{stream:!0})},p=_=>{g.push(_)},S=()=>{let _=new zt(g,f,{type:d});y.append(h,_)},R=()=>{y.append(h,u)},T=new TextDecoder("utf-8");T.decode(),i.onPartBegin=function(){i.onPartData=m,i.onPartEnd=R,o="",a="",u="",h="",d="",f=null,g.length=0},i.onHeaderField=function(_){o+=T.decode(_,{stream:!0})},i.onHeaderValue=function(_){a+=T.decode(_,{stream:!0})},i.onHeaderEnd=function(){if(a+=T.decode(),o=o.toLowerCase(),o==="content-disposition"){let _=a.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);_&&(h=_[2]||_[3]||""),f=pd(a),f&&(i.onPartData=p,i.onPartEnd=S)}else o==="content-type"&&(d=a);a="",o=""};for await(let _ of r)i.write(_);return i.end(),y}var Be,Y,Ia,it,On,Pn,ud,Tr,cd,fd,hd,dd,St,Zi,La=Sr(()=>{Ki();An();Be=0,Y={START_BOUNDARY:Be++,HEADER_FIELD_START:Be++,HEADER_FIELD:Be++,HEADER_VALUE_START:Be++,HEADER_VALUE:Be++,HEADER_VALUE_ALMOST_DONE:Be++,HEADERS_ALMOST_DONE:Be++,PART_DATA_START:Be++,PART_DATA:Be++,END:Be++},Ia=1,it={PART_BOUNDARY:Ia,LAST_BOUNDARY:Ia*=2},On=10,Pn=13,ud=32,Tr=45,cd=58,fd=97,hd=122,dd=r=>r|32,St=()=>{},Zi=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=St,this.onHeaderField=St,this.onHeadersEnd=St,this.onHeaderValue=St,this.onPartBegin=St,this.onPartData=St,this.onPartEnd=St,this.boundaryChars={},e=`\r
14
+ --`+e;let t=new Uint8Array(e.length);for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i),this.boundaryChars[t[i]]=!0;this.boundary=t,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=Y.START_BOUNDARY}write(e){let t=0,i=e.length,o=this.index,{lookbehind:a,boundary:u,boundaryChars:h,index:d,state:f,flags:g}=this,y=this.boundary.length,m=y-1,p=e.length,S,R,T=v=>{this[v+"Mark"]=t},_=v=>{delete this[v+"Mark"]},P=(v,x,q,D)=>{(x===void 0||x!==q)&&this[v](D&&D.subarray(x,q))},I=(v,x)=>{let q=v+"Mark";q in this&&(x?(P(v,this[q],t,e),delete this[q]):(P(v,this[q],e.length,e),this[q]=0))};for(t=0;t<i;t++)switch(S=e[t],f){case Y.START_BOUNDARY:if(d===u.length-2){if(S===Tr)g|=it.LAST_BOUNDARY;else if(S!==Pn)return;d++;break}else if(d-1===u.length-2){if(g&it.LAST_BOUNDARY&&S===Tr)f=Y.END,g=0;else if(!(g&it.LAST_BOUNDARY)&&S===On)d=0,P("onPartBegin"),f=Y.HEADER_FIELD_START;else return;break}S!==u[d+2]&&(d=-2),S===u[d+2]&&d++;break;case Y.HEADER_FIELD_START:f=Y.HEADER_FIELD,T("onHeaderField"),d=0;case Y.HEADER_FIELD:if(S===Pn){_("onHeaderField"),f=Y.HEADERS_ALMOST_DONE;break}if(d++,S===Tr)break;if(S===cd){if(d===1)return;I("onHeaderField",!0),f=Y.HEADER_VALUE_START;break}if(R=dd(S),R<fd||R>hd)return;break;case Y.HEADER_VALUE_START:if(S===ud)break;T("onHeaderValue"),f=Y.HEADER_VALUE;case Y.HEADER_VALUE:S===Pn&&(I("onHeaderValue",!0),P("onHeaderEnd"),f=Y.HEADER_VALUE_ALMOST_DONE);break;case Y.HEADER_VALUE_ALMOST_DONE:if(S!==On)return;f=Y.HEADER_FIELD_START;break;case Y.HEADERS_ALMOST_DONE:if(S!==On)return;P("onHeadersEnd"),f=Y.PART_DATA_START;break;case Y.PART_DATA_START:f=Y.PART_DATA,T("onPartData");case Y.PART_DATA:if(o=d,d===0){for(t+=m;t<p&&!(e[t]in h);)t+=y;t-=m,S=e[t]}if(d<u.length)u[d]===S?(d===0&&I("onPartData",!0),d++):d=0;else if(d===u.length)d++,S===Pn?g|=it.PART_BOUNDARY:S===Tr?g|=it.LAST_BOUNDARY:d=0;else if(d-1===u.length)if(g&it.PART_BOUNDARY){if(d=0,S===On){g&=~it.PART_BOUNDARY,P("onPartEnd"),P("onPartBegin"),f=Y.HEADER_FIELD_START;break}}else g&it.LAST_BOUNDARY&&S===Tr?(P("onPartEnd"),f=Y.END,g=0):d=0;if(d>0)a[d-1]=S;else if(o>0){let v=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);P("onPartData",0,o,v),o=0,T("onPartData"),t--}break;case Y.END:break;default:throw new Error(`Unexpected state entered: ${f}`)}I("onHeaderField"),I("onHeaderValue"),I("onPartData"),this.index=d,this.state=f,this.flags=g}end(){if(this.state===Y.HEADER_FIELD_START&&this.index===0||this.state===Y.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==Y.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}});var Ka=A((bS,Qa)=>{function Od(r){return Buffer.from(r,"base64").toString("utf8")}function Pd(r){return Buffer.from(r,"utf8").toString("base64")}Qa.exports={decodeBase64:Od,encodeBase64:Pd}});var tl=A(_t=>{_t.parse=_t.decode=Id;_t.stringify=_t.encode=Za;_t.safe=Mt;_t.unsafe=Nn;var rs=typeof process<"u"&&process.platform==="win32"?`\r
15
15
  `:`
16
- `;function Va(r,e){var t=[],i="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var o=e.whitespace?" = ":"=";return Object.keys(r).forEach(function(a,u,h){var d=r[a];d&&Array.isArray(d)?d.forEach(function(f){i+=jt(a+"[]")+o+jt(f)+`
17
- `}):d&&typeof d=="object"?t.push(a):i+=jt(a)+o+jt(d)+ts}),e.section&&i.length&&(i="["+jt(e.section)+"]"+ts+i),t.forEach(function(a,u,h){var d=Ya(a).join("\\."),f=(e.section?e.section+".":"")+d,m=Va(r[a],{section:f,whitespace:e.whitespace});i.length&&m.length&&(i+=ts),i+=m}),i}function Ya(r){return r.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function wd(r){var e={},t=e,i=null,o=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,a=r.split(/[\r\n]+/g);return a.forEach(function(u,h,d){if(!(!u||u.match(/^\s*[;#]/))){var f=u.match(o);if(f){if(f[1]!==void 0){if(i=Fn(f[1]),i==="__proto__"){t={};return}t=e[i]=e[i]||{};return}var m=Fn(f[2]);if(m!=="__proto__"){var y=f[3]?Fn(f[4]):!0;switch(y){case"true":case"false":case"null":y=JSON.parse(y)}if(m.length>2&&m.slice(-2)==="[]"){if(m=m.substring(0,m.length-2),m==="__proto__")return;t[m]?Array.isArray(t[m])||(t[m]=[t[m]]):t[m]=[]}Array.isArray(t[m])?t[m].push(y):t[m]=y}}}}),Object.keys(e).filter(function(u,h,d){if(!e[u]||typeof e[u]!="object"||Array.isArray(e[u]))return!1;var f=Ya(u),m=e,y=f.pop(),g=y.replace(/\\\./g,".");return f.forEach(function(p,_,R){p!=="__proto__"&&((!m[p]||typeof m[p]!="object")&&(m[p]={}),m=m[p])}),m===e&&g===y?!1:(m[g]=e[u],!0)}).forEach(function(u,h,d){delete e[u]}),e}function Xa(r){return r.charAt(0)==='"'&&r.slice(-1)==='"'||r.charAt(0)==="'"&&r.slice(-1)==="'"}function jt(r){return typeof r!="string"||r.match(/[=\r\n]/)||r.match(/^\[/)||r.length>1&&Xa(r)||r!==r.trim()?JSON.stringify(r):r.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Fn(r,e){if(r=(r||"").trim(),Xa(r)){r.charAt(0)==="'"&&(r=r.substr(1,r.length-2));try{r=JSON.parse(r)}catch{}}else{for(var t=!1,i="",o=0,a=r.length;o<a;o++){var u=r.charAt(o);if(t)"\\;#".indexOf(u)!==-1?i+=u:i+="\\"+u,t=!1;else{if(";#".indexOf(u)!==-1)break;u==="\\"?t=!0:i+=u}}return t&&(i+="\\"),i.trim()}return r}});var Ja=T((sS,Za)=>{"use strict";var rs=1,Ka=2;function Ed(){return""}function Rd(r,e,t){return r.slice(e,t).replace(/\S/g," ")}Za.exports=function(r,e){e=e||{};for(var t,i,o=!1,a=!1,u=0,h="",d=e.whitespace===!1?Ed:Rd,f=0;f<r.length;f++){if(t=r[f],i=r[f+1],!a&&t==='"'){var m=r[f-1]==="\\"&&r[f-2]!=="\\";m||(o=!o)}if(!o){if(!a&&t+i==="//")h+=r.slice(u,f),u=f,a=rs,f++;else if(a===rs&&t+i===`\r
18
- `){f++,a=!1,h+=d(r,u,f),u=f;continue}else if(a===rs&&t===`
19
- `)a=!1,h+=d(r,u,f),u=f;else if(!a&&t+i==="/*"){h+=r.slice(u,f),u=f,a=Ka,f++;continue}else if(a===Ka&&t+i==="*/"){f++,a=!1,h+=d(r,u,f+1),u=f+1;continue}}}return h+(a?d(r.substr(u)):r.substr(u))}});var tl=T(Ut=>{"use strict";var el=be("fs"),vd=Qa(),Tr=be("path"),Ad=Ja(),Td=Ut.parse=function(r){return/^\s*{/.test(r)?JSON.parse(Ad(r)):vd.parse(r)},$d=Ut.file=function(){var r=[].slice.call(arguments).filter(function(o){return o!=null});for(var e in r)if(typeof r[e]!="string")return;var t=Tr.join.apply(null,r),i;try{return el.readFileSync(t,"utf-8")}catch{return}},oS=Ut.json=function(){var r=$d.apply(null,arguments);return r?Td(r):null},aS=Ut.env=function(r,e){e=e||process.env;var t={},i=r.length;for(var o in e)if(o.toLowerCase().indexOf(r.toLowerCase())===0){for(var a=o.substring(i).split("__"),u;(u=a.indexOf(""))>-1;)a.splice(u,1);var h=t;a.forEach(function(f,m){!f||typeof h!="object"||(m===a.length-1&&(h[f]=e[o]),h[f]===void 0&&(h[f]={}),h=h[f])})}return t},lS=Ut.find=function(){var r=Tr.join.apply(null,[].slice.call(arguments));function e(t,i){var o=Tr.join(t,i);try{return el.statSync(o),o}catch{if(Tr.dirname(t)!==t)return e(Tr.dirname(t),i)}}return e(process.cwd(),r)}});var al=T((cS,ol)=>{"use strict";function nl(r){return r instanceof Buffer||r instanceof Date||r instanceof RegExp}function il(r){if(r instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(r.length):new Buffer(r.length);return r.copy(e),e}else{if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp)return new RegExp(r);throw new Error("Unexpected situation")}}function sl(r){var e=[];return r.forEach(function(t,i){typeof t=="object"&&t!==null?Array.isArray(t)?e[i]=sl(t):nl(t)?e[i]=il(t):e[i]=ns({},t):e[i]=t}),e}function rl(r,e){return e==="__proto__"?void 0:r[e]}var ns=ol.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var r=arguments[0],e=Array.prototype.slice.call(arguments,1),t,i,o;return e.forEach(function(a){typeof a!="object"||a===null||Array.isArray(a)||Object.keys(a).forEach(function(u){if(i=rl(r,u),t=rl(a,u),t!==r)if(typeof t!="object"||t===null){r[u]=t;return}else if(Array.isArray(t)){r[u]=sl(t);return}else if(nl(t)){r[u]=il(t);return}else if(typeof i!="object"||i===null||Array.isArray(i)){r[u]=ns({},t);return}else{r[u]=ns(i,t);return}})}),r}});var Nn=T((fS,cl)=>{var $r=tl(),Mt=be("path").join,Cd=al(),ll="/etc",ul=process.platform==="win32",Cr=ul?process.env.USERPROFILE:process.env.HOME;cl.exports=function(r,e,t,i){if(typeof r!="string")throw new Error("rc(name): name *must* be string");t||(t=Mi()(process.argv.slice(2))),e=(typeof e=="string"?$r.json(e):e)||{},i=i||$r.parse;var o=$r.env(r+"_"),a=[e],u=[];function h(d){if(!(u.indexOf(d)>=0)){var f=$r.file(d);f&&(a.push(i(f)),u.push(d))}}return ul||[Mt(ll,r,"config"),Mt(ll,r+"rc")].forEach(h),Cr&&[Mt(Cr,".config",r,"config"),Mt(Cr,".config",r),Mt(Cr,"."+r,"config"),Mt(Cr,"."+r+"rc")].forEach(h),h($r.find("."+r+"rc")),o.config&&h(o.config),t.config&&h(t.config),Cd.apply(null,a.concat([o,t,u.length?{configs:u,config:u[u.length-1]}:void 0]))}});var yl=T((hS,bl)=>{var is=be("url"),ml=Ga(),Od=ml.decodeBase64,Pd=ml.encodeBase64,fl=":_authToken",hl=":_auth",dl=":username",pl=":_password";bl.exports=function(){var r,e;return arguments.length>=2?(r=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?r=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||Nn()("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),r=r||e.npmrc.registry,gl(r,e)||Id(e.npmrc)};function gl(r,e){for(var t=is.parse(r,!1,!0),i;i!=="/"&&t.pathname!==i;){i=t.pathname||"/";var o="//"+t.host+i.replace(/\/$/,""),a=xd(o,e.npmrc);if(a)return a;if(!e.recursive)return/\/$/.test(r)?void 0:gl(is.resolve(r,"."),e);t.pathname=is.resolve(Ld(i),"..")||"/"}}function Id(r){if(r._auth){var e=zn(r._auth);return{token:e,type:"Basic"}}}function Ld(r){return r[r.length-1]==="/"?r:r+"/"}function xd(r,e){var t=qd(e[r+fl]||e[r+"/"+fl]);if(t)return t;var i=e[r+dl]||e[r+"/"+dl],o=e[r+pl]||e[r+"/"+pl],a=Dd(i,o);if(a)return a;var u=Bd(e[r+hl]||e[r+"/"+hl]);if(u)return u}function zn(r){return r.replace(/^\$\{?([^}]*)\}?$/,function(e,t){return process.env[t]})}function qd(r){if(r){var e=zn(r);return{token:e,type:"Bearer"}}}function Dd(r,e){if(!(!r||!e)){var t=Od(zn(e)),i=Pd(r+":"+t);return{token:i,type:"Basic",password:t,username:r}}}function Bd(r){if(r){var e=zn(r);return{token:e,type:"Basic"}}}});var _l=T((dS,Sl)=>{Sl.exports=function(r,e){var t=e||Nn()("npm",{registry:"https://registry.npmjs.org/"}),i=t[r+":registry"]||t.registry;return i.slice(-1)==="/"?i:i+"/"}});var Or=T((pS,wl)=>{var Fd="2.0.0",Nd=Number.MAX_SAFE_INTEGER||9007199254740991,zd=16;wl.exports={SEMVER_SPEC_VERSION:Fd,MAX_LENGTH:256,MAX_SAFE_INTEGER:Nd,MAX_SAFE_COMPONENT_LENGTH:zd}});var Pr=T((mS,El)=>{var kd=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};El.exports=kd});var St=T((nt,Rl)=>{var{MAX_SAFE_COMPONENT_LENGTH:ss}=Or(),Wd=Pr();nt=Rl.exports={};var jd=nt.re=[],C=nt.src=[],O=nt.t={},Ud=0,N=(r,e,t)=>{let i=Ud++;Wd(r,i,e),O[r]=i,C[i]=e,jd[i]=new RegExp(e,t?"g":void 0)};N("NUMERICIDENTIFIER","0|[1-9]\\d*");N("NUMERICIDENTIFIERLOOSE","[0-9]+");N("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");N("MAINVERSION",`(${C[O.NUMERICIDENTIFIER]})\\.(${C[O.NUMERICIDENTIFIER]})\\.(${C[O.NUMERICIDENTIFIER]})`);N("MAINVERSIONLOOSE",`(${C[O.NUMERICIDENTIFIERLOOSE]})\\.(${C[O.NUMERICIDENTIFIERLOOSE]})\\.(${C[O.NUMERICIDENTIFIERLOOSE]})`);N("PRERELEASEIDENTIFIER",`(?:${C[O.NUMERICIDENTIFIER]}|${C[O.NONNUMERICIDENTIFIER]})`);N("PRERELEASEIDENTIFIERLOOSE",`(?:${C[O.NUMERICIDENTIFIERLOOSE]}|${C[O.NONNUMERICIDENTIFIER]})`);N("PRERELEASE",`(?:-(${C[O.PRERELEASEIDENTIFIER]}(?:\\.${C[O.PRERELEASEIDENTIFIER]})*))`);N("PRERELEASELOOSE",`(?:-?(${C[O.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[O.PRERELEASEIDENTIFIERLOOSE]})*))`);N("BUILDIDENTIFIER","[0-9A-Za-z-]+");N("BUILD",`(?:\\+(${C[O.BUILDIDENTIFIER]}(?:\\.${C[O.BUILDIDENTIFIER]})*))`);N("FULLPLAIN",`v?${C[O.MAINVERSION]}${C[O.PRERELEASE]}?${C[O.BUILD]}?`);N("FULL",`^${C[O.FULLPLAIN]}$`);N("LOOSEPLAIN",`[v=\\s]*${C[O.MAINVERSIONLOOSE]}${C[O.PRERELEASELOOSE]}?${C[O.BUILD]}?`);N("LOOSE",`^${C[O.LOOSEPLAIN]}$`);N("GTLT","((?:<|>)?=?)");N("XRANGEIDENTIFIERLOOSE",`${C[O.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);N("XRANGEIDENTIFIER",`${C[O.NUMERICIDENTIFIER]}|x|X|\\*`);N("XRANGEPLAIN",`[v=\\s]*(${C[O.XRANGEIDENTIFIER]})(?:\\.(${C[O.XRANGEIDENTIFIER]})(?:\\.(${C[O.XRANGEIDENTIFIER]})(?:${C[O.PRERELEASE]})?${C[O.BUILD]}?)?)?`);N("XRANGEPLAINLOOSE",`[v=\\s]*(${C[O.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[O.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[O.XRANGEIDENTIFIERLOOSE]})(?:${C[O.PRERELEASELOOSE]})?${C[O.BUILD]}?)?)?`);N("XRANGE",`^${C[O.GTLT]}\\s*${C[O.XRANGEPLAIN]}$`);N("XRANGELOOSE",`^${C[O.GTLT]}\\s*${C[O.XRANGEPLAINLOOSE]}$`);N("COERCE",`(^|[^\\d])(\\d{1,${ss}})(?:\\.(\\d{1,${ss}}))?(?:\\.(\\d{1,${ss}}))?(?:$|[^\\d])`);N("COERCERTL",C[O.COERCE],!0);N("LONETILDE","(?:~>?)");N("TILDETRIM",`(\\s*)${C[O.LONETILDE]}\\s+`,!0);nt.tildeTrimReplace="$1~";N("TILDE",`^${C[O.LONETILDE]}${C[O.XRANGEPLAIN]}$`);N("TILDELOOSE",`^${C[O.LONETILDE]}${C[O.XRANGEPLAINLOOSE]}$`);N("LONECARET","(?:\\^)");N("CARETTRIM",`(\\s*)${C[O.LONECARET]}\\s+`,!0);nt.caretTrimReplace="$1^";N("CARET",`^${C[O.LONECARET]}${C[O.XRANGEPLAIN]}$`);N("CARETLOOSE",`^${C[O.LONECARET]}${C[O.XRANGEPLAINLOOSE]}$`);N("COMPARATORLOOSE",`^${C[O.GTLT]}\\s*(${C[O.LOOSEPLAIN]})$|^$`);N("COMPARATOR",`^${C[O.GTLT]}\\s*(${C[O.FULLPLAIN]})$|^$`);N("COMPARATORTRIM",`(\\s*)${C[O.GTLT]}\\s*(${C[O.LOOSEPLAIN]}|${C[O.XRANGEPLAIN]})`,!0);nt.comparatorTrimReplace="$1$2$3";N("HYPHENRANGE",`^\\s*(${C[O.XRANGEPLAIN]})\\s+-\\s+(${C[O.XRANGEPLAIN]})\\s*$`);N("HYPHENRANGELOOSE",`^\\s*(${C[O.XRANGEPLAINLOOSE]})\\s+-\\s+(${C[O.XRANGEPLAINLOOSE]})\\s*$`);N("STAR","(<|>)?=?\\s*\\*");N("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");N("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Ir=T((gS,vl)=>{var Md=["includePrerelease","loose","rtl"],Hd=r=>r?typeof r!="object"?{loose:!0}:Md.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};vl.exports=Hd});var os=T((bS,$l)=>{var Al=/^[0-9]+$/,Tl=(r,e)=>{let t=Al.test(r),i=Al.test(e);return t&&i&&(r=+r,e=+e),r===e?0:t&&!i?-1:i&&!t?1:r<e?-1:1},Gd=(r,e)=>Tl(e,r);$l.exports={compareIdentifiers:Tl,rcompareIdentifiers:Gd}});var ae=T((yS,Il)=>{var kn=Pr(),{MAX_LENGTH:Cl,MAX_SAFE_INTEGER:Wn}=Or(),{re:Ol,t:Pl}=St(),Vd=Ir(),{compareIdentifiers:Ht}=os(),ye=class{constructor(e,t){if(t=Vd(t),e instanceof ye){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Cl)throw new TypeError(`version is longer than ${Cl} characters`);kn("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?Ol[Pl.LOOSE]:Ol[Pl.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Wn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Wn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Wn||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){let a=+o;if(a>=0&&a<Wn)return a}return o}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(kn("SemVer.compare",this.version,this.options,e),!(e instanceof ye)){if(typeof e=="string"&&e===this.version)return 0;e=new ye(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof ye||(e=new ye(e,this.options)),Ht(this.major,e.major)||Ht(this.minor,e.minor)||Ht(this.patch,e.patch)}comparePre(e){if(e instanceof ye||(e=new ye(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let i=this.prerelease[t],o=e.prerelease[t];if(kn("prerelease compare",t,i,o),i===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(i===void 0)return-1;if(i===o)continue;return Ht(i,o)}while(++t)}compareBuild(e){e instanceof ye||(e=new ye(e,this.options));let t=0;do{let i=this.build[t],o=e.build[t];if(kn("prerelease compare",t,i,o),i===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(i===void 0)return-1;if(i===o)continue;return Ht(i,o)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(Ht(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};Il.exports=ye});var _t=T((SS,Dl)=>{var{MAX_LENGTH:Yd}=Or(),{re:Ll,t:xl}=St(),ql=ae(),Xd=Ir(),Qd=(r,e)=>{if(e=Xd(e),r instanceof ql)return r;if(typeof r!="string"||r.length>Yd||!(e.loose?Ll[xl.LOOSE]:Ll[xl.FULL]).test(r))return null;try{return new ql(r,e)}catch{return null}};Dl.exports=Qd});var Fl=T((_S,Bl)=>{var Kd=_t(),Zd=(r,e)=>{let t=Kd(r,e);return t?t.version:null};Bl.exports=Zd});var zl=T((wS,Nl)=>{var Jd=_t(),ep=(r,e)=>{let t=Jd(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Nl.exports=ep});var jl=T((ES,Wl)=>{var kl=ae(),tp=(r,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new kl(r instanceof kl?r.version:r,t).inc(e,i).version}catch{return null}};Wl.exports=tp});var we=T((RS,Ml)=>{var Ul=ae(),rp=(r,e,t)=>new Ul(r,t).compare(new Ul(e,t));Ml.exports=rp});var jn=T((vS,Hl)=>{var np=we(),ip=(r,e,t)=>np(r,e,t)===0;Hl.exports=ip});var Yl=T((AS,Vl)=>{var Gl=_t(),sp=jn(),op=(r,e)=>{if(sp(r,e))return null;{let t=Gl(r),i=Gl(e),o=t.prerelease.length||i.prerelease.length,a=o?"pre":"",u=o?"prerelease":"";for(let h in t)if((h==="major"||h==="minor"||h==="patch")&&t[h]!==i[h])return a+h;return u}};Vl.exports=op});var Ql=T((TS,Xl)=>{var ap=ae(),lp=(r,e)=>new ap(r,e).major;Xl.exports=lp});var Zl=T(($S,Kl)=>{var up=ae(),cp=(r,e)=>new up(r,e).minor;Kl.exports=cp});var eu=T((CS,Jl)=>{var fp=ae(),hp=(r,e)=>new fp(r,e).patch;Jl.exports=hp});var ru=T((OS,tu)=>{var dp=_t(),pp=(r,e)=>{let t=dp(r,e);return t&&t.prerelease.length?t.prerelease:null};tu.exports=pp});var iu=T((PS,nu)=>{var mp=we(),gp=(r,e,t)=>mp(e,r,t);nu.exports=gp});var ou=T((IS,su)=>{var bp=we(),yp=(r,e)=>bp(r,e,!0);su.exports=yp});var Un=T((LS,lu)=>{var au=ae(),Sp=(r,e,t)=>{let i=new au(r,t),o=new au(e,t);return i.compare(o)||i.compareBuild(o)};lu.exports=Sp});var cu=T((xS,uu)=>{var _p=Un(),wp=(r,e)=>r.sort((t,i)=>_p(t,i,e));uu.exports=wp});var hu=T((qS,fu)=>{var Ep=Un(),Rp=(r,e)=>r.sort((t,i)=>Ep(i,t,e));fu.exports=Rp});var Lr=T((DS,du)=>{var vp=we(),Ap=(r,e,t)=>vp(r,e,t)>0;du.exports=Ap});var Mn=T((BS,pu)=>{var Tp=we(),$p=(r,e,t)=>Tp(r,e,t)<0;pu.exports=$p});var as=T((FS,mu)=>{var Cp=we(),Op=(r,e,t)=>Cp(r,e,t)!==0;mu.exports=Op});var Hn=T((NS,gu)=>{var Pp=we(),Ip=(r,e,t)=>Pp(r,e,t)>=0;gu.exports=Ip});var Gn=T((zS,bu)=>{var Lp=we(),xp=(r,e,t)=>Lp(r,e,t)<=0;bu.exports=xp});var ls=T((kS,yu)=>{var qp=jn(),Dp=as(),Bp=Lr(),Fp=Hn(),Np=Mn(),zp=Gn(),kp=(r,e,t,i)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return qp(r,t,i);case"!=":return Dp(r,t,i);case">":return Bp(r,t,i);case">=":return Fp(r,t,i);case"<":return Np(r,t,i);case"<=":return zp(r,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};yu.exports=kp});var _u=T((WS,Su)=>{var Wp=ae(),jp=_t(),{re:Vn,t:Yn}=St(),Up=(r,e)=>{if(r instanceof Wp)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(Vn[Yn.COERCE]);else{let i;for(;(i=Vn[Yn.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),Vn[Yn.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;Vn[Yn.COERCERTL].lastIndex=-1}return t===null?null:jp(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};Su.exports=Up});var Eu=T((jS,wu)=>{"use strict";wu.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var vu=T((US,Ru)=>{"use strict";Ru.exports=M;M.Node=wt;M.create=M;function M(r){var e=this;if(e instanceof M||(e=new M),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(o){e.push(o)});else if(arguments.length>0)for(var t=0,i=arguments.length;t<i;t++)e.push(arguments[t]);return e}M.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};M.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};M.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var e=this.tail;r.list=this,r.prev=e,e&&(e.next=r),this.tail=r,this.head||(this.head=r),this.length++}};M.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)Hp(this,arguments[r]);return this.length};M.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)Gp(this,arguments[r]);return this.length};M.prototype.pop=function(){if(this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};M.prototype.shift=function(){if(this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};M.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,i=0;t!==null;i++)r.call(e,t.value,i,this),t=t.next};M.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,i=this.length-1;t!==null;i--)r.call(e,t.value,i,this),t=t.prev};M.prototype.get=function(r){for(var e=0,t=this.head;t!==null&&e<r;e++)t=t.next;if(e===r&&t!==null)return t.value};M.prototype.getReverse=function(r){for(var e=0,t=this.tail;t!==null&&e<r;e++)t=t.prev;if(e===r&&t!==null)return t.value};M.prototype.map=function(r,e){e=e||this;for(var t=new M,i=this.head;i!==null;)t.push(r.call(e,i.value,this)),i=i.next;return t};M.prototype.mapReverse=function(r,e){e=e||this;for(var t=new M,i=this.tail;i!==null;)t.push(r.call(e,i.value,this)),i=i.prev;return t};M.prototype.reduce=function(r,e){var t,i=this.head;if(arguments.length>1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=0;i!==null;o++)t=r(t,i.value,o),i=i.next;return t};M.prototype.reduceReverse=function(r,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=this.length-1;i!==null;o--)t=r(t,i.value,o),i=i.prev;return t};M.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};M.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};M.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new M;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var i=0,o=this.head;o!==null&&i<r;i++)o=o.next;for(;o!==null&&i<e;i++,o=o.next)t.push(o.value);return t};M.prototype.sliceReverse=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new M;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var i=this.length,o=this.tail;o!==null&&i>e;i--)o=o.prev;for(;o!==null&&i>r;i--,o=o.prev)t.push(o.value);return t};M.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,o=this.head;o!==null&&i<r;i++)o=o.next;for(var a=[],i=0;o&&i<e;i++)a.push(o.value),o=this.removeNode(o);o===null&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(var i=0;i<t.length;i++)o=Mp(this,o,t[i]);return a};M.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var i=t.prev;t.prev=t.next,t.next=i}return this.head=e,this.tail=r,this};function Mp(r,e,t){var i=e===r.head?new wt(t,null,e,r):new wt(t,e,e.next,r);return i.next===null&&(r.tail=i),i.prev===null&&(r.head=i),r.length++,i}function Hp(r,e){r.tail=new wt(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function Gp(r,e){r.head=new wt(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function wt(r,e,t,i){if(!(this instanceof wt))return new wt(r,e,t,i);this.list=i,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{Eu()(M)}catch{}});var Ou=T((MS,Cu)=>{"use strict";var Vp=vu(),Et=Symbol("max"),He=Symbol("length"),Gt=Symbol("lengthCalculator"),qr=Symbol("allowStale"),Rt=Symbol("maxAge"),Me=Symbol("dispose"),Au=Symbol("noDisposeOnSet"),re=Symbol("lruList"),Pe=Symbol("cache"),$u=Symbol("updateAgeOnGet"),us=()=>1,fs=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[Et]=e.max||1/0,i=e.length||us;if(this[Gt]=typeof i!="function"?us:i,this[qr]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Rt]=e.maxAge||0,this[Me]=e.dispose,this[Au]=e.noDisposeOnSet||!1,this[$u]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Et]=e||1/0,xr(this)}get max(){return this[Et]}set allowStale(e){this[qr]=!!e}get allowStale(){return this[qr]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Rt]=e,xr(this)}get maxAge(){return this[Rt]}set lengthCalculator(e){typeof e!="function"&&(e=us),e!==this[Gt]&&(this[Gt]=e,this[He]=0,this[re].forEach(t=>{t.length=this[Gt](t.value,t.key),this[He]+=t.length})),xr(this)}get lengthCalculator(){return this[Gt]}get length(){return this[He]}get itemCount(){return this[re].length}rforEach(e,t){t=t||this;for(let i=this[re].tail;i!==null;){let o=i.prev;Tu(this,e,i,t),i=o}}forEach(e,t){t=t||this;for(let i=this[re].head;i!==null;){let o=i.next;Tu(this,e,i,t),i=o}}keys(){return this[re].toArray().map(e=>e.key)}values(){return this[re].toArray().map(e=>e.value)}reset(){this[Me]&&this[re]&&this[re].length&&this[re].forEach(e=>this[Me](e.key,e.value)),this[Pe]=new Map,this[re]=new Vp,this[He]=0}dump(){return this[re].map(e=>Xn(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[re]}set(e,t,i){if(i=i||this[Rt],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let o=i?Date.now():0,a=this[Gt](t,e);if(this[Pe].has(e)){if(a>this[Et])return Vt(this,this[Pe].get(e)),!1;let d=this[Pe].get(e).value;return this[Me]&&(this[Au]||this[Me](e,d.value)),d.now=o,d.maxAge=i,d.value=t,this[He]+=a-d.length,d.length=a,this.get(e),xr(this),!0}let u=new hs(e,t,a,o,i);return u.length>this[Et]?(this[Me]&&this[Me](e,t),!1):(this[He]+=u.length,this[re].unshift(u),this[Pe].set(e,this[re].head),xr(this),!0)}has(e){if(!this[Pe].has(e))return!1;let t=this[Pe].get(e).value;return!Xn(this,t)}get(e){return cs(this,e,!0)}peek(e){return cs(this,e,!1)}pop(){let e=this[re].tail;return e?(Vt(this,e),e.value):null}del(e){Vt(this,this[Pe].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let o=e[i],a=o.e||0;if(a===0)this.set(o.k,o.v);else{let u=a-t;u>0&&this.set(o.k,o.v,u)}}}prune(){this[Pe].forEach((e,t)=>cs(this,t,!1))}},cs=(r,e,t)=>{let i=r[Pe].get(e);if(i){let o=i.value;if(Xn(r,o)){if(Vt(r,i),!r[qr])return}else t&&(r[$u]&&(i.value.now=Date.now()),r[re].unshiftNode(i));return o.value}},Xn=(r,e)=>{if(!e||!e.maxAge&&!r[Rt])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Rt]&&t>r[Rt]},xr=r=>{if(r[He]>r[Et])for(let e=r[re].tail;r[He]>r[Et]&&e!==null;){let t=e.prev;Vt(r,e),e=t}},Vt=(r,e)=>{if(e){let t=e.value;r[Me]&&r[Me](t.key,t.value),r[He]-=t.length,r[Pe].delete(t.key),r[re].removeNode(e)}},hs=class{constructor(e,t,i,o,a){this.key=e,this.value=t,this.length=i,this.now=o,this.maxAge=a||0}},Tu=(r,e,t,i)=>{let o=t.value;Xn(r,o)&&(Vt(r,t),r[qr]||(o=void 0)),o&&e.call(i,o.value,o.key,r)};Cu.exports=fs});var Ee=T((HS,xu)=>{var vt=class{constructor(e,t){if(t=Xp(t),e instanceof vt)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new vt(e.raw,t);if(e instanceof ds)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(o=>!Iu(o[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let o of this.set)if(o.length===1&&em(o[0])){this.set=[o];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,o=Pu.get(i);if(o)return o;let a=this.options.loose,u=a?me[ce.HYPHENRANGELOOSE]:me[ce.HYPHENRANGE];e=e.replace(u,cm(this.options.includePrerelease)),Q("hyphen replace",e),e=e.replace(me[ce.COMPARATORTRIM],Kp),Q("comparator trim",e),e=e.replace(me[ce.TILDETRIM],Zp),e=e.replace(me[ce.CARETTRIM],Jp),e=e.split(/\s+/).join(" ");let h=e.split(" ").map(y=>tm(y,this.options)).join(" ").split(/\s+/).map(y=>um(y,this.options));a&&(h=h.filter(y=>(Q("loose invalid filter",y,this.options),!!y.match(me[ce.COMPARATORLOOSE])))),Q("range list",h);let d=new Map,f=h.map(y=>new ds(y,this.options));for(let y of f){if(Iu(y))return[y];d.set(y.value,y)}d.size>1&&d.has("")&&d.delete("");let m=[...d.values()];return Pu.set(i,m),m}intersects(e,t){if(!(e instanceof vt))throw new TypeError("a Range is required");return this.set.some(i=>Lu(i,t)&&e.set.some(o=>Lu(o,t)&&i.every(a=>o.every(u=>a.intersects(u,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Qp(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(fm(this.set[t],e,this.options))return!0;return!1}};xu.exports=vt;var Yp=Ou(),Pu=new Yp({max:1e3}),Xp=Ir(),ds=Dr(),Q=Pr(),Qp=ae(),{re:me,t:ce,comparatorTrimReplace:Kp,tildeTrimReplace:Zp,caretTrimReplace:Jp}=St(),Iu=r=>r.value==="<0.0.0-0",em=r=>r.value==="",Lu=(r,e)=>{let t=!0,i=r.slice(),o=i.pop();for(;t&&i.length;)t=i.every(a=>o.intersects(a,e)),o=i.pop();return t},tm=(r,e)=>(Q("comp",r,e),r=im(r,e),Q("caret",r),r=rm(r,e),Q("tildes",r),r=om(r,e),Q("xrange",r),r=lm(r,e),Q("stars",r),r),fe=r=>!r||r.toLowerCase()==="x"||r==="*",rm=(r,e)=>r.trim().split(/\s+/).map(t=>nm(t,e)).join(" "),nm=(r,e)=>{let t=e.loose?me[ce.TILDELOOSE]:me[ce.TILDE];return r.replace(t,(i,o,a,u,h)=>{Q("tilde",r,i,o,a,u,h);let d;return fe(o)?d="":fe(a)?d=`>=${o}.0.0 <${+o+1}.0.0-0`:fe(u)?d=`>=${o}.${a}.0 <${o}.${+a+1}.0-0`:h?(Q("replaceTilde pr",h),d=`>=${o}.${a}.${u}-${h} <${o}.${+a+1}.0-0`):d=`>=${o}.${a}.${u} <${o}.${+a+1}.0-0`,Q("tilde return",d),d})},im=(r,e)=>r.trim().split(/\s+/).map(t=>sm(t,e)).join(" "),sm=(r,e)=>{Q("caret",r,e);let t=e.loose?me[ce.CARETLOOSE]:me[ce.CARET],i=e.includePrerelease?"-0":"";return r.replace(t,(o,a,u,h,d)=>{Q("caret",r,o,a,u,h,d);let f;return fe(a)?f="":fe(u)?f=`>=${a}.0.0${i} <${+a+1}.0.0-0`:fe(h)?a==="0"?f=`>=${a}.${u}.0${i} <${a}.${+u+1}.0-0`:f=`>=${a}.${u}.0${i} <${+a+1}.0.0-0`:d?(Q("replaceCaret pr",d),a==="0"?u==="0"?f=`>=${a}.${u}.${h}-${d} <${a}.${u}.${+h+1}-0`:f=`>=${a}.${u}.${h}-${d} <${a}.${+u+1}.0-0`:f=`>=${a}.${u}.${h}-${d} <${+a+1}.0.0-0`):(Q("no pr"),a==="0"?u==="0"?f=`>=${a}.${u}.${h}${i} <${a}.${u}.${+h+1}-0`:f=`>=${a}.${u}.${h}${i} <${a}.${+u+1}.0-0`:f=`>=${a}.${u}.${h} <${+a+1}.0.0-0`),Q("caret return",f),f})},om=(r,e)=>(Q("replaceXRanges",r,e),r.split(/\s+/).map(t=>am(t,e)).join(" ")),am=(r,e)=>{r=r.trim();let t=e.loose?me[ce.XRANGELOOSE]:me[ce.XRANGE];return r.replace(t,(i,o,a,u,h,d)=>{Q("xRange",r,i,o,a,u,h,d);let f=fe(a),m=f||fe(u),y=m||fe(h),g=y;return o==="="&&g&&(o=""),d=e.includePrerelease?"-0":"",f?o===">"||o==="<"?i="<0.0.0-0":i="*":o&&g?(m&&(u=0),h=0,o===">"?(o=">=",m?(a=+a+1,u=0,h=0):(u=+u+1,h=0)):o==="<="&&(o="<",m?a=+a+1:u=+u+1),o==="<"&&(d="-0"),i=`${o+a}.${u}.${h}${d}`):m?i=`>=${a}.0.0${d} <${+a+1}.0.0-0`:y&&(i=`>=${a}.${u}.0${d} <${a}.${+u+1}.0-0`),Q("xRange return",i),i})},lm=(r,e)=>(Q("replaceStars",r,e),r.trim().replace(me[ce.STAR],"")),um=(r,e)=>(Q("replaceGTE0",r,e),r.trim().replace(me[e.includePrerelease?ce.GTE0PRE:ce.GTE0],"")),cm=r=>(e,t,i,o,a,u,h,d,f,m,y,g,p)=>(fe(i)?t="":fe(o)?t=`>=${i}.0.0${r?"-0":""}`:fe(a)?t=`>=${i}.${o}.0${r?"-0":""}`:u?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,fe(f)?d="":fe(m)?d=`<${+f+1}.0.0-0`:fe(y)?d=`<${f}.${+m+1}.0-0`:g?d=`<=${f}.${m}.${y}-${g}`:r?d=`<${f}.${m}.${+y+1}-0`:d=`<=${d}`,`${t} ${d}`.trim()),fm=(r,e,t)=>{for(let i=0;i<r.length;i++)if(!r[i].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let i=0;i<r.length;i++)if(Q(r[i].semver),r[i].semver!==ds.ANY&&r[i].semver.prerelease.length>0){let o=r[i].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0}});var Dr=T((GS,Nu)=>{var Br=Symbol("SemVer ANY"),Yt=class{static get ANY(){return Br}constructor(e,t){if(t=hm(t),e instanceof Yt){if(e.loose===!!t.loose)return e;e=e.value}ms("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Br?this.value="":this.value=this.operator+this.semver.version,ms("comp",this)}parse(e){let t=this.options.loose?qu[Du.COMPARATORLOOSE]:qu[Du.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new Bu(i[2],this.options.loose):this.semver=Br}toString(){return this.value}test(e){if(ms("Comparator.test",e,this.options.loose),this.semver===Br||e===Br)return!0;if(typeof e=="string")try{e=new Bu(e,this.options)}catch{return!1}return ps(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Yt))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Fu(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new Fu(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),o=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),a=this.semver.version===e.semver.version,u=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),h=ps(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),d=ps(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||o||a&&u||h||d}};Nu.exports=Yt;var hm=Ir(),{re:qu,t:Du}=St(),ps=ls(),ms=Pr(),Bu=ae(),Fu=Ee()});var Fr=T((VS,zu)=>{var dm=Ee(),pm=(r,e,t)=>{try{e=new dm(e,t)}catch{return!1}return e.test(r)};zu.exports=pm});var Wu=T((YS,ku)=>{var mm=Ee(),gm=(r,e)=>new mm(r,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));ku.exports=gm});var Uu=T((XS,ju)=>{var bm=ae(),ym=Ee(),Sm=(r,e,t)=>{let i=null,o=null,a=null;try{a=new ym(e,t)}catch{return null}return r.forEach(u=>{a.test(u)&&(!i||o.compare(u)===-1)&&(i=u,o=new bm(i,t))}),i};ju.exports=Sm});var Hu=T((QS,Mu)=>{var _m=ae(),wm=Ee(),Em=(r,e,t)=>{let i=null,o=null,a=null;try{a=new wm(e,t)}catch{return null}return r.forEach(u=>{a.test(u)&&(!i||o.compare(u)===1)&&(i=u,o=new _m(i,t))}),i};Mu.exports=Em});var Yu=T((KS,Vu)=>{var gs=ae(),Rm=Ee(),Gu=Lr(),vm=(r,e)=>{r=new Rm(r,e);let t=new gs("0.0.0");if(r.test(t)||(t=new gs("0.0.0-0"),r.test(t)))return t;t=null;for(let i=0;i<r.set.length;++i){let o=r.set[i],a=null;o.forEach(u=>{let h=new gs(u.semver.version);switch(u.operator){case">":h.prerelease.length===0?h.patch++:h.prerelease.push(0),h.raw=h.format();case"":case">=":(!a||Gu(h,a))&&(a=h);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),a&&(!t||Gu(t,a))&&(t=a)}return t&&r.test(t)?t:null};Vu.exports=vm});var Qu=T((ZS,Xu)=>{var Am=Ee(),Tm=(r,e)=>{try{return new Am(r,e).range||"*"}catch{return null}};Xu.exports=Tm});var Qn=T((JS,ec)=>{var $m=ae(),Ju=Dr(),{ANY:Cm}=Ju,Om=Ee(),Pm=Fr(),Ku=Lr(),Zu=Mn(),Im=Gn(),Lm=Hn(),xm=(r,e,t,i)=>{r=new $m(r,i),e=new Om(e,i);let o,a,u,h,d;switch(t){case">":o=Ku,a=Im,u=Zu,h=">",d=">=";break;case"<":o=Zu,a=Lm,u=Ku,h="<",d="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Pm(r,e,i))return!1;for(let f=0;f<e.set.length;++f){let m=e.set[f],y=null,g=null;if(m.forEach(p=>{p.semver===Cm&&(p=new Ju(">=0.0.0")),y=y||p,g=g||p,o(p.semver,y.semver,i)?y=p:u(p.semver,g.semver,i)&&(g=p)}),y.operator===h||y.operator===d||(!g.operator||g.operator===h)&&a(r,g.semver))return!1;if(g.operator===d&&u(r,g.semver))return!1}return!0};ec.exports=xm});var rc=T((e_,tc)=>{var qm=Qn(),Dm=(r,e,t)=>qm(r,e,">",t);tc.exports=Dm});var ic=T((t_,nc)=>{var Bm=Qn(),Fm=(r,e,t)=>Bm(r,e,"<",t);nc.exports=Fm});var ac=T((r_,oc)=>{var sc=Ee(),Nm=(r,e,t)=>(r=new sc(r,t),e=new sc(e,t),r.intersects(e));oc.exports=Nm});var uc=T((n_,lc)=>{var zm=Fr(),km=we();lc.exports=(r,e,t)=>{let i=[],o=null,a=null,u=r.sort((m,y)=>km(m,y,t));for(let m of u)zm(m,e,t)?(a=m,o||(o=m)):(a&&i.push([o,a]),a=null,o=null);o&&i.push([o,null]);let h=[];for(let[m,y]of i)m===y?h.push(m):!y&&m===u[0]?h.push("*"):y?m===u[0]?h.push(`<=${y}`):h.push(`${m} - ${y}`):h.push(`>=${m}`);let d=h.join(" || "),f=typeof e.raw=="string"?e.raw:String(e);return d.length<f.length?d:e}});var pc=T((i_,dc)=>{var cc=Ee(),Kn=Dr(),{ANY:bs}=Kn,Nr=Fr(),ys=we(),Wm=(r,e,t={})=>{if(r===e)return!0;r=new cc(r,t),e=new cc(e,t);let i=!1;e:for(let o of r.set){for(let a of e.set){let u=jm(o,a,t);if(i=i||u!==null,u)continue e}if(i)return!1}return!0},jm=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===bs){if(e.length===1&&e[0].semver===bs)return!0;t.includePrerelease?r=[new Kn(">=0.0.0-0")]:r=[new Kn(">=0.0.0")]}if(e.length===1&&e[0].semver===bs){if(t.includePrerelease)return!0;e=[new Kn(">=0.0.0")]}let i=new Set,o,a;for(let p of r)p.operator===">"||p.operator===">="?o=fc(o,p,t):p.operator==="<"||p.operator==="<="?a=hc(a,p,t):i.add(p.semver);if(i.size>1)return null;let u;if(o&&a){if(u=ys(o.semver,a.semver,t),u>0)return null;if(u===0&&(o.operator!==">="||a.operator!=="<="))return null}for(let p of i){if(o&&!Nr(p,String(o),t)||a&&!Nr(p,String(a),t))return null;for(let _ of e)if(!Nr(p,String(_),t))return!1;return!0}let h,d,f,m,y=a&&!t.includePrerelease&&a.semver.prerelease.length?a.semver:!1,g=o&&!t.includePrerelease&&o.semver.prerelease.length?o.semver:!1;y&&y.prerelease.length===1&&a.operator==="<"&&y.prerelease[0]===0&&(y=!1);for(let p of e){if(m=m||p.operator===">"||p.operator===">=",f=f||p.operator==="<"||p.operator==="<=",o){if(g&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===g.major&&p.semver.minor===g.minor&&p.semver.patch===g.patch&&(g=!1),p.operator===">"||p.operator===">="){if(h=fc(o,p,t),h===p&&h!==o)return!1}else if(o.operator===">="&&!Nr(o.semver,String(p),t))return!1}if(a){if(y&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===y.major&&p.semver.minor===y.minor&&p.semver.patch===y.patch&&(y=!1),p.operator==="<"||p.operator==="<="){if(d=hc(a,p,t),d===p&&d!==a)return!1}else if(a.operator==="<="&&!Nr(a.semver,String(p),t))return!1}if(!p.operator&&(a||o)&&u!==0)return!1}return!(o&&f&&!a&&u!==0||a&&m&&!o&&u!==0||g||y)},fc=(r,e,t)=>{if(!r)return e;let i=ys(r.semver,e.semver,t);return i>0?r:i<0||e.operator===">"&&r.operator===">="?e:r},hc=(r,e,t)=>{if(!r)return e;let i=ys(r.semver,e.semver,t);return i<0?r:i>0||e.operator==="<"&&r.operator==="<="?e:r};dc.exports=Wm});var bc=T((s_,gc)=>{var Ss=St(),Um=Or(),Mm=ae(),mc=os(),Hm=_t(),Gm=Fl(),Vm=zl(),Ym=jl(),Xm=Yl(),Qm=Ql(),Km=Zl(),Zm=eu(),Jm=ru(),eg=we(),tg=iu(),rg=ou(),ng=Un(),ig=cu(),sg=hu(),og=Lr(),ag=Mn(),lg=jn(),ug=as(),cg=Hn(),fg=Gn(),hg=ls(),dg=_u(),pg=Dr(),mg=Ee(),gg=Fr(),bg=Wu(),yg=Uu(),Sg=Hu(),_g=Yu(),wg=Qu(),Eg=Qn(),Rg=rc(),vg=ic(),Ag=ac(),Tg=uc(),$g=pc();gc.exports={parse:Hm,valid:Gm,clean:Vm,inc:Ym,diff:Xm,major:Qm,minor:Km,patch:Zm,prerelease:Jm,compare:eg,rcompare:tg,compareLoose:rg,compareBuild:ng,sort:ig,rsort:sg,gt:og,lt:ag,eq:lg,neq:ug,gte:cg,lte:fg,cmp:hg,coerce:dg,Comparator:pg,Range:mg,satisfies:gg,toComparators:bg,maxSatisfying:yg,minSatisfying:Sg,minVersion:_g,validRange:wg,outside:Eg,gtr:Rg,ltr:vg,intersects:Ag,simplifyRange:Tg,subset:$g,SemVer:Mm,re:Ss.re,src:Ss.src,tokens:Ss.t,SEMVER_SPEC_VERSION:Um.SEMVER_SPEC_VERSION,compareIdentifiers:mc.compareIdentifiers,rcompareIdentifiers:mc.rcompareIdentifiers}});var Ec=T((o_,wc)=>{wc.exports=function(r,e){e||(e={});var t=e.hsep===void 0?" ":e.hsep,i=e.align||[],o=e.stringLength||function(d){return String(d).length},a=Sc(r,function(d,f){return _c(f,function(m,y){var g=yc(m);(!d[y]||g>d[y])&&(d[y]=g)}),d},[]),u=Zn(r,function(d){return Zn(d,function(f,m){var y=String(f);if(i[m]==="."){var g=yc(y),p=a[m]+(/\./.test(y)?1:2)-(o(y)-g);return y+Array(p).join(" ")}else return y})}),h=Sc(u,function(d,f){return _c(f,function(m,y){var g=o(m);(!d[y]||g>d[y])&&(d[y]=g)}),d},[]);return Zn(u,function(d){return Zn(d,function(f,m){var y=h[m]-o(f)||0,g=Array(Math.max(y+1,1)).join(" ");return i[m]==="r"||i[m]==="."?g+f:i[m]==="c"?Array(Math.ceil(y/2+1)).join(" ")+f+Array(Math.floor(y/2+1)).join(" "):f+g}).join(t).replace(/\s+$/,"")}).join(`
20
- `)};function yc(r){var e=/\.[^.]*$/.exec(r);return e?e.index+1:r.length}function Sc(r,e,t){if(r.reduce)return r.reduce(e,t);for(var i=0,o=arguments.length>=3?t:r[i++];i<r.length;i++)e(o,r[i],i);return o}function _c(r,e){if(r.forEach)return r.forEach(e);for(var t=0;t<r.length;t++)e.call(r,r[t],t)}function Zn(r,e){if(r.map)return r.map(e);for(var t=[],i=0;i<r.length;i++)t.push(e.call(r,r[i],i));return t}});var $c=T((u_,Tc)=>{var zr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Cg=typeof AbortController=="function",Jn=Cg?AbortController:class{constructor(){this.signal=new Rc}abort(e=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||e,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},Og=typeof AbortSignal=="function",Pg=typeof Jn.AbortSignal=="function",Rc=Og?AbortSignal:Pg?Jn.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(t=>t(e),this))}onabort(){}addEventListener(e,t){e==="abort"&&this._listeners.push(t)}removeEventListener(e,t){e==="abort"&&(this._listeners=this._listeners.filter(i=>i!==t))}},Rs=new Set,_s=(r,e)=>{let t=`LRU_CACHE_OPTION_${r}`;ei(t)&&vs(t,`${r} option`,`options.${e}`,Ge)},ws=(r,e)=>{let t=`LRU_CACHE_METHOD_${r}`;if(ei(t)){let{prototype:i}=Ge,{get:o}=Object.getOwnPropertyDescriptor(i,r);vs(t,`${r} method`,`cache.${e}()`,o)}},Ig=(r,e)=>{let t=`LRU_CACHE_PROPERTY_${r}`;if(ei(t)){let{prototype:i}=Ge,{get:o}=Object.getOwnPropertyDescriptor(i,r);vs(t,`${r} property`,`cache.${e}`,o)}},vc=(...r)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...r):console.error(...r)},ei=r=>!Rs.has(r),vs=(r,e,t,i)=>{Rs.add(r);let o=`The ${e} is deprecated. Please use ${t} instead.`;vc(o,"DeprecationWarning",r,i)},it=r=>r&&r===Math.floor(r)&&r>0&&isFinite(r),Ac=r=>it(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?Xt:null:null,Xt=class extends Array{constructor(e){super(e),this.fill(0)}},Es=class{constructor(e){if(e===0)return[];let t=Ac(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Ge=class{constructor(e={}){let{max:t=0,ttl:i,ttlResolution:o=1,ttlAutopurge:a,updateAgeOnGet:u,updateAgeOnHas:h,allowStale:d,dispose:f,disposeAfter:m,noDisposeOnSet:y,noUpdateTTL:g,maxSize:p=0,maxEntrySize:_=0,sizeCalculation:R,fetchMethod:S,fetchContext:v,noDeleteOnFetchRejection:P,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:A,allowStaleOnFetchAbort:q,ignoreFetchAbort:I}=e,{length:L,maxAge:W,stale:Y}=e instanceof Ge?{}:e;if(t!==0&&!it(t))throw new TypeError("max option must be a nonnegative integer");let X=t?Ac(t):Array;if(!X)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=p,this.maxEntrySize=_||this.maxSize,this.sizeCalculation=R||L,this.sizeCalculation){if(!this.maxSize&&!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(this.fetchMethod=S||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=v,!this.fetchMethod&&v!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new X(t),this.prev=new X(t),this.head=0,this.tail=0,this.free=new Es(t),this.initialFill=1,this.size=0,typeof f=="function"&&(this.dispose=f),typeof m=="function"?(this.disposeAfter=m,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!P,this.allowStaleOnFetchRejection=!!A,this.allowStaleOnFetchAbort=!!q,this.ignoreFetchAbort=!!I,this.maxEntrySize!==0){if(this.maxSize!==0&&!it(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!it(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!d||!!Y,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!u,this.updateAgeOnHas=!!h,this.ttlResolution=it(o)||o===0?o:1,this.ttlAutopurge=!!a,this.ttl=i||W||0,this.ttl){if(!it(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let oe="LRU_CACHE_UNBOUNDED";ei(oe)&&(Rs.add(oe),vc("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",oe,Ge))}Y&&_s("stale","allowStale"),W&&_s("maxAge","ttl"),L&&_s("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Xt(this.max),this.starts=new Xt(this.max),this.setItemTTL=(i,o,a=zr.now())=>{if(this.starts[i]=o!==0?a:0,this.ttls[i]=o,o!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.isStale(i)&&this.delete(this.keyList[i])},o+1);u.unref&&u.unref()}},this.updateItemAge=i=>{this.starts[i]=this.ttls[i]!==0?zr.now():0},this.statusTTL=(i,o)=>{i&&(i.ttl=this.ttls[o],i.start=this.starts[o],i.now=e||t(),i.remainingTTL=i.now+i.ttl-i.start)};let e=0,t=()=>{let i=zr.now();if(this.ttlResolution>0){e=i;let o=setTimeout(()=>e=0,this.ttlResolution);o.unref&&o.unref()}return i};this.getRemainingTTL=i=>{let o=this.keyMap.get(i);return o===void 0?0:this.ttls[o]===0||this.starts[o]===0?1/0:this.starts[o]+this.ttls[o]-(e||t())},this.isStale=i=>this.ttls[i]!==0&&this.starts[i]!==0&&(e||t())-this.starts[i]>this.ttls[i]}updateItemAge(e){}statusTTL(e,t){}setItemTTL(e,t,i){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Xt(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,i,o)=>{if(this.isBackgroundFetch(t))return 0;if(!it(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(t,e),!it(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.addItemSize=(e,t,i)=>{if(this.sizes[e]=t,this.maxSize){let o=this.maxSize-this.sizes[e];for(;this.calculatedSize>o;)this.evict(!0)}this.calculatedSize+=this.sizes[e],i&&(i.entrySize=t,i.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,i,o){if(i||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;!(!this.isValidIndex(t)||((e||!this.isStale(t))&&(yield t),t===this.head));)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;!(!this.isValidIndex(t)||((e||!this.isStale(t))&&(yield t),t===this.tail));)t=this.next[t]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*rentries(){for(let e of this.rindexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*keys(){for(let e of this.indexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*rkeys(){for(let e of this.rindexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*values(){for(let e of this.indexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}*rvalues(){for(let e of this.rindexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,t){for(let i of this.indexes()){let o=this.valList[i],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;if(a!==void 0&&e(a,this.keyList[i],this))return this.get(this.keyList[i],t)}}forEach(e,t=this){for(let i of this.indexes()){let o=this.valList[i],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;a!==void 0&&e.call(t,a,this.keyList[i],this)}}rforEach(e,t=this){for(let i of this.rindexes()){let o=this.valList[i],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;a!==void 0&&e.call(t,a,this.keyList[i],this)}}get prune(){return ws("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){let e=[];for(let t of this.indexes({allowStale:!0})){let i=this.keyList[t],o=this.valList[t],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;if(a===void 0)continue;let u={value:a};if(this.ttls){u.ttl=this.ttls[t];let h=zr.now()-this.starts[t];u.start=Math.floor(Date.now()-h)}this.sizes&&(u.size=this.sizes[t]),e.unshift([i,u])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let o=Date.now()-i.start;i.start=zr.now()-o}this.set(t,i.value,i)}}dispose(e,t,i){}set(e,t,{ttl:i=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,status:f}={}){if(u=this.requireSize(e,t,u,h),this.maxEntrySize&&u>this.maxEntrySize)return f&&(f.set="miss",f.maxEntrySizeExceeded=!0),this.delete(e),this;let m=this.size===0?void 0:this.keyMap.get(e);if(m===void 0)m=this.newIndex(),this.keyList[m]=e,this.valList[m]=t,this.keyMap.set(e,m),this.next[this.tail]=m,this.prev[m]=this.tail,this.tail=m,this.size++,this.addItemSize(m,u,f),f&&(f.set="add"),d=!1;else{this.moveToTail(m);let y=this.valList[m];if(t!==y){if(this.isBackgroundFetch(y)?y.__abortController.abort(new Error("replaced")):a||(this.dispose(y,e,"set"),this.disposeAfter&&this.disposed.push([y,e,"set"])),this.removeItemSize(m),this.valList[m]=t,this.addItemSize(m,u,f),f){f.set="replace";let g=y&&this.isBackgroundFetch(y)?y.__staleWhileFetching:y;g!==void 0&&(f.oldValue=g)}}else f&&(f.set="update")}if(i!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),d||this.setItemTTL(m,i,o),this.statusTTL(f,m),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let e=this.valList[this.head];return this.evict(!0),e}}evict(e){let t=this.head,i=this.keyList[t],o=this.valList[t];return this.isBackgroundFetch(o)?o.__abortController.abort(new Error("evicted")):(this.dispose(o,i,"evict"),this.disposeAfter&&this.disposed.push([o,i,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(i),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas,status:i}={}){let o=this.keyMap.get(e);if(o!==void 0)if(this.isStale(o))i&&(i.has="stale",this.statusTTL(i,o));else return t&&this.updateItemAge(o),i&&(i.has="hit"),this.statusTTL(i,o),!0;else i&&(i.has="miss");return!1}peek(e,{allowStale:t=this.allowStale}={}){let i=this.keyMap.get(e);if(i!==void 0&&(t||!this.isStale(i))){let o=this.valList[i];return this.isBackgroundFetch(o)?o.__staleWhileFetching:o}}backgroundFetch(e,t,i,o){let a=t===void 0?void 0:this.valList[t];if(this.isBackgroundFetch(a))return a;let u=new Jn;i.signal&&i.signal.addEventListener("abort",()=>u.abort(i.signal.reason));let h={signal:u.signal,options:i,context:o},d=(p,_=!1)=>{let{aborted:R}=u.signal,S=i.ignoreFetchAbort&&p!==void 0;return i.status&&(R&&!_?(i.status.fetchAborted=!0,i.status.fetchError=u.signal.reason,S&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),R&&!S&&!_?m(u.signal.reason):(this.valList[t]===g&&(p===void 0?g.__staleWhileFetching?this.valList[t]=g.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,p,h.options))),p)},f=p=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=p),m(p)),m=p=>{let{aborted:_}=u.signal,R=_&&i.allowStaleOnFetchAbort,S=R||i.allowStaleOnFetchRejection,v=S||i.noDeleteOnFetchRejection;if(this.valList[t]===g&&(!v||g.__staleWhileFetching===void 0?this.delete(e):R||(this.valList[t]=g.__staleWhileFetching)),S)return i.status&&g.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),g.__staleWhileFetching;if(g.__returned===g)throw p},y=(p,_)=>{this.fetchMethod(e,a,h).then(R=>p(R),_),u.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(p(),i.allowStaleOnFetchAbort&&(p=R=>d(R,!0)))})};i.status&&(i.status.fetchDispatched=!0);let g=new Promise(y).then(d,f);return g.__abortController=u,g.__staleWhileFetching=a,g.__returned=null,t===void 0?(this.set(e,g,{...h.options,status:void 0}),t=this.keyMap.get(e)):this.valList[t]=g,g}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:h=0,sizeCalculation:d=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:m=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:y=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,fetchContext:_=this.fetchContext,forceRefresh:R=!1,status:S,signal:v}={}){if(!this.fetchMethod)return S&&(S.fetch="get"),this.get(e,{allowStale:t,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:S});let P={allowStale:t,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:a,noDisposeOnSet:u,size:h,sizeCalculation:d,noUpdateTTL:f,noDeleteOnFetchRejection:m,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:p,ignoreFetchAbort:g,status:S,signal:v},D=this.keyMap.get(e);if(D===void 0){S&&(S.fetch="miss");let A=this.backgroundFetch(e,D,P,_);return A.__returned=A}else{let A=this.valList[D];if(this.isBackgroundFetch(A)){let Y=t&&A.__staleWhileFetching!==void 0;return S&&(S.fetch="inflight",Y&&(S.returnedStale=!0)),Y?A.__staleWhileFetching:A.__returned=A}let q=this.isStale(D);if(!R&&!q)return S&&(S.fetch="hit"),this.moveToTail(D),i&&this.updateItemAge(D),this.statusTTL(S,D),A;let I=this.backgroundFetch(e,D,P,_),L=I.__staleWhileFetching!==void 0,W=L&&t;return S&&(S.fetch=L&&q?"stale":"refresh",W&&q&&(S.returnedStale=!0)),W?I.__staleWhileFetching:I.__returned=I}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:a}={}){let u=this.keyMap.get(e);if(u!==void 0){let h=this.valList[u],d=this.isBackgroundFetch(h);return this.statusTTL(a,u),this.isStale(u)?(a&&(a.get="stale"),d?(a&&(a.returnedStale=t&&h.__staleWhileFetching!==void 0),t?h.__staleWhileFetching:void 0):(o||this.delete(e),a&&(a.returnedStale=t),t?h:void 0)):(a&&(a.get="hit"),d?h.__staleWhileFetching:(this.moveToTail(u),i&&this.updateItemAge(u),h))}else a&&(a.get="miss")}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return ws("del","delete"),this.delete}delete(e){let t=!1;if(this.size!==0){let i=this.keyMap.get(e);if(i!==void 0)if(t=!0,this.size===1)this.clear();else{this.removeItemSize(i);let o=this.valList[i];this.isBackgroundFetch(o)?o.__abortController.abort(new Error("deleted")):(this.dispose(o,e,"delete"),this.disposeAfter&&this.disposed.push([o,e,"delete"])),this.keyMap.delete(e),this.keyList[i]=null,this.valList[i]=null,i===this.tail?this.tail=this.prev[i]:i===this.head?this.head=this.next[i]:(this.next[this.prev[i]]=this.next[i],this.prev[this.next[i]]=this.prev[i]),this.size--,this.free.push(i)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(let e of this.rindexes({allowStale:!0})){let t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort(new Error("deleted"));else{let i=this.keyList[e];this.dispose(t,i,"delete"),this.disposeAfter&&this.disposed.push([t,i,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return ws("reset","clear"),this.clear}get length(){return Ig("length","size"),this.size}static get AbortController(){return Jn}static get AbortSignal(){return Rc}};Tc.exports=Ge});var Pc=T((c_,Oc)=>{"use strict";var H=(...r)=>r.every(e=>e)?r.join(""):"",Z=r=>r?encodeURIComponent(r):"",Cc=r=>r.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),Lg={sshtemplate:({domain:r,user:e,project:t,committish:i})=>`git@${r}:${e}/${t}.git${H("#",i)}`,sshurltemplate:({domain:r,user:e,project:t,committish:i})=>`git+ssh://git@${r}/${e}/${t}.git${H("#",i)}`,edittemplate:({domain:r,user:e,project:t,committish:i,editpath:o,path:a})=>`https://${r}/${e}/${t}${H("/",o,"/",Z(i||"HEAD"),"/",a)}`,browsetemplate:({domain:r,user:e,project:t,committish:i,treepath:o})=>`https://${r}/${e}/${t}${H("/",o,"/",Z(i))}`,browsetreetemplate:({domain:r,user:e,project:t,committish:i,treepath:o,path:a,fragment:u,hashformat:h})=>`https://${r}/${e}/${t}/${o}/${Z(i||"HEAD")}/${a}${H("#",h(u||""))}`,browseblobtemplate:({domain:r,user:e,project:t,committish:i,blobpath:o,path:a,fragment:u,hashformat:h})=>`https://${r}/${e}/${t}/${o}/${Z(i||"HEAD")}/${a}${H("#",h(u||""))}`,docstemplate:({domain:r,user:e,project:t,treepath:i,committish:o})=>`https://${r}/${e}/${t}${H("/",i,"/",Z(o))}#readme`,httpstemplate:({auth:r,domain:e,user:t,project:i,committish:o})=>`git+https://${H(r,"@")}${e}/${t}/${i}.git${H("#",o)}`,filetemplate:({domain:r,user:e,project:t,committish:i,path:o})=>`https://${r}/${e}/${t}/raw/${Z(i||"HEAD")}/${o}`,shortcuttemplate:({type:r,user:e,project:t,committish:i})=>`${r}:${e}/${t}${H("#",i)}`,pathtemplate:({user:r,project:e,committish:t})=>`${r}/${e}${H("#",t)}`,bugstemplate:({domain:r,user:e,project:t})=>`https://${r}/${e}/${t}/issues`,hashformat:Cc},st={};st.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:r,user:e,project:t,committish:i,path:o})=>`https://${H(r,"@")}raw.githubusercontent.com/${e}/${t}/${Z(i||"HEAD")}/${o}`,gittemplate:({auth:r,domain:e,user:t,project:i,committish:o})=>`git://${H(r,"@")}${e}/${t}/${i}.git${H("#",o)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://codeload.${r}/${e}/${t}/tar.gz/${Z(i||"HEAD")}`,extract:r=>{let[,e,t,i,o]=r.pathname.split("/",5);if(!(i&&i!=="tree")&&(i||(o=r.hash.slice(1)),t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:o}}};st.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:r,user:e,project:t,committish:i,treepath:o,path:a,editpath:u})=>`https://${r}/${e}/${t}${H("/",o,"/",Z(i||"HEAD"),"/",a,u)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}/get/${Z(i||"HEAD")}.tar.gz`,extract:r=>{let[,e,t,i]=r.pathname.split("/",4);if(!["get"].includes(i)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:r.hash.slice(1)}}};st.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:r,domain:e,user:t,project:i,committish:o})=>`git+https://${H(r,"@")}${e}/${t}/${i}.git${H("#",o)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}/repository/archive.tar.gz?ref=${Z(i||"HEAD")}`,extract:r=>{let e=r.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let t=e.split("/"),i=t.pop();i.endsWith(".git")&&(i=i.slice(0,-4));let o=t.join("/");if(!(!o||!i))return{user:o,project:i,committish:r.hash.slice(1)}}};st.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:r,project:e,committish:t})=>`git@${r}:${e}.git${H("#",t)}`,sshurltemplate:({domain:r,project:e,committish:t})=>`git+ssh://git@${r}/${e}.git${H("#",t)}`,edittemplate:({domain:r,user:e,project:t,committish:i,editpath:o})=>`https://${r}/${e}/${t}${H("/",Z(i))}/${o}`,browsetemplate:({domain:r,project:e,committish:t})=>`https://${r}/${e}${H("/",Z(t))}`,browsetreetemplate:({domain:r,project:e,committish:t,path:i,hashformat:o})=>`https://${r}/${e}${H("/",Z(t))}${H("#",o(i))}`,browseblobtemplate:({domain:r,project:e,committish:t,path:i,hashformat:o})=>`https://${r}/${e}${H("/",Z(t))}${H("#",o(i))}`,docstemplate:({domain:r,project:e,committish:t})=>`https://${r}/${e}${H("/",Z(t))}`,httpstemplate:({domain:r,project:e,committish:t})=>`git+https://${r}/${e}.git${H("#",t)}`,filetemplate:({user:r,project:e,committish:t,path:i})=>`https://gist.githubusercontent.com/${r}/${e}/raw${H("/",Z(t))}/${i}`,shortcuttemplate:({type:r,project:e,committish:t})=>`${r}:${e}${H("#",t)}`,pathtemplate:({project:r,committish:e})=>`${r}${H("#",e)}`,bugstemplate:({domain:r,project:e})=>`https://${r}/${e}`,gittemplate:({domain:r,project:e,committish:t})=>`git://${r}/${e}.git${H("#",t)}`,tarballtemplate:({project:r,committish:e})=>`https://codeload.github.com/gist/${r}/tar.gz/${Z(e||"HEAD")}`,extract:r=>{let[,e,t,i]=r.pathname.split("/",4);if(i!=="raw"){if(!t){if(!e)return;t=e,e=null}return t.endsWith(".git")&&(t=t.slice(0,-4)),{user:e,project:t,committish:r.hash.slice(1)}}},hashformat:function(r){return r&&"file-"+Cc(r)}};st.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:r,user:e,project:t,committish:i,path:o})=>`https://${r}/${e}/${t}/blob/${Z(i)||"HEAD"}/${o}`,httpstemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}.git${H("#",i)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}/archive/${Z(i)||"HEAD"}.tar.gz`,bugstemplate:({user:r,project:e})=>`https://todo.sr.ht/${r}/${e}`,extract:r=>{let[,e,t,i]=r.pathname.split("/",4);if(!["archive"].includes(i)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:r.hash.slice(1)}}};for(let[r,e]of Object.entries(st))st[r]=Object.assign({},Lg,e);Oc.exports=st});var Ts=T((f_,Lc)=>{var xg=be("url"),As=(r,e,t)=>{let i=r.indexOf(t);return r.lastIndexOf(e,i>-1?i:1/0)},Ic=r=>{try{return new xg.URL(r)}catch{}},qg=(r,e)=>{let t=r.indexOf(":"),i=r.slice(0,t+1);if(Object.prototype.hasOwnProperty.call(e,i))return r;let o=r.indexOf("@");return o>-1?o>t?`git+ssh://${r}`:r:r.indexOf("//")===t+1?r:`${r.slice(0,t+1)}//${r.slice(t+1)}`},Dg=r=>{let e=As(r,"@","#"),t=As(r,":","#");return t>e&&(r=r.slice(0,t)+"/"+r.slice(t+1)),As(r,":","#")===-1&&r.indexOf("//")===-1&&(r=`git+ssh://${r}`),r};Lc.exports=(r,e)=>{let t=e?qg(r,e):r;return Ic(t)||Ic(Dg(t))}});var qc=T((h_,xc)=>{"use strict";var Bg=Ts(),Fg=r=>{let e=r.indexOf("#"),t=r.indexOf("/"),i=r.indexOf("/",t+1),o=r.indexOf(":"),a=/\s/.exec(r),u=r.indexOf("@"),h=!a||e>-1&&a.index>e,d=u===-1||e>-1&&u>e,f=o===-1||e>-1&&o>e,m=i===-1||e>-1&&i>e,y=t>0,g=e>-1?r[e-1]!=="/":!r.endsWith("/"),p=!r.startsWith(".");return h&&y&&g&&p&&d&&f&&m};xc.exports=(r,e,{gitHosts:t,protocols:i})=>{var R,S;if(!r)return;let o=Fg(r)?`github:${r}`:r,a=Bg(o,i);if(!a)return;let u=t.byShortcut[a.protocol],h=t.byDomain[a.hostname.startsWith("www.")?a.hostname.slice(4):a.hostname],d=u||h;if(!d)return;let f=t[u||h],m=null;(R=i[a.protocol])!=null&&R.auth&&(a.username||a.password)&&(m=`${a.username}${a.password?":"+a.password:""}`);let y=null,g=null,p=null,_=null;try{if(u){let v=a.pathname.startsWith("/")?a.pathname.slice(1):a.pathname,P=v.indexOf("@");P>-1&&(v=v.slice(P+1));let D=v.lastIndexOf("/");D>-1?(g=decodeURIComponent(v.slice(0,D)),g||(g=null),p=decodeURIComponent(v.slice(D+1))):p=decodeURIComponent(v),p.endsWith(".git")&&(p=p.slice(0,-4)),a.hash&&(y=decodeURIComponent(a.hash.slice(1))),_="shortcut"}else{if(!f.protocols.includes(a.protocol))return;let v=f.extract(a);if(!v)return;g=v.user&&decodeURIComponent(v.user),p=decodeURIComponent(v.project),y=decodeURIComponent(v.committish),_=((S=i[a.protocol])==null?void 0:S.name)||a.protocol.slice(0,-1)}}catch(v){if(v instanceof URIError)return;throw v}return[d,g,m,p,y,_,e]}});var Bc=T((d_,Dc)=>{"use strict";var Ng=$c(),zg=Pc(),kg=qc(),Wg=Ts(),$s=new Ng({max:1e3}),ot,kr,ee,se,qe=class{constructor(e,t,i,o,a,u,h={}){Rn(this,ee);Object.assign(this,et(qe,ot)[e],{type:e,user:t,auth:i,project:o,committish:a,default:u,opts:h})}static addHost(e,t){et(qe,ot)[e]=t,et(qe,ot).byDomain[t.domain]=e,et(qe,ot).byShortcut[`${e}:`]=e,et(qe,kr)[`${e}:`]={name:e}}static fromUrl(e,t){if(typeof e!="string")return;let i=e+JSON.stringify(t||{});if(!$s.has(i)){let o=kg(e,t,{gitHosts:et(qe,ot),protocols:et(qe,kr)});$s.set(i,o?new qe(...o):void 0)}return $s.get(i)}static parseUrl(e){return Wg(e)}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return ne(this,ee,se).call(this,this.sshtemplate,e)}sshurl(e){return ne(this,ee,se).call(this,this.sshurltemplate,e)}browse(e,...t){return typeof e!="string"?ne(this,ee,se).call(this,this.browsetemplate,e):typeof t[0]!="string"?ne(this,ee,se).call(this,this.browsetreetemplate,{...t[0],path:e}):ne(this,ee,se).call(this,this.browsetreetemplate,{...t[1],fragment:t[0],path:e})}browseFile(e,...t){return typeof t[0]!="string"?ne(this,ee,se).call(this,this.browseblobtemplate,{...t[0],path:e}):ne(this,ee,se).call(this,this.browseblobtemplate,{...t[1],fragment:t[0],path:e})}docs(e){return ne(this,ee,se).call(this,this.docstemplate,e)}bugs(e){return ne(this,ee,se).call(this,this.bugstemplate,e)}https(e){return ne(this,ee,se).call(this,this.httpstemplate,e)}git(e){return ne(this,ee,se).call(this,this.gittemplate,e)}shortcut(e){return ne(this,ee,se).call(this,this.shortcuttemplate,e)}path(e){return ne(this,ee,se).call(this,this.pathtemplate,e)}tarball(e){return ne(this,ee,se).call(this,this.tarballtemplate,{...e,noCommittish:!1})}file(e,t){return ne(this,ee,se).call(this,this.filetemplate,{...t,path:e})}edit(e,t){return ne(this,ee,se).call(this,this.edittemplate,{...t,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}},Qt=qe;ot=new WeakMap,kr=new WeakMap,ee=new WeakSet,se=function(e,t){if(typeof e!="function")return null;let i={...this,...this.opts,...t};i.path||(i.path=""),i.path.startsWith("/")&&(i.path=i.path.slice(1)),i.noCommittish&&(i.committish=null);let o=e(i);return i.noGitPlus&&o.startsWith("git+")?o.slice(4):o},Rn(Qt,ot,{byShortcut:{},byDomain:{}}),Rn(Qt,kr,{"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}});for(let[r,e]of Object.entries(zg))Qt.addHost(r,e);Dc.exports=Qt});function Fi({onlyFirst:r=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,r?void 0:"g")}var ji=Ce(ta(),1);var ra=ji.default.HttpProxyAgent,na=ji.default.HttpsProxyAgent;var Sr=class extends Map{constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=e.maxSize,this.maxAge=e.maxAge||Number.POSITIVE_INFINITY,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(e){if(typeof this.onEviction=="function")for(let[t,i]of e)this.onEviction(t,i.value)}_deleteIfExpired(e,t){return typeof t.expiry=="number"&&t.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(e,t.value),this.delete(e)):!1}_getOrDeleteIfExpired(e,t){if(this._deleteIfExpired(e,t)===!1)return t.value}_getItemValue(e,t){return t.expiry?this._getOrDeleteIfExpired(e,t):t.value}_peek(e,t){let i=t.get(e);return this._getItemValue(e,i)}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(e,t){this.oldCache.delete(e),this._set(e,t)}*_entriesAscending(){for(let e of this.oldCache){let[t,i]=e;this.cache.has(t)||this._deleteIfExpired(t,i)===!1&&(yield e)}for(let e of this.cache){let[t,i]=e;this._deleteIfExpired(t,i)===!1&&(yield e)}}get(e){if(this.cache.has(e)){let t=this.cache.get(e);return this._getItemValue(e,t)}if(this.oldCache.has(e)){let t=this.oldCache.get(e);if(this._deleteIfExpired(e,t)===!1)return this._moveToRecent(e,t),t.value}}set(e,t,{maxAge:i=this.maxAge}={}){let o=typeof i=="number"&&i!==Number.POSITIVE_INFINITY?Date.now()+i:void 0;this.cache.has(e)?this.cache.set(e,{value:t,expiry:o}):this._set(e,{value:t,expiry:o})}has(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):this.oldCache.has(e)?!this._deleteIfExpired(e,this.oldCache.get(e)):!1}peek(e){if(this.cache.has(e))return this._peek(e,this.cache);if(this.oldCache.has(e))return this._peek(e,this.oldCache)}delete(e){let t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");let t=[...this._entriesAscending()],i=t.length-e;i<0?(this.cache=new Map(t),this.oldCache=new Map,this._size=t.length):(i>0&&this._emitEvictions(t.slice(0,i)),this.oldCache=new Map(t.slice(i)),this.cache=new Map,this._size=0),this.maxSize=e}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache){let[t,i]=e;this._deleteIfExpired(t,i)===!1&&(yield[t,i.value])}for(let e of this.oldCache){let[t,i]=e;this.cache.has(t)||this._deleteIfExpired(t,i)===!1&&(yield[t,i.value])}}*entriesDescending(){let e=[...this.cache];for(let t=e.length-1;t>=0;--t){let i=e[t],[o,a]=i;this._deleteIfExpired(o,a)===!1&&(yield[o,a.value])}e=[...this.oldCache];for(let t=e.length-1;t>=0;--t){let i=e[t],[o,a]=i;this.cache.has(o)||this._deleteIfExpired(o,a)===!1&&(yield[o,a.value])}}*entriesAscending(){for(let[e,t]of this._entriesAscending())yield[e,t.value]}get size(){if(!this._size)return this.oldCache.size;let e=0;for(let t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}entries(){return this.entriesAscending()}forEach(e,t=this){for(let[i,o]of this.entriesAscending())e.call(t,o,i,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};var aa=Ce(sa(),1);import{Agent as zh}from"node:http";import{Agent as kh}from"node:https";var Wh={agentCacheSize:512},oa={maxSockets:64,keepAlive:!1},_r=class extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace(this,_r)}};function Ui(r,e={}){if(!("undici"in e))throw new Error("The 'undici' option is required");let t={...Wh,...e},i=new Sr({maxSize:t.agentCacheSize});async function o(u,h={}){let{origin:d,protocol:f}=new URL(u),m=h!=null&&h.noProxy?null:(0,aa.getProxyForUrl)(u),y=JSON.stringify({proxyUrl:m,origin:d,...h});if(i.has(y))return i.get(y);let g;if("noProxy"in h&&delete h.noProxy,e.undici){let{ProxyAgent:p,Agent:_}=await import("undici"),R={...h};"keepAlive"in R&&!("pipelining"in R)&&(R.pipelining=R.keepAlive?1:0),"keepAlive"in R&&delete R.keepAlive,"maxSockets"in R&&(R.connections=R.maxSockets,delete R.maxSockets),m?g=new p({...R,uri:m}):g=new _(R)}else{let p=f==="https:";m?g=new(p?na:ra)({...h,proxy:m}):g=new(p?kh:zh)(h)}return i.set(y,g),g}let a=(u,{timeout:h=0,agentOpts:d={},...f}={})=>new Promise(async(m,y)=>{var _;if(!e.undici&&!("agent"in f)){let R=await o(u,{...oa,...d});R&&(f.agent=R)}else if(e.undici&&!("dispatcher"in f)){let R=await o(u,{...oa,...d});R&&(f.dispatcher=R)}let g,p;h&&(!("signal"in f)&&globalThis.AbortController&&(p=new AbortController,f.signal=p.signal),g=setTimeout(()=>{var S;(S=p==null?void 0:p.abort)==null||S.call(p);let R=new _r(`${f.method||"GET"} ${u} timed out after ${h}ms`);y(R)},h),(_=g==null?void 0:g.unref)==null||_.call(g)),r(u,f).then(R=>{g&&clearTimeout(g),m(R)}).catch(R=>{if(g&&clearTimeout(g),R.name==="AbortError")return m(null);y(R)})});return a.clearCache=()=>{for(let u of i.values())"destroy"in u&&u.destroy();i.clear()},a}var Hc=Ce(Mi(),1);import md from"node:http";import gd from"node:https";import kt from"node:zlib";import Ua,{PassThrough as Ma,pipeline as Wt}from"node:stream";import{Buffer as Dn}from"node:buffer";function Uh(r){if(!/^data:/i.test(r))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');r=r.replace(/\r?\n/g,"");let e=r.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let t=r.substring(5,e).split(";"),i="",o=!1,a=t[0]||"text/plain",u=a;for(let m=1;m<t.length;m++)t[m]==="base64"?o=!0:t[m]&&(u+=`;${t[m]}`,t[m].indexOf("charset=")===0&&(i=t[m].substring(8)));!t[0]&&!i.length&&(u+=";charset=US-ASCII",i="US-ASCII");let h=o?"base64":"ascii",d=unescape(r.substring(e+1)),f=Buffer.from(d,h);return f.type=a,f.typeFull=u,f.charset=i,f}var fa=Uh;wr();An();import rt,{PassThrough as Oa}from"node:stream";import{types as Pa,deprecate as Ji,promisify as od}from"node:util";import{Buffer as _e}from"node:buffer";var je=class extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,this.constructor),this.type=t}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};var de=class extends je{constructor(e,t,i){super(e,t),i&&(this.code=this.errno=i.code,this.erroredSysCall=i.syscall)}};var Tn=Symbol.toStringTag,Xi=r=>typeof r=="object"&&typeof r.append=="function"&&typeof r.delete=="function"&&typeof r.get=="function"&&typeof r.getAll=="function"&&typeof r.has=="function"&&typeof r.set=="function"&&typeof r.sort=="function"&&r[Tn]==="URLSearchParams",Rr=r=>r&&typeof r=="object"&&typeof r.arrayBuffer=="function"&&typeof r.type=="string"&&typeof r.stream=="function"&&typeof r.constructor=="function"&&/^(Blob|File)$/.test(r[Tn]),_a=r=>typeof r=="object"&&(r[Tn]==="AbortSignal"||r[Tn]==="EventTarget"),wa=(r,e)=>{let t=new URL(e).hostname,i=new URL(r).hostname;return t===i||t.endsWith(`.${i}`)},Ea=(r,e)=>{let t=new URL(e).protocol,i=new URL(r).protocol;return t===i};var ad=od(rt.pipeline),pe=Symbol("Body internals"),xe=class{constructor(e,{size:t=0}={}){let i=null;e===null?e=null:Xi(e)?e=_e.from(e.toString()):Rr(e)||_e.isBuffer(e)||(Pa.isAnyArrayBuffer(e)?e=_e.from(e):ArrayBuffer.isView(e)?e=_e.from(e.buffer,e.byteOffset,e.byteLength):e instanceof rt||(e instanceof gt?(e=Sa(e),i=e.type.split("=")[1]):e=_e.from(String(e))));let o=e;_e.isBuffer(e)?o=rt.Readable.from(e):Rr(e)&&(o=rt.Readable.from(e.stream())),this[pe]={body:e,stream:o,boundary:i,disturbed:!1,error:null},this.size=t,e instanceof rt&&e.on("error",a=>{let u=a instanceof je?a:new de(`Invalid response body while trying to fetch ${this.url}: ${a.message}`,"system",a);this[pe].error=u})}get body(){return this[pe].stream}get bodyUsed(){return this[pe].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:t,byteLength:i}=await Zi(this);return e.slice(t,t+i)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let i=new gt,o=new URLSearchParams(await this.text());for(let[a,u]of o)i.append(a,u);return i}let{toFormData:t}=await Promise.resolve().then(()=>(Ca(),$a));return t(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[pe].body&&this[pe].body.type||"",t=await this.arrayBuffer();return new We([t],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await Zi(this);return new TextDecoder().decode(e)}buffer(){return Zi(this)}};xe.prototype.buffer=Ji(xe.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(xe.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:Ji(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function Zi(r){if(r[pe].disturbed)throw new TypeError(`body used already for: ${r.url}`);if(r[pe].disturbed=!0,r[pe].error)throw r[pe].error;let{body:e}=r;if(e===null)return _e.alloc(0);if(!(e instanceof rt))return _e.alloc(0);let t=[],i=0;try{for await(let o of e){if(r.size>0&&i+o.length>r.size){let a=new de(`content size at ${r.url} over limit: ${r.size}`,"max-size");throw e.destroy(a),a}i+=o.length,t.push(o)}}catch(o){throw o instanceof je?o:new de(`Invalid response body while trying to fetch ${r.url}: ${o.message}`,"system",o)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return t.every(o=>typeof o=="string")?_e.from(t.join("")):_e.concat(t,i)}catch(o){throw new de(`Could not create Buffer from response body for ${r.url}: ${o.message}`,"system",o)}else throw new de(`Premature close of server response while trying to fetch ${r.url}`)}var Nt=(r,e)=>{let t,i,{body:o}=r[pe];if(r.bodyUsed)throw new Error("cannot clone body after it is used");return o instanceof rt&&typeof o.getBoundary!="function"&&(t=new Oa({highWaterMark:e}),i=new Oa({highWaterMark:e}),o.pipe(t),o.pipe(i),r[pe].stream=t,o=i),o},ld=Ji(r=>r.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),Pn=(r,e)=>r===null?null:typeof r=="string"?"text/plain;charset=UTF-8":Xi(r)?"application/x-www-form-urlencoded;charset=UTF-8":Rr(r)?r.type||null:_e.isBuffer(r)||Pa.isAnyArrayBuffer(r)||ArrayBuffer.isView(r)?null:r instanceof gt?`multipart/form-data; boundary=${e[pe].boundary}`:r&&typeof r.getBoundary=="function"?`multipart/form-data;boundary=${ld(r)}`:r instanceof rt?null:"text/plain;charset=UTF-8",Ia=r=>{let{body:e}=r[pe];return e===null?0:Rr(e)?e.size:_e.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},La=async(r,{body:e})=>{e===null?r.end():await ad(e,r)};import{types as xa}from"node:util";import Ln from"node:http";var In=typeof Ln.validateHeaderName=="function"?Ln.validateHeaderName:r=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(r)){let e=new TypeError(`Header name must be a valid HTTP token [${r}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},es=typeof Ln.validateHeaderValue=="function"?Ln.validateHeaderValue:(r,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let t=new TypeError(`Invalid character in header content ["${r}"]`);throw Object.defineProperty(t,"code",{value:"ERR_INVALID_CHAR"}),t}},ue=class extends URLSearchParams{constructor(e){let t=[];if(e instanceof ue){let i=e.raw();for(let[o,a]of Object.entries(i))t.push(...a.map(u=>[o,u]))}else if(e!=null)if(typeof e=="object"&&!xa.isBoxedPrimitive(e)){let i=e[Symbol.iterator];if(i==null)t.push(...Object.entries(e));else{if(typeof i!="function")throw new TypeError("Header pairs must be iterable");t=[...e].map(o=>{if(typeof o!="object"||xa.isBoxedPrimitive(o))throw new TypeError("Each header pair must be an iterable object");return[...o]}).map(o=>{if(o.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...o]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return t=t.length>0?t.map(([i,o])=>(In(i),es(i,String(o)),[String(i).toLowerCase(),String(o)])):void 0,super(t),new Proxy(this,{get(i,o,a){switch(o){case"append":case"set":return(u,h)=>(In(u),es(u,String(h)),URLSearchParams.prototype[o].call(i,String(u).toLowerCase(),String(h)));case"delete":case"has":case"getAll":return u=>(In(u),URLSearchParams.prototype[o].call(i,String(u).toLowerCase()));case"keys":return()=>(i.sort(),new Set(URLSearchParams.prototype.keys.call(i)).keys());default:return Reflect.get(i,o,a)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let t=this.getAll(e);if(t.length===0)return null;let i=t.join(", ");return/^content-encoding$/i.test(e)&&(i=i.toLowerCase()),i}forEach(e,t=void 0){for(let i of this.keys())Reflect.apply(e,t,[this.get(i),i,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,t)=>(e[t]=this.getAll(t),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,t)=>{let i=this.getAll(t);return t==="host"?e[t]=i[0]:e[t]=i.length>1?i:i[0],e},{})}};Object.defineProperties(ue.prototype,["get","entries","forEach","values"].reduce((r,e)=>(r[e]={enumerable:!0},r),{}));function qa(r=[]){return new ue(r.reduce((e,t,i,o)=>(i%2===0&&e.push(o.slice(i,i+2)),e),[]).filter(([e,t])=>{try{return In(e),es(e,String(t)),!0}catch{return!1}}))}var ud=new Set([301,302,303,307,308]),xn=r=>ud.has(r);var Oe=Symbol("Response internals"),ie=class extends xe{constructor(e=null,t={}){super(e,t);let i=t.status!=null?t.status:200,o=new ue(t.headers);if(e!==null&&!o.has("Content-Type")){let a=Pn(e,this);a&&o.append("Content-Type",a)}this[Oe]={type:"default",url:t.url,status:i,statusText:t.statusText||"",headers:o,counter:t.counter,highWaterMark:t.highWaterMark}}get type(){return this[Oe].type}get url(){return this[Oe].url||""}get status(){return this[Oe].status}get ok(){return this[Oe].status>=200&&this[Oe].status<300}get redirected(){return this[Oe].counter>0}get statusText(){return this[Oe].statusText}get headers(){return this[Oe].headers}get highWaterMark(){return this[Oe].highWaterMark}clone(){return new ie(Nt(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,t=302){if(!xn(t))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new ie(null,{headers:{location:new URL(e).toString()},status:t})}static error(){let e=new ie(null,{status:0,statusText:""});return e[Oe].type="error",e}static json(e=void 0,t={}){let i=JSON.stringify(e);if(i===void 0)throw new TypeError("data is not JSON serializable");let o=new ue(t&&t.headers);return o.has("content-type")||o.set("content-type","application/json"),new ie(i,{...t,headers:o})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(ie.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});import{format as hd}from"node:url";import{deprecate as dd}from"node:util";var Da=r=>{if(r.search)return r.search;let e=r.href.length-1,t=r.hash||(r.href[e]==="#"?"#":"");return r.href[e-t.length]==="?"?"?":""};import{isIP as cd}from"node:net";function Ba(r,e=!1){return r==null||(r=new URL(r),/^(about|blob|data):$/.test(r.protocol))?"no-referrer":(r.username="",r.password="",r.hash="",e&&(r.pathname="",r.search=""),r)}var Fa=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Na="strict-origin-when-cross-origin";function za(r){if(!Fa.has(r))throw new TypeError(`Invalid referrerPolicy: ${r}`);return r}function fd(r){if(/^(http|ws)s:$/.test(r.protocol))return!0;let e=r.host.replace(/(^\[)|(]$)/g,""),t=cd(e);return t===4&&/^127\./.test(e)||t===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:r.host==="localhost"||r.host.endsWith(".localhost")?!1:r.protocol==="file:"}function zt(r){return/^about:(blank|srcdoc)$/.test(r)||r.protocol==="data:"||/^(blob|filesystem):$/.test(r.protocol)?!0:fd(r)}function ka(r,{referrerURLCallback:e,referrerOriginCallback:t}={}){if(r.referrer==="no-referrer"||r.referrerPolicy==="")return null;let i=r.referrerPolicy;if(r.referrer==="about:client")return"no-referrer";let o=r.referrer,a=Ba(o),u=Ba(o,!0);a.toString().length>4096&&(a=u),e&&(a=e(a)),t&&(u=t(u));let h=new URL(r.url);switch(i){case"no-referrer":return"no-referrer";case"origin":return u;case"unsafe-url":return a;case"strict-origin":return zt(a)&&!zt(h)?"no-referrer":u.toString();case"strict-origin-when-cross-origin":return a.origin===h.origin?a:zt(a)&&!zt(h)?"no-referrer":u;case"same-origin":return a.origin===h.origin?a:"no-referrer";case"origin-when-cross-origin":return a.origin===h.origin?a:u;case"no-referrer-when-downgrade":return zt(a)&&!zt(h)?"no-referrer":a;default:throw new TypeError(`Invalid referrerPolicy: ${i}`)}}function Wa(r){let e=(r.get("referrer-policy")||"").split(/[,\s]+/),t="";for(let i of e)i&&Fa.has(i)&&(t=i);return t}var te=Symbol("Request internals"),Ar=r=>typeof r=="object"&&typeof r[te]=="object",pd=dd(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),Ue=class extends xe{constructor(e,t={}){let i;if(Ar(e)?i=new URL(e.url):(i=new URL(e),e={}),i.username!==""||i.password!=="")throw new TypeError(`${i} is an url with embedded credentials.`);let o=t.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(o)&&(o=o.toUpperCase()),!Ar(t)&&"data"in t&&pd(),(t.body!=null||Ar(e)&&e.body!==null)&&(o==="GET"||o==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let a=t.body?t.body:Ar(e)&&e.body!==null?Nt(e):null;super(a,{size:t.size||e.size||0});let u=new ue(t.headers||e.headers||{});if(a!==null&&!u.has("Content-Type")){let f=Pn(a,this);f&&u.set("Content-Type",f)}let h=Ar(e)?e.signal:null;if("signal"in t&&(h=t.signal),h!=null&&!_a(h))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let d=t.referrer==null?e.referrer:t.referrer;if(d==="")d="no-referrer";else if(d){let f=new URL(d);d=/^about:(\/\/)?client$/.test(f)?"client":f}else d=void 0;this[te]={method:o,redirect:t.redirect||e.redirect||"follow",headers:u,parsedURL:i,signal:h,referrer:d},this.follow=t.follow===void 0?e.follow===void 0?20:e.follow:t.follow,this.compress=t.compress===void 0?e.compress===void 0?!0:e.compress:t.compress,this.counter=t.counter||e.counter||0,this.agent=t.agent||e.agent,this.highWaterMark=t.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=t.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=t.referrerPolicy||e.referrerPolicy||""}get method(){return this[te].method}get url(){return hd(this[te].parsedURL)}get headers(){return this[te].headers}get redirect(){return this[te].redirect}get signal(){return this[te].signal}get referrer(){if(this[te].referrer==="no-referrer")return"";if(this[te].referrer==="client")return"about:client";if(this[te].referrer)return this[te].referrer.toString()}get referrerPolicy(){return this[te].referrerPolicy}set referrerPolicy(e){this[te].referrerPolicy=za(e)}clone(){return new Ue(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(Ue.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});var ja=r=>{let{parsedURL:e}=r[te],t=new ue(r[te].headers);t.has("Accept")||t.set("Accept","*/*");let i=null;if(r.body===null&&/^(post|put)$/i.test(r.method)&&(i="0"),r.body!==null){let h=Ia(r);typeof h=="number"&&!Number.isNaN(h)&&(i=String(h))}i&&t.set("Content-Length",i),r.referrerPolicy===""&&(r.referrerPolicy=Na),r.referrer&&r.referrer!=="no-referrer"?r[te].referrer=ka(r):r[te].referrer="no-referrer",r[te].referrer instanceof URL&&t.set("Referer",r.referrer),t.has("User-Agent")||t.set("User-Agent","node-fetch"),r.compress&&!t.has("Accept-Encoding")&&t.set("Accept-Encoding","gzip, deflate, br");let{agent:o}=r;typeof o=="function"&&(o=o(e)),!t.has("Connection")&&!o&&t.set("Connection","close");let a=Da(e),u={path:e.pathname+a,method:r.method,headers:t[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:r.insecureHTTPParser,agent:o};return{parsedURL:e,options:u}};var qn=class extends je{constructor(e,t="aborted"){super(e,t)}};An();Qi();var bd=new Set(["data:","http:","https:"]);async function Bn(r,e){return new Promise((t,i)=>{let o=new Ue(r,e),{parsedURL:a,options:u}=ja(o);if(!bd.has(a.protocol))throw new TypeError(`node-fetch cannot load ${r}. URL scheme "${a.protocol.replace(/:$/,"")}" is not supported.`);if(a.protocol==="data:"){let _=fa(o.url),R=new ie(_,{headers:{"Content-Type":_.typeFull}});t(R);return}let h=(a.protocol==="https:"?gd:md).request,{signal:d}=o,f=null,m=()=>{let _=new qn("The operation was aborted.");i(_),o.body&&o.body instanceof Ua.Readable&&o.body.destroy(_),!(!f||!f.body)&&f.body.emit("error",_)};if(d&&d.aborted){m();return}let y=()=>{m(),p()},g=h(a.toString(),u);d&&d.addEventListener("abort",y);let p=()=>{g.abort(),d&&d.removeEventListener("abort",y)};g.on("error",_=>{i(new de(`request to ${o.url} failed, reason: ${_.message}`,"system",_)),p()}),yd(g,_=>{f&&f.body&&f.body.destroy(_)}),process.version<"v14"&&g.on("socket",_=>{let R;_.prependListener("end",()=>{R=_._eventsCount}),_.prependListener("close",S=>{if(f&&R<_._eventsCount&&!S){let v=new Error("Premature close");v.code="ERR_STREAM_PREMATURE_CLOSE",f.body.emit("error",v)}})}),g.on("response",_=>{g.setTimeout(0);let R=qa(_.rawHeaders);if(xn(_.statusCode)){let A=R.get("Location"),q=null;try{q=A===null?null:new URL(A,o.url)}catch{if(o.redirect!=="manual"){i(new de(`uri requested responds with an invalid redirect URL: ${A}`,"invalid-redirect")),p();return}}switch(o.redirect){case"error":i(new de(`uri requested responds with a redirect, redirect mode is set to error: ${o.url}`,"no-redirect")),p();return;case"manual":break;case"follow":{if(q===null)break;if(o.counter>=o.follow){i(new de(`maximum redirect reached at: ${o.url}`,"max-redirect")),p();return}let I={headers:new ue(o.headers),follow:o.follow,counter:o.counter+1,agent:o.agent,compress:o.compress,method:o.method,body:Nt(o),signal:o.signal,size:o.size,referrer:o.referrer,referrerPolicy:o.referrerPolicy};if(!wa(o.url,q)||!Ea(o.url,q))for(let W of["authorization","www-authenticate","cookie","cookie2"])I.headers.delete(W);if(_.statusCode!==303&&o.body&&e.body instanceof Ua.Readable){i(new de("Cannot follow redirect with body being a readable stream","unsupported-redirect")),p();return}(_.statusCode===303||(_.statusCode===301||_.statusCode===302)&&o.method==="POST")&&(I.method="GET",I.body=void 0,I.headers.delete("content-length"));let L=Wa(R);L&&(I.referrerPolicy=L),t(Bn(new Ue(q,I))),p();return}default:return i(new TypeError(`Redirect option '${o.redirect}' is not a valid value of RequestRedirect`))}}d&&_.once("end",()=>{d.removeEventListener("abort",y)});let S=Wt(_,new Ma,A=>{A&&i(A)});process.version<"v12.10"&&_.on("aborted",y);let v={url:o.url,status:_.statusCode,statusText:_.statusMessage,headers:R,size:o.size,counter:o.counter,highWaterMark:o.highWaterMark},P=R.get("Content-Encoding");if(!o.compress||o.method==="HEAD"||P===null||_.statusCode===204||_.statusCode===304){f=new ie(S,v),t(f);return}let D={flush:kt.Z_SYNC_FLUSH,finishFlush:kt.Z_SYNC_FLUSH};if(P==="gzip"||P==="x-gzip"){S=Wt(S,kt.createGunzip(D),A=>{A&&i(A)}),f=new ie(S,v),t(f);return}if(P==="deflate"||P==="x-deflate"){let A=Wt(_,new Ma,q=>{q&&i(q)});A.once("data",q=>{(q[0]&15)===8?S=Wt(S,kt.createInflate(),I=>{I&&i(I)}):S=Wt(S,kt.createInflateRaw(),I=>{I&&i(I)}),f=new ie(S,v),t(f)}),A.once("end",()=>{f||(f=new ie(S,v),t(f))});return}if(P==="br"){S=Wt(S,kt.createBrotliDecompress(),A=>{A&&i(A)}),f=new ie(S,v),t(f);return}f=new ie(S,v),t(f)}),La(g,o).catch(i)})}function yd(r,e){let t=Dn.from(`0\r
16
+ `;function Za(r,e){var t=[],i="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var o=e.whitespace?" = ":"=";return Object.keys(r).forEach(function(a,u,h){var d=r[a];d&&Array.isArray(d)?d.forEach(function(f){i+=Mt(a+"[]")+o+Mt(f)+`
17
+ `}):d&&typeof d=="object"?t.push(a):i+=Mt(a)+o+Mt(d)+rs}),e.section&&i.length&&(i="["+Mt(e.section)+"]"+rs+i),t.forEach(function(a,u,h){var d=Ja(a).join("\\."),f=(e.section?e.section+".":"")+d,g=Za(r[a],{section:f,whitespace:e.whitespace});i.length&&g.length&&(i+=rs),i+=g}),i}function Ja(r){return r.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function Id(r){var e={},t=e,i=null,o=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,a=r.split(/[\r\n]+/g);return a.forEach(function(u,h,d){if(!(!u||u.match(/^\s*[;#]/))){var f=u.match(o);if(f){if(f[1]!==void 0){if(i=Nn(f[1]),i==="__proto__"){t={};return}t=e[i]=e[i]||{};return}var g=Nn(f[2]);if(g!=="__proto__"){var y=f[3]?Nn(f[4]):!0;switch(y){case"true":case"false":case"null":y=JSON.parse(y)}if(g.length>2&&g.slice(-2)==="[]"){if(g=g.substring(0,g.length-2),g==="__proto__")return;t[g]?Array.isArray(t[g])||(t[g]=[t[g]]):t[g]=[]}Array.isArray(t[g])?t[g].push(y):t[g]=y}}}}),Object.keys(e).filter(function(u,h,d){if(!e[u]||typeof e[u]!="object"||Array.isArray(e[u]))return!1;var f=Ja(u),g=e,y=f.pop(),m=y.replace(/\\\./g,".");return f.forEach(function(p,S,R){p!=="__proto__"&&((!g[p]||typeof g[p]!="object")&&(g[p]={}),g=g[p])}),g===e&&m===y?!1:(g[m]=e[u],!0)}).forEach(function(u,h,d){delete e[u]}),e}function el(r){return r.charAt(0)==='"'&&r.slice(-1)==='"'||r.charAt(0)==="'"&&r.slice(-1)==="'"}function Mt(r){return typeof r!="string"||r.match(/[=\r\n]/)||r.match(/^\[/)||r.length>1&&el(r)||r!==r.trim()?JSON.stringify(r):r.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Nn(r,e){if(r=(r||"").trim(),el(r)){r.charAt(0)==="'"&&(r=r.substr(1,r.length-2));try{r=JSON.parse(r)}catch{}}else{for(var t=!1,i="",o=0,a=r.length;o<a;o++){var u=r.charAt(o);if(t)"\\;#".indexOf(u)!==-1?i+=u:i+="\\"+u,t=!1;else{if(";#".indexOf(u)!==-1)break;u==="\\"?t=!0:i+=u}}return t&&(i+="\\"),i.trim()}return r}});var il=A((SS,nl)=>{"use strict";var ns=1,rl=2;function xd(){return""}function Ld(r,e,t){return r.slice(e,t).replace(/\S/g," ")}nl.exports=function(r,e){e=e||{};for(var t,i,o=!1,a=!1,u=0,h="",d=e.whitespace===!1?xd:Ld,f=0;f<r.length;f++){if(t=r[f],i=r[f+1],!a&&t==='"'){var g=r[f-1]==="\\"&&r[f-2]!=="\\";g||(o=!o)}if(!o){if(!a&&t+i==="//")h+=r.slice(u,f),u=f,a=ns,f++;else if(a===ns&&t+i===`\r
18
+ `){f++,a=!1,h+=d(r,u,f),u=f;continue}else if(a===ns&&t===`
19
+ `)a=!1,h+=d(r,u,f),u=f;else if(!a&&t+i==="/*"){h+=r.slice(u,f),u=f,a=rl,f++;continue}else if(a===rl&&t+i==="*/"){f++,a=!1,h+=d(r,u,f+1),u=f+1;continue}}}return h+(a?d(r.substr(u)):r.substr(u))}});var ol=A(Ht=>{"use strict";var sl=ye("fs"),qd=tl(),Cr=ye("path"),Dd=il(),Bd=Ht.parse=function(r){return/^\s*{/.test(r)?JSON.parse(Dd(r)):qd.parse(r)},Fd=Ht.file=function(){var r=[].slice.call(arguments).filter(function(o){return o!=null});for(var e in r)if(typeof r[e]!="string")return;var t=Cr.join.apply(null,r),i;try{return sl.readFileSync(t,"utf-8")}catch{return}},_S=Ht.json=function(){var r=Fd.apply(null,arguments);return r?Bd(r):null},wS=Ht.env=function(r,e){e=e||process.env;var t={},i=r.length;for(var o in e)if(o.toLowerCase().indexOf(r.toLowerCase())===0){for(var a=o.substring(i).split("__"),u;(u=a.indexOf(""))>-1;)a.splice(u,1);var h=t;a.forEach(function(f,g){!f||typeof h!="object"||(g===a.length-1&&(h[f]=e[o]),h[f]===void 0&&(h[f]={}),h=h[f])})}return t},ES=Ht.find=function(){var r=Cr.join.apply(null,[].slice.call(arguments));function e(t,i){var o=Cr.join(t,i);try{return sl.statSync(o),o}catch{if(Cr.dirname(t)!==t)return e(Cr.dirname(t),i)}}return e(process.cwd(),r)}});var hl=A((vS,fl)=>{"use strict";function ll(r){return r instanceof Buffer||r instanceof Date||r instanceof RegExp}function ul(r){if(r instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(r.length):new Buffer(r.length);return r.copy(e),e}else{if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp)return new RegExp(r);throw new Error("Unexpected situation")}}function cl(r){var e=[];return r.forEach(function(t,i){typeof t=="object"&&t!==null?Array.isArray(t)?e[i]=cl(t):ll(t)?e[i]=ul(t):e[i]=is({},t):e[i]=t}),e}function al(r,e){return e==="__proto__"?void 0:r[e]}var is=fl.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var r=arguments[0],e=Array.prototype.slice.call(arguments,1),t,i,o;return e.forEach(function(a){typeof a!="object"||a===null||Array.isArray(a)||Object.keys(a).forEach(function(u){if(i=al(r,u),t=al(a,u),t!==r)if(typeof t!="object"||t===null){r[u]=t;return}else if(Array.isArray(t)){r[u]=cl(t);return}else if(ll(t)){r[u]=ul(t);return}else if(typeof i!="object"||i===null||Array.isArray(i)){r[u]=is({},t);return}else{r[u]=is(i,t);return}})}),r}});var zn=A((TS,ml)=>{var $r=ol(),Gt=ye("path").join,Nd=hl(),dl="/etc",pl=process.platform==="win32",Or=pl?process.env.USERPROFILE:process.env.HOME;ml.exports=function(r,e,t,i){if(typeof r!="string")throw new Error("rc(name): name *must* be string");t||(t=Hi()(process.argv.slice(2))),e=(typeof e=="string"?$r.json(e):e)||{},i=i||$r.parse;var o=$r.env(r+"_"),a=[e],u=[];function h(d){if(!(u.indexOf(d)>=0)){var f=$r.file(d);f&&(a.push(i(f)),u.push(d))}}return pl||[Gt(dl,r,"config"),Gt(dl,r+"rc")].forEach(h),Or&&[Gt(Or,".config",r,"config"),Gt(Or,".config",r),Gt(Or,"."+r,"config"),Gt(Or,"."+r+"rc")].forEach(h),h($r.find("."+r+"rc")),o.config&&h(o.config),t.config&&h(t.config),Nd.apply(null,a.concat([o,t,u.length?{configs:u,config:u[u.length-1]}:void 0]))}});var Rl=A((AS,El)=>{var ss=ye("url"),_l=Ka(),zd=_l.decodeBase64,kd=_l.encodeBase64,gl=":_authToken",bl=":_auth",yl=":username",Sl=":_password";El.exports=function(){var r,e;return arguments.length>=2?(r=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?r=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||zn()("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),r=r||e.npmrc.registry,wl(r,e)||Wd(e.npmrc)};function wl(r,e){for(var t=ss.parse(r,!1,!0),i;i!=="/"&&t.pathname!==i;){i=t.pathname||"/";var o="//"+t.host+i.replace(/\/$/,""),a=Ud(o,e.npmrc);if(a)return a;if(!e.recursive)return/\/$/.test(r)?void 0:wl(ss.resolve(r,"."),e);t.pathname=ss.resolve(jd(i),"..")||"/"}}function Wd(r){if(r._auth){var e=kn(r._auth);return{token:e,type:"Basic"}}}function jd(r){return r[r.length-1]==="/"?r:r+"/"}function Ud(r,e){var t=Md(e[r+gl]||e[r+"/"+gl]);if(t)return t;var i=e[r+yl]||e[r+"/"+yl],o=e[r+Sl]||e[r+"/"+Sl],a=Hd(i,o);if(a)return a;var u=Gd(e[r+bl]||e[r+"/"+bl]);if(u)return u}function kn(r){return r.replace(/^\$\{?([^}]*)\}?$/,function(e,t){return process.env[t]})}function Md(r){if(r){var e=kn(r);return{token:e,type:"Bearer"}}}function Hd(r,e){if(!(!r||!e)){var t=zd(kn(e)),i=kd(r+":"+t);return{token:i,type:"Basic",password:t,username:r}}}function Gd(r){if(r){var e=kn(r);return{token:e,type:"Basic"}}}});var Tl=A((CS,vl)=>{vl.exports=function(r,e){var t=e||zn()("npm",{registry:"https://registry.npmjs.org/"}),i=t[r+":registry"]||t.registry;return i.slice(-1)==="/"?i:i+"/"}});var Pr=A(($S,Al)=>{var Vd="2.0.0",Yd=Number.MAX_SAFE_INTEGER||9007199254740991,Xd=16;Al.exports={SEMVER_SPEC_VERSION:Vd,MAX_LENGTH:256,MAX_SAFE_INTEGER:Yd,MAX_SAFE_COMPONENT_LENGTH:Xd}});var Ir=A((OS,Cl)=>{var Qd=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Cl.exports=Qd});var wt=A((ot,$l)=>{var{MAX_SAFE_COMPONENT_LENGTH:os}=Pr(),Kd=Ir();ot=$l.exports={};var Zd=ot.re=[],$=ot.src=[],O=ot.t={},Jd=0,N=(r,e,t)=>{let i=Jd++;Kd(r,i,e),O[r]=i,$[i]=e,Zd[i]=new RegExp(e,t?"g":void 0)};N("NUMERICIDENTIFIER","0|[1-9]\\d*");N("NUMERICIDENTIFIERLOOSE","[0-9]+");N("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");N("MAINVERSION",`(${$[O.NUMERICIDENTIFIER]})\\.(${$[O.NUMERICIDENTIFIER]})\\.(${$[O.NUMERICIDENTIFIER]})`);N("MAINVERSIONLOOSE",`(${$[O.NUMERICIDENTIFIERLOOSE]})\\.(${$[O.NUMERICIDENTIFIERLOOSE]})\\.(${$[O.NUMERICIDENTIFIERLOOSE]})`);N("PRERELEASEIDENTIFIER",`(?:${$[O.NUMERICIDENTIFIER]}|${$[O.NONNUMERICIDENTIFIER]})`);N("PRERELEASEIDENTIFIERLOOSE",`(?:${$[O.NUMERICIDENTIFIERLOOSE]}|${$[O.NONNUMERICIDENTIFIER]})`);N("PRERELEASE",`(?:-(${$[O.PRERELEASEIDENTIFIER]}(?:\\.${$[O.PRERELEASEIDENTIFIER]})*))`);N("PRERELEASELOOSE",`(?:-?(${$[O.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${$[O.PRERELEASEIDENTIFIERLOOSE]})*))`);N("BUILDIDENTIFIER","[0-9A-Za-z-]+");N("BUILD",`(?:\\+(${$[O.BUILDIDENTIFIER]}(?:\\.${$[O.BUILDIDENTIFIER]})*))`);N("FULLPLAIN",`v?${$[O.MAINVERSION]}${$[O.PRERELEASE]}?${$[O.BUILD]}?`);N("FULL",`^${$[O.FULLPLAIN]}$`);N("LOOSEPLAIN",`[v=\\s]*${$[O.MAINVERSIONLOOSE]}${$[O.PRERELEASELOOSE]}?${$[O.BUILD]}?`);N("LOOSE",`^${$[O.LOOSEPLAIN]}$`);N("GTLT","((?:<|>)?=?)");N("XRANGEIDENTIFIERLOOSE",`${$[O.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);N("XRANGEIDENTIFIER",`${$[O.NUMERICIDENTIFIER]}|x|X|\\*`);N("XRANGEPLAIN",`[v=\\s]*(${$[O.XRANGEIDENTIFIER]})(?:\\.(${$[O.XRANGEIDENTIFIER]})(?:\\.(${$[O.XRANGEIDENTIFIER]})(?:${$[O.PRERELEASE]})?${$[O.BUILD]}?)?)?`);N("XRANGEPLAINLOOSE",`[v=\\s]*(${$[O.XRANGEIDENTIFIERLOOSE]})(?:\\.(${$[O.XRANGEIDENTIFIERLOOSE]})(?:\\.(${$[O.XRANGEIDENTIFIERLOOSE]})(?:${$[O.PRERELEASELOOSE]})?${$[O.BUILD]}?)?)?`);N("XRANGE",`^${$[O.GTLT]}\\s*${$[O.XRANGEPLAIN]}$`);N("XRANGELOOSE",`^${$[O.GTLT]}\\s*${$[O.XRANGEPLAINLOOSE]}$`);N("COERCE",`(^|[^\\d])(\\d{1,${os}})(?:\\.(\\d{1,${os}}))?(?:\\.(\\d{1,${os}}))?(?:$|[^\\d])`);N("COERCERTL",$[O.COERCE],!0);N("LONETILDE","(?:~>?)");N("TILDETRIM",`(\\s*)${$[O.LONETILDE]}\\s+`,!0);ot.tildeTrimReplace="$1~";N("TILDE",`^${$[O.LONETILDE]}${$[O.XRANGEPLAIN]}$`);N("TILDELOOSE",`^${$[O.LONETILDE]}${$[O.XRANGEPLAINLOOSE]}$`);N("LONECARET","(?:\\^)");N("CARETTRIM",`(\\s*)${$[O.LONECARET]}\\s+`,!0);ot.caretTrimReplace="$1^";N("CARET",`^${$[O.LONECARET]}${$[O.XRANGEPLAIN]}$`);N("CARETLOOSE",`^${$[O.LONECARET]}${$[O.XRANGEPLAINLOOSE]}$`);N("COMPARATORLOOSE",`^${$[O.GTLT]}\\s*(${$[O.LOOSEPLAIN]})$|^$`);N("COMPARATOR",`^${$[O.GTLT]}\\s*(${$[O.FULLPLAIN]})$|^$`);N("COMPARATORTRIM",`(\\s*)${$[O.GTLT]}\\s*(${$[O.LOOSEPLAIN]}|${$[O.XRANGEPLAIN]})`,!0);ot.comparatorTrimReplace="$1$2$3";N("HYPHENRANGE",`^\\s*(${$[O.XRANGEPLAIN]})\\s+-\\s+(${$[O.XRANGEPLAIN]})\\s*$`);N("HYPHENRANGELOOSE",`^\\s*(${$[O.XRANGEPLAINLOOSE]})\\s+-\\s+(${$[O.XRANGEPLAINLOOSE]})\\s*$`);N("STAR","(<|>)?=?\\s*\\*");N("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");N("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var xr=A((PS,Ol)=>{var ep=["includePrerelease","loose","rtl"],tp=r=>r?typeof r!="object"?{loose:!0}:ep.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};Ol.exports=tp});var as=A((IS,xl)=>{var Pl=/^[0-9]+$/,Il=(r,e)=>{let t=Pl.test(r),i=Pl.test(e);return t&&i&&(r=+r,e=+e),r===e?0:t&&!i?-1:i&&!t?1:r<e?-1:1},rp=(r,e)=>Il(e,r);xl.exports={compareIdentifiers:Il,rcompareIdentifiers:rp}});var le=A((xS,Bl)=>{var Wn=Ir(),{MAX_LENGTH:Ll,MAX_SAFE_INTEGER:jn}=Pr(),{re:ql,t:Dl}=wt(),np=xr(),{compareIdentifiers:Vt}=as(),Se=class{constructor(e,t){if(t=np(t),e instanceof Se){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Ll)throw new TypeError(`version is longer than ${Ll} characters`);Wn("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?ql[Dl.LOOSE]:ql[Dl.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>jn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>jn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>jn||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){let a=+o;if(a>=0&&a<jn)return a}return o}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Wn("SemVer.compare",this.version,this.options,e),!(e instanceof Se)){if(typeof e=="string"&&e===this.version)return 0;e=new Se(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof Se||(e=new Se(e,this.options)),Vt(this.major,e.major)||Vt(this.minor,e.minor)||Vt(this.patch,e.patch)}comparePre(e){if(e instanceof Se||(e=new Se(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let i=this.prerelease[t],o=e.prerelease[t];if(Wn("prerelease compare",t,i,o),i===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(i===void 0)return-1;if(i===o)continue;return Vt(i,o)}while(++t)}compareBuild(e){e instanceof Se||(e=new Se(e,this.options));let t=0;do{let i=this.build[t],o=e.build[t];if(Wn("prerelease compare",t,i,o),i===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(i===void 0)return-1;if(i===o)continue;return Vt(i,o)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(Vt(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};Bl.exports=Se});var Et=A((LS,kl)=>{var{MAX_LENGTH:ip}=Pr(),{re:Fl,t:Nl}=wt(),zl=le(),sp=xr(),op=(r,e)=>{if(e=sp(e),r instanceof zl)return r;if(typeof r!="string"||r.length>ip||!(e.loose?Fl[Nl.LOOSE]:Fl[Nl.FULL]).test(r))return null;try{return new zl(r,e)}catch{return null}};kl.exports=op});var jl=A((qS,Wl)=>{var ap=Et(),lp=(r,e)=>{let t=ap(r,e);return t?t.version:null};Wl.exports=lp});var Ml=A((DS,Ul)=>{var up=Et(),cp=(r,e)=>{let t=up(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Ul.exports=cp});var Vl=A((BS,Gl)=>{var Hl=le(),fp=(r,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new Hl(r instanceof Hl?r.version:r,t).inc(e,i).version}catch{return null}};Gl.exports=fp});var Ee=A((FS,Xl)=>{var Yl=le(),hp=(r,e,t)=>new Yl(r,t).compare(new Yl(e,t));Xl.exports=hp});var Un=A((NS,Ql)=>{var dp=Ee(),pp=(r,e,t)=>dp(r,e,t)===0;Ql.exports=pp});var Jl=A((zS,Zl)=>{var Kl=Et(),mp=Un(),gp=(r,e)=>{if(mp(r,e))return null;{let t=Kl(r),i=Kl(e),o=t.prerelease.length||i.prerelease.length,a=o?"pre":"",u=o?"prerelease":"";for(let h in t)if((h==="major"||h==="minor"||h==="patch")&&t[h]!==i[h])return a+h;return u}};Zl.exports=gp});var tu=A((kS,eu)=>{var bp=le(),yp=(r,e)=>new bp(r,e).major;eu.exports=yp});var nu=A((WS,ru)=>{var Sp=le(),_p=(r,e)=>new Sp(r,e).minor;ru.exports=_p});var su=A((jS,iu)=>{var wp=le(),Ep=(r,e)=>new wp(r,e).patch;iu.exports=Ep});var au=A((US,ou)=>{var Rp=Et(),vp=(r,e)=>{let t=Rp(r,e);return t&&t.prerelease.length?t.prerelease:null};ou.exports=vp});var uu=A((MS,lu)=>{var Tp=Ee(),Ap=(r,e,t)=>Tp(e,r,t);lu.exports=Ap});var fu=A((HS,cu)=>{var Cp=Ee(),$p=(r,e)=>Cp(r,e,!0);cu.exports=$p});var Mn=A((GS,du)=>{var hu=le(),Op=(r,e,t)=>{let i=new hu(r,t),o=new hu(e,t);return i.compare(o)||i.compareBuild(o)};du.exports=Op});var mu=A((VS,pu)=>{var Pp=Mn(),Ip=(r,e)=>r.sort((t,i)=>Pp(t,i,e));pu.exports=Ip});var bu=A((YS,gu)=>{var xp=Mn(),Lp=(r,e)=>r.sort((t,i)=>xp(i,t,e));gu.exports=Lp});var Lr=A((XS,yu)=>{var qp=Ee(),Dp=(r,e,t)=>qp(r,e,t)>0;yu.exports=Dp});var Hn=A((QS,Su)=>{var Bp=Ee(),Fp=(r,e,t)=>Bp(r,e,t)<0;Su.exports=Fp});var ls=A((KS,_u)=>{var Np=Ee(),zp=(r,e,t)=>Np(r,e,t)!==0;_u.exports=zp});var Gn=A((ZS,wu)=>{var kp=Ee(),Wp=(r,e,t)=>kp(r,e,t)>=0;wu.exports=Wp});var Vn=A((JS,Eu)=>{var jp=Ee(),Up=(r,e,t)=>jp(r,e,t)<=0;Eu.exports=Up});var us=A((e_,Ru)=>{var Mp=Un(),Hp=ls(),Gp=Lr(),Vp=Gn(),Yp=Hn(),Xp=Vn(),Qp=(r,e,t,i)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return Mp(r,t,i);case"!=":return Hp(r,t,i);case">":return Gp(r,t,i);case">=":return Vp(r,t,i);case"<":return Yp(r,t,i);case"<=":return Xp(r,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};Ru.exports=Qp});var Tu=A((t_,vu)=>{var Kp=le(),Zp=Et(),{re:Yn,t:Xn}=wt(),Jp=(r,e)=>{if(r instanceof Kp)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(Yn[Xn.COERCE]);else{let i;for(;(i=Yn[Xn.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),Yn[Xn.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;Yn[Xn.COERCERTL].lastIndex=-1}return t===null?null:Zp(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};vu.exports=Jp});var Cu=A((r_,Au)=>{"use strict";Au.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Ou=A((n_,$u)=>{"use strict";$u.exports=M;M.Node=Rt;M.create=M;function M(r){var e=this;if(e instanceof M||(e=new M),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(o){e.push(o)});else if(arguments.length>0)for(var t=0,i=arguments.length;t<i;t++)e.push(arguments[t]);return e}M.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};M.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};M.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var e=this.tail;r.list=this,r.prev=e,e&&(e.next=r),this.tail=r,this.head||(this.head=r),this.length++}};M.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)tm(this,arguments[r]);return this.length};M.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)rm(this,arguments[r]);return this.length};M.prototype.pop=function(){if(this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};M.prototype.shift=function(){if(this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};M.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,i=0;t!==null;i++)r.call(e,t.value,i,this),t=t.next};M.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,i=this.length-1;t!==null;i--)r.call(e,t.value,i,this),t=t.prev};M.prototype.get=function(r){for(var e=0,t=this.head;t!==null&&e<r;e++)t=t.next;if(e===r&&t!==null)return t.value};M.prototype.getReverse=function(r){for(var e=0,t=this.tail;t!==null&&e<r;e++)t=t.prev;if(e===r&&t!==null)return t.value};M.prototype.map=function(r,e){e=e||this;for(var t=new M,i=this.head;i!==null;)t.push(r.call(e,i.value,this)),i=i.next;return t};M.prototype.mapReverse=function(r,e){e=e||this;for(var t=new M,i=this.tail;i!==null;)t.push(r.call(e,i.value,this)),i=i.prev;return t};M.prototype.reduce=function(r,e){var t,i=this.head;if(arguments.length>1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=0;i!==null;o++)t=r(t,i.value,o),i=i.next;return t};M.prototype.reduceReverse=function(r,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=this.length-1;i!==null;o--)t=r(t,i.value,o),i=i.prev;return t};M.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};M.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};M.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new M;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var i=0,o=this.head;o!==null&&i<r;i++)o=o.next;for(;o!==null&&i<e;i++,o=o.next)t.push(o.value);return t};M.prototype.sliceReverse=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new M;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var i=this.length,o=this.tail;o!==null&&i>e;i--)o=o.prev;for(;o!==null&&i>r;i--,o=o.prev)t.push(o.value);return t};M.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,o=this.head;o!==null&&i<r;i++)o=o.next;for(var a=[],i=0;o&&i<e;i++)a.push(o.value),o=this.removeNode(o);o===null&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(var i=0;i<t.length;i++)o=em(this,o,t[i]);return a};M.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var i=t.prev;t.prev=t.next,t.next=i}return this.head=e,this.tail=r,this};function em(r,e,t){var i=e===r.head?new Rt(t,null,e,r):new Rt(t,e,e.next,r);return i.next===null&&(r.tail=i),i.prev===null&&(r.head=i),r.length++,i}function tm(r,e){r.tail=new Rt(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function rm(r,e){r.head=new Rt(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function Rt(r,e,t,i){if(!(this instanceof Rt))return new Rt(r,e,t,i);this.list=i,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{Cu()(M)}catch{}});var qu=A((i_,Lu)=>{"use strict";var nm=Ou(),vt=Symbol("max"),Ye=Symbol("length"),Yt=Symbol("lengthCalculator"),Dr=Symbol("allowStale"),Tt=Symbol("maxAge"),Ve=Symbol("dispose"),Pu=Symbol("noDisposeOnSet"),ie=Symbol("lruList"),Le=Symbol("cache"),xu=Symbol("updateAgeOnGet"),cs=()=>1,hs=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[vt]=e.max||1/0,i=e.length||cs;if(this[Yt]=typeof i!="function"?cs:i,this[Dr]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Tt]=e.maxAge||0,this[Ve]=e.dispose,this[Pu]=e.noDisposeOnSet||!1,this[xu]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[vt]=e||1/0,qr(this)}get max(){return this[vt]}set allowStale(e){this[Dr]=!!e}get allowStale(){return this[Dr]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Tt]=e,qr(this)}get maxAge(){return this[Tt]}set lengthCalculator(e){typeof e!="function"&&(e=cs),e!==this[Yt]&&(this[Yt]=e,this[Ye]=0,this[ie].forEach(t=>{t.length=this[Yt](t.value,t.key),this[Ye]+=t.length})),qr(this)}get lengthCalculator(){return this[Yt]}get length(){return this[Ye]}get itemCount(){return this[ie].length}rforEach(e,t){t=t||this;for(let i=this[ie].tail;i!==null;){let o=i.prev;Iu(this,e,i,t),i=o}}forEach(e,t){t=t||this;for(let i=this[ie].head;i!==null;){let o=i.next;Iu(this,e,i,t),i=o}}keys(){return this[ie].toArray().map(e=>e.key)}values(){return this[ie].toArray().map(e=>e.value)}reset(){this[Ve]&&this[ie]&&this[ie].length&&this[ie].forEach(e=>this[Ve](e.key,e.value)),this[Le]=new Map,this[ie]=new nm,this[Ye]=0}dump(){return this[ie].map(e=>Qn(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[ie]}set(e,t,i){if(i=i||this[Tt],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let o=i?Date.now():0,a=this[Yt](t,e);if(this[Le].has(e)){if(a>this[vt])return Xt(this,this[Le].get(e)),!1;let d=this[Le].get(e).value;return this[Ve]&&(this[Pu]||this[Ve](e,d.value)),d.now=o,d.maxAge=i,d.value=t,this[Ye]+=a-d.length,d.length=a,this.get(e),qr(this),!0}let u=new ds(e,t,a,o,i);return u.length>this[vt]?(this[Ve]&&this[Ve](e,t),!1):(this[Ye]+=u.length,this[ie].unshift(u),this[Le].set(e,this[ie].head),qr(this),!0)}has(e){if(!this[Le].has(e))return!1;let t=this[Le].get(e).value;return!Qn(this,t)}get(e){return fs(this,e,!0)}peek(e){return fs(this,e,!1)}pop(){let e=this[ie].tail;return e?(Xt(this,e),e.value):null}del(e){Xt(this,this[Le].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let o=e[i],a=o.e||0;if(a===0)this.set(o.k,o.v);else{let u=a-t;u>0&&this.set(o.k,o.v,u)}}}prune(){this[Le].forEach((e,t)=>fs(this,t,!1))}},fs=(r,e,t)=>{let i=r[Le].get(e);if(i){let o=i.value;if(Qn(r,o)){if(Xt(r,i),!r[Dr])return}else t&&(r[xu]&&(i.value.now=Date.now()),r[ie].unshiftNode(i));return o.value}},Qn=(r,e)=>{if(!e||!e.maxAge&&!r[Tt])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Tt]&&t>r[Tt]},qr=r=>{if(r[Ye]>r[vt])for(let e=r[ie].tail;r[Ye]>r[vt]&&e!==null;){let t=e.prev;Xt(r,e),e=t}},Xt=(r,e)=>{if(e){let t=e.value;r[Ve]&&r[Ve](t.key,t.value),r[Ye]-=t.length,r[Le].delete(t.key),r[ie].removeNode(e)}},ds=class{constructor(e,t,i,o,a){this.key=e,this.value=t,this.length=i,this.now=o,this.maxAge=a||0}},Iu=(r,e,t,i)=>{let o=t.value;Qn(r,o)&&(Xt(r,t),r[Dr]||(o=void 0)),o&&e.call(i,o.value,o.key,r)};Lu.exports=hs});var Re=A((s_,Nu)=>{var At=class{constructor(e,t){if(t=sm(t),e instanceof At)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new At(e.raw,t);if(e instanceof ps)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(o=>!Bu(o[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let o of this.set)if(o.length===1&&cm(o[0])){this.set=[o];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,o=Du.get(i);if(o)return o;let a=this.options.loose,u=a?ge[fe.HYPHENRANGELOOSE]:ge[fe.HYPHENRANGE];e=e.replace(u,_m(this.options.includePrerelease)),X("hyphen replace",e),e=e.replace(ge[fe.COMPARATORTRIM],am),X("comparator trim",e),e=e.replace(ge[fe.TILDETRIM],lm),e=e.replace(ge[fe.CARETTRIM],um),e=e.split(/\s+/).join(" ");let h=e.split(" ").map(y=>fm(y,this.options)).join(" ").split(/\s+/).map(y=>Sm(y,this.options));a&&(h=h.filter(y=>(X("loose invalid filter",y,this.options),!!y.match(ge[fe.COMPARATORLOOSE])))),X("range list",h);let d=new Map,f=h.map(y=>new ps(y,this.options));for(let y of f){if(Bu(y))return[y];d.set(y.value,y)}d.size>1&&d.has("")&&d.delete("");let g=[...d.values()];return Du.set(i,g),g}intersects(e,t){if(!(e instanceof At))throw new TypeError("a Range is required");return this.set.some(i=>Fu(i,t)&&e.set.some(o=>Fu(o,t)&&i.every(a=>o.every(u=>a.intersects(u,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new om(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(wm(this.set[t],e,this.options))return!0;return!1}};Nu.exports=At;var im=qu(),Du=new im({max:1e3}),sm=xr(),ps=Br(),X=Ir(),om=le(),{re:ge,t:fe,comparatorTrimReplace:am,tildeTrimReplace:lm,caretTrimReplace:um}=wt(),Bu=r=>r.value==="<0.0.0-0",cm=r=>r.value==="",Fu=(r,e)=>{let t=!0,i=r.slice(),o=i.pop();for(;t&&i.length;)t=i.every(a=>o.intersects(a,e)),o=i.pop();return t},fm=(r,e)=>(X("comp",r,e),r=pm(r,e),X("caret",r),r=hm(r,e),X("tildes",r),r=gm(r,e),X("xrange",r),r=ym(r,e),X("stars",r),r),he=r=>!r||r.toLowerCase()==="x"||r==="*",hm=(r,e)=>r.trim().split(/\s+/).map(t=>dm(t,e)).join(" "),dm=(r,e)=>{let t=e.loose?ge[fe.TILDELOOSE]:ge[fe.TILDE];return r.replace(t,(i,o,a,u,h)=>{X("tilde",r,i,o,a,u,h);let d;return he(o)?d="":he(a)?d=`>=${o}.0.0 <${+o+1}.0.0-0`:he(u)?d=`>=${o}.${a}.0 <${o}.${+a+1}.0-0`:h?(X("replaceTilde pr",h),d=`>=${o}.${a}.${u}-${h} <${o}.${+a+1}.0-0`):d=`>=${o}.${a}.${u} <${o}.${+a+1}.0-0`,X("tilde return",d),d})},pm=(r,e)=>r.trim().split(/\s+/).map(t=>mm(t,e)).join(" "),mm=(r,e)=>{X("caret",r,e);let t=e.loose?ge[fe.CARETLOOSE]:ge[fe.CARET],i=e.includePrerelease?"-0":"";return r.replace(t,(o,a,u,h,d)=>{X("caret",r,o,a,u,h,d);let f;return he(a)?f="":he(u)?f=`>=${a}.0.0${i} <${+a+1}.0.0-0`:he(h)?a==="0"?f=`>=${a}.${u}.0${i} <${a}.${+u+1}.0-0`:f=`>=${a}.${u}.0${i} <${+a+1}.0.0-0`:d?(X("replaceCaret pr",d),a==="0"?u==="0"?f=`>=${a}.${u}.${h}-${d} <${a}.${u}.${+h+1}-0`:f=`>=${a}.${u}.${h}-${d} <${a}.${+u+1}.0-0`:f=`>=${a}.${u}.${h}-${d} <${+a+1}.0.0-0`):(X("no pr"),a==="0"?u==="0"?f=`>=${a}.${u}.${h}${i} <${a}.${u}.${+h+1}-0`:f=`>=${a}.${u}.${h}${i} <${a}.${+u+1}.0-0`:f=`>=${a}.${u}.${h} <${+a+1}.0.0-0`),X("caret return",f),f})},gm=(r,e)=>(X("replaceXRanges",r,e),r.split(/\s+/).map(t=>bm(t,e)).join(" ")),bm=(r,e)=>{r=r.trim();let t=e.loose?ge[fe.XRANGELOOSE]:ge[fe.XRANGE];return r.replace(t,(i,o,a,u,h,d)=>{X("xRange",r,i,o,a,u,h,d);let f=he(a),g=f||he(u),y=g||he(h),m=y;return o==="="&&m&&(o=""),d=e.includePrerelease?"-0":"",f?o===">"||o==="<"?i="<0.0.0-0":i="*":o&&m?(g&&(u=0),h=0,o===">"?(o=">=",g?(a=+a+1,u=0,h=0):(u=+u+1,h=0)):o==="<="&&(o="<",g?a=+a+1:u=+u+1),o==="<"&&(d="-0"),i=`${o+a}.${u}.${h}${d}`):g?i=`>=${a}.0.0${d} <${+a+1}.0.0-0`:y&&(i=`>=${a}.${u}.0${d} <${a}.${+u+1}.0-0`),X("xRange return",i),i})},ym=(r,e)=>(X("replaceStars",r,e),r.trim().replace(ge[fe.STAR],"")),Sm=(r,e)=>(X("replaceGTE0",r,e),r.trim().replace(ge[e.includePrerelease?fe.GTE0PRE:fe.GTE0],"")),_m=r=>(e,t,i,o,a,u,h,d,f,g,y,m,p)=>(he(i)?t="":he(o)?t=`>=${i}.0.0${r?"-0":""}`:he(a)?t=`>=${i}.${o}.0${r?"-0":""}`:u?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,he(f)?d="":he(g)?d=`<${+f+1}.0.0-0`:he(y)?d=`<${f}.${+g+1}.0-0`:m?d=`<=${f}.${g}.${y}-${m}`:r?d=`<${f}.${g}.${+y+1}-0`:d=`<=${d}`,`${t} ${d}`.trim()),wm=(r,e,t)=>{for(let i=0;i<r.length;i++)if(!r[i].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let i=0;i<r.length;i++)if(X(r[i].semver),r[i].semver!==ps.ANY&&r[i].semver.prerelease.length>0){let o=r[i].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0}});var Br=A((o_,Uu)=>{var Fr=Symbol("SemVer ANY"),Qt=class{static get ANY(){return Fr}constructor(e,t){if(t=Em(t),e instanceof Qt){if(e.loose===!!t.loose)return e;e=e.value}gs("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Fr?this.value="":this.value=this.operator+this.semver.version,gs("comp",this)}parse(e){let t=this.options.loose?zu[ku.COMPARATORLOOSE]:zu[ku.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new Wu(i[2],this.options.loose):this.semver=Fr}toString(){return this.value}test(e){if(gs("Comparator.test",e,this.options.loose),this.semver===Fr||e===Fr)return!0;if(typeof e=="string")try{e=new Wu(e,this.options)}catch{return!1}return ms(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Qt))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new ju(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new ju(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),o=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),a=this.semver.version===e.semver.version,u=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),h=ms(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),d=ms(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||o||a&&u||h||d}};Uu.exports=Qt;var Em=xr(),{re:zu,t:ku}=wt(),ms=us(),gs=Ir(),Wu=le(),ju=Re()});var Nr=A((a_,Mu)=>{var Rm=Re(),vm=(r,e,t)=>{try{e=new Rm(e,t)}catch{return!1}return e.test(r)};Mu.exports=vm});var Gu=A((l_,Hu)=>{var Tm=Re(),Am=(r,e)=>new Tm(r,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));Hu.exports=Am});var Yu=A((u_,Vu)=>{var Cm=le(),$m=Re(),Om=(r,e,t)=>{let i=null,o=null,a=null;try{a=new $m(e,t)}catch{return null}return r.forEach(u=>{a.test(u)&&(!i||o.compare(u)===-1)&&(i=u,o=new Cm(i,t))}),i};Vu.exports=Om});var Qu=A((c_,Xu)=>{var Pm=le(),Im=Re(),xm=(r,e,t)=>{let i=null,o=null,a=null;try{a=new Im(e,t)}catch{return null}return r.forEach(u=>{a.test(u)&&(!i||o.compare(u)===1)&&(i=u,o=new Pm(i,t))}),i};Xu.exports=xm});var Ju=A((f_,Zu)=>{var bs=le(),Lm=Re(),Ku=Lr(),qm=(r,e)=>{r=new Lm(r,e);let t=new bs("0.0.0");if(r.test(t)||(t=new bs("0.0.0-0"),r.test(t)))return t;t=null;for(let i=0;i<r.set.length;++i){let o=r.set[i],a=null;o.forEach(u=>{let h=new bs(u.semver.version);switch(u.operator){case">":h.prerelease.length===0?h.patch++:h.prerelease.push(0),h.raw=h.format();case"":case">=":(!a||Ku(h,a))&&(a=h);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),a&&(!t||Ku(t,a))&&(t=a)}return t&&r.test(t)?t:null};Zu.exports=qm});var tc=A((h_,ec)=>{var Dm=Re(),Bm=(r,e)=>{try{return new Dm(r,e).range||"*"}catch{return null}};ec.exports=Bm});var Kn=A((d_,sc)=>{var Fm=le(),ic=Br(),{ANY:Nm}=ic,zm=Re(),km=Nr(),rc=Lr(),nc=Hn(),Wm=Vn(),jm=Gn(),Um=(r,e,t,i)=>{r=new Fm(r,i),e=new zm(e,i);let o,a,u,h,d;switch(t){case">":o=rc,a=Wm,u=nc,h=">",d=">=";break;case"<":o=nc,a=jm,u=rc,h="<",d="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(km(r,e,i))return!1;for(let f=0;f<e.set.length;++f){let g=e.set[f],y=null,m=null;if(g.forEach(p=>{p.semver===Nm&&(p=new ic(">=0.0.0")),y=y||p,m=m||p,o(p.semver,y.semver,i)?y=p:u(p.semver,m.semver,i)&&(m=p)}),y.operator===h||y.operator===d||(!m.operator||m.operator===h)&&a(r,m.semver))return!1;if(m.operator===d&&u(r,m.semver))return!1}return!0};sc.exports=Um});var ac=A((p_,oc)=>{var Mm=Kn(),Hm=(r,e,t)=>Mm(r,e,">",t);oc.exports=Hm});var uc=A((m_,lc)=>{var Gm=Kn(),Vm=(r,e,t)=>Gm(r,e,"<",t);lc.exports=Vm});var hc=A((g_,fc)=>{var cc=Re(),Ym=(r,e,t)=>(r=new cc(r,t),e=new cc(e,t),r.intersects(e));fc.exports=Ym});var pc=A((b_,dc)=>{var Xm=Nr(),Qm=Ee();dc.exports=(r,e,t)=>{let i=[],o=null,a=null,u=r.sort((g,y)=>Qm(g,y,t));for(let g of u)Xm(g,e,t)?(a=g,o||(o=g)):(a&&i.push([o,a]),a=null,o=null);o&&i.push([o,null]);let h=[];for(let[g,y]of i)g===y?h.push(g):!y&&g===u[0]?h.push("*"):y?g===u[0]?h.push(`<=${y}`):h.push(`${g} - ${y}`):h.push(`>=${g}`);let d=h.join(" || "),f=typeof e.raw=="string"?e.raw:String(e);return d.length<f.length?d:e}});var Sc=A((y_,yc)=>{var mc=Re(),Zn=Br(),{ANY:ys}=Zn,zr=Nr(),Ss=Ee(),Km=(r,e,t={})=>{if(r===e)return!0;r=new mc(r,t),e=new mc(e,t);let i=!1;e:for(let o of r.set){for(let a of e.set){let u=Zm(o,a,t);if(i=i||u!==null,u)continue e}if(i)return!1}return!0},Zm=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===ys){if(e.length===1&&e[0].semver===ys)return!0;t.includePrerelease?r=[new Zn(">=0.0.0-0")]:r=[new Zn(">=0.0.0")]}if(e.length===1&&e[0].semver===ys){if(t.includePrerelease)return!0;e=[new Zn(">=0.0.0")]}let i=new Set,o,a;for(let p of r)p.operator===">"||p.operator===">="?o=gc(o,p,t):p.operator==="<"||p.operator==="<="?a=bc(a,p,t):i.add(p.semver);if(i.size>1)return null;let u;if(o&&a){if(u=Ss(o.semver,a.semver,t),u>0)return null;if(u===0&&(o.operator!==">="||a.operator!=="<="))return null}for(let p of i){if(o&&!zr(p,String(o),t)||a&&!zr(p,String(a),t))return null;for(let S of e)if(!zr(p,String(S),t))return!1;return!0}let h,d,f,g,y=a&&!t.includePrerelease&&a.semver.prerelease.length?a.semver:!1,m=o&&!t.includePrerelease&&o.semver.prerelease.length?o.semver:!1;y&&y.prerelease.length===1&&a.operator==="<"&&y.prerelease[0]===0&&(y=!1);for(let p of e){if(g=g||p.operator===">"||p.operator===">=",f=f||p.operator==="<"||p.operator==="<=",o){if(m&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===m.major&&p.semver.minor===m.minor&&p.semver.patch===m.patch&&(m=!1),p.operator===">"||p.operator===">="){if(h=gc(o,p,t),h===p&&h!==o)return!1}else if(o.operator===">="&&!zr(o.semver,String(p),t))return!1}if(a){if(y&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===y.major&&p.semver.minor===y.minor&&p.semver.patch===y.patch&&(y=!1),p.operator==="<"||p.operator==="<="){if(d=bc(a,p,t),d===p&&d!==a)return!1}else if(a.operator==="<="&&!zr(a.semver,String(p),t))return!1}if(!p.operator&&(a||o)&&u!==0)return!1}return!(o&&f&&!a&&u!==0||a&&g&&!o&&u!==0||m||y)},gc=(r,e,t)=>{if(!r)return e;let i=Ss(r.semver,e.semver,t);return i>0?r:i<0||e.operator===">"&&r.operator===">="?e:r},bc=(r,e,t)=>{if(!r)return e;let i=Ss(r.semver,e.semver,t);return i<0?r:i>0||e.operator==="<"&&r.operator==="<="?e:r};yc.exports=Km});var Ec=A((S_,wc)=>{var _s=wt(),Jm=Pr(),eg=le(),_c=as(),tg=Et(),rg=jl(),ng=Ml(),ig=Vl(),sg=Jl(),og=tu(),ag=nu(),lg=su(),ug=au(),cg=Ee(),fg=uu(),hg=fu(),dg=Mn(),pg=mu(),mg=bu(),gg=Lr(),bg=Hn(),yg=Un(),Sg=ls(),_g=Gn(),wg=Vn(),Eg=us(),Rg=Tu(),vg=Br(),Tg=Re(),Ag=Nr(),Cg=Gu(),$g=Yu(),Og=Qu(),Pg=Ju(),Ig=tc(),xg=Kn(),Lg=ac(),qg=uc(),Dg=hc(),Bg=pc(),Fg=Sc();wc.exports={parse:tg,valid:rg,clean:ng,inc:ig,diff:sg,major:og,minor:ag,patch:lg,prerelease:ug,compare:cg,rcompare:fg,compareLoose:hg,compareBuild:dg,sort:pg,rsort:mg,gt:gg,lt:bg,eq:yg,neq:Sg,gte:_g,lte:wg,cmp:Eg,coerce:Rg,Comparator:vg,Range:Tg,satisfies:Ag,toComparators:Cg,maxSatisfying:$g,minSatisfying:Og,minVersion:Pg,validRange:Ig,outside:xg,gtr:Lg,ltr:qg,intersects:Dg,simplifyRange:Bg,subset:Fg,SemVer:eg,re:_s.re,src:_s.src,tokens:_s.t,SEMVER_SPEC_VERSION:Jm.SEMVER_SPEC_VERSION,compareIdentifiers:_c.compareIdentifiers,rcompareIdentifiers:_c.rcompareIdentifiers}});var Cc=A((__,Ac)=>{Ac.exports=function(r,e){e||(e={});var t=e.hsep===void 0?" ":e.hsep,i=e.align||[],o=e.stringLength||function(d){return String(d).length},a=vc(r,function(d,f){return Tc(f,function(g,y){var m=Rc(g);(!d[y]||m>d[y])&&(d[y]=m)}),d},[]),u=Jn(r,function(d){return Jn(d,function(f,g){var y=String(f);if(i[g]==="."){var m=Rc(y),p=a[g]+(/\./.test(y)?1:2)-(o(y)-m);return y+Array(p).join(" ")}else return y})}),h=vc(u,function(d,f){return Tc(f,function(g,y){var m=o(g);(!d[y]||m>d[y])&&(d[y]=m)}),d},[]);return Jn(u,function(d){return Jn(d,function(f,g){var y=h[g]-o(f)||0,m=Array(Math.max(y+1,1)).join(" ");return i[g]==="r"||i[g]==="."?m+f:i[g]==="c"?Array(Math.ceil(y/2+1)).join(" ")+f+Array(Math.floor(y/2+1)).join(" "):f+m}).join(t).replace(/\s+$/,"")}).join(`
20
+ `)};function Rc(r){var e=/\.[^.]*$/.exec(r);return e?e.index+1:r.length}function vc(r,e,t){if(r.reduce)return r.reduce(e,t);for(var i=0,o=arguments.length>=3?t:r[i++];i<r.length;i++)e(o,r[i],i);return o}function Tc(r,e){if(r.forEach)return r.forEach(e);for(var t=0;t<r.length;t++)e.call(r,r[t],t)}function Jn(r,e){if(r.map)return r.map(e);for(var t=[],i=0;i<r.length;i++)t.push(e.call(r,r[i],i));return t}});var xc=A((R_,Ic)=>{var kr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ng=typeof AbortController=="function",ei=Ng?AbortController:class{constructor(){this.signal=new $c}abort(e=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||e,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},zg=typeof AbortSignal=="function",kg=typeof ei.AbortSignal=="function",$c=zg?AbortSignal:kg?ei.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(t=>t(e),this))}onabort(){}addEventListener(e,t){e==="abort"&&this._listeners.push(t)}removeEventListener(e,t){e==="abort"&&(this._listeners=this._listeners.filter(i=>i!==t))}},vs=new Set,ws=(r,e)=>{let t=`LRU_CACHE_OPTION_${r}`;ti(t)&&Ts(t,`${r} option`,`options.${e}`,Xe)},Es=(r,e)=>{let t=`LRU_CACHE_METHOD_${r}`;if(ti(t)){let{prototype:i}=Xe,{get:o}=Object.getOwnPropertyDescriptor(i,r);Ts(t,`${r} method`,`cache.${e}()`,o)}},Wg=(r,e)=>{let t=`LRU_CACHE_PROPERTY_${r}`;if(ti(t)){let{prototype:i}=Xe,{get:o}=Object.getOwnPropertyDescriptor(i,r);Ts(t,`${r} property`,`cache.${e}`,o)}},Oc=(...r)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...r):console.error(...r)},ti=r=>!vs.has(r),Ts=(r,e,t,i)=>{vs.add(r);let o=`The ${e} is deprecated. Please use ${t} instead.`;Oc(o,"DeprecationWarning",r,i)},at=r=>r&&r===Math.floor(r)&&r>0&&isFinite(r),Pc=r=>at(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?Kt:null:null,Kt=class extends Array{constructor(e){super(e),this.fill(0)}},Rs=class{constructor(e){if(e===0)return[];let t=Pc(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Xe=class{constructor(e={}){let{max:t=0,ttl:i,ttlResolution:o=1,ttlAutopurge:a,updateAgeOnGet:u,updateAgeOnHas:h,allowStale:d,dispose:f,disposeAfter:g,noDisposeOnSet:y,noUpdateTTL:m,maxSize:p=0,maxEntrySize:S=0,sizeCalculation:R,fetchMethod:T,fetchContext:_,noDeleteOnFetchRejection:P,noDeleteOnStaleGet:I,allowStaleOnFetchRejection:v,allowStaleOnFetchAbort:x,ignoreFetchAbort:q}=e,{length:D,maxAge:W,stale:G}=e instanceof Xe?{}:e;if(t!==0&&!at(t))throw new TypeError("max option must be a nonnegative integer");let K=t?Pc(t):Array;if(!K)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=p,this.maxEntrySize=S||this.maxSize,this.sizeCalculation=R||D,this.sizeCalculation){if(!this.maxSize&&!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(this.fetchMethod=T||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=_,!this.fetchMethod&&_!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new K(t),this.prev=new K(t),this.head=0,this.tail=0,this.free=new Rs(t),this.initialFill=1,this.size=0,typeof f=="function"&&(this.dispose=f),typeof g=="function"?(this.disposeAfter=g,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!P,this.allowStaleOnFetchRejection=!!v,this.allowStaleOnFetchAbort=!!x,this.ignoreFetchAbort=!!q,this.maxEntrySize!==0){if(this.maxSize!==0&&!at(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!at(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!d||!!G,this.noDeleteOnStaleGet=!!I,this.updateAgeOnGet=!!u,this.updateAgeOnHas=!!h,this.ttlResolution=at(o)||o===0?o:1,this.ttlAutopurge=!!a,this.ttl=i||W||0,this.ttl){if(!at(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let te="LRU_CACHE_UNBOUNDED";ti(te)&&(vs.add(te),Oc("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",te,Xe))}G&&ws("stale","allowStale"),W&&ws("maxAge","ttl"),D&&ws("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Kt(this.max),this.starts=new Kt(this.max),this.setItemTTL=(i,o,a=kr.now())=>{if(this.starts[i]=o!==0?a:0,this.ttls[i]=o,o!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.isStale(i)&&this.delete(this.keyList[i])},o+1);u.unref&&u.unref()}},this.updateItemAge=i=>{this.starts[i]=this.ttls[i]!==0?kr.now():0},this.statusTTL=(i,o)=>{i&&(i.ttl=this.ttls[o],i.start=this.starts[o],i.now=e||t(),i.remainingTTL=i.now+i.ttl-i.start)};let e=0,t=()=>{let i=kr.now();if(this.ttlResolution>0){e=i;let o=setTimeout(()=>e=0,this.ttlResolution);o.unref&&o.unref()}return i};this.getRemainingTTL=i=>{let o=this.keyMap.get(i);return o===void 0?0:this.ttls[o]===0||this.starts[o]===0?1/0:this.starts[o]+this.ttls[o]-(e||t())},this.isStale=i=>this.ttls[i]!==0&&this.starts[i]!==0&&(e||t())-this.starts[i]>this.ttls[i]}updateItemAge(e){}statusTTL(e,t){}setItemTTL(e,t,i){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Kt(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,i,o)=>{if(this.isBackgroundFetch(t))return 0;if(!at(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(t,e),!at(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.addItemSize=(e,t,i)=>{if(this.sizes[e]=t,this.maxSize){let o=this.maxSize-this.sizes[e];for(;this.calculatedSize>o;)this.evict(!0)}this.calculatedSize+=this.sizes[e],i&&(i.entrySize=t,i.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,i,o){if(i||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;!(!this.isValidIndex(t)||((e||!this.isStale(t))&&(yield t),t===this.head));)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;!(!this.isValidIndex(t)||((e||!this.isStale(t))&&(yield t),t===this.tail));)t=this.next[t]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*rentries(){for(let e of this.rindexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*keys(){for(let e of this.indexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*rkeys(){for(let e of this.rindexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*values(){for(let e of this.indexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}*rvalues(){for(let e of this.rindexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,t){for(let i of this.indexes()){let o=this.valList[i],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;if(a!==void 0&&e(a,this.keyList[i],this))return this.get(this.keyList[i],t)}}forEach(e,t=this){for(let i of this.indexes()){let o=this.valList[i],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;a!==void 0&&e.call(t,a,this.keyList[i],this)}}rforEach(e,t=this){for(let i of this.rindexes()){let o=this.valList[i],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;a!==void 0&&e.call(t,a,this.keyList[i],this)}}get prune(){return Es("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){let e=[];for(let t of this.indexes({allowStale:!0})){let i=this.keyList[t],o=this.valList[t],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;if(a===void 0)continue;let u={value:a};if(this.ttls){u.ttl=this.ttls[t];let h=kr.now()-this.starts[t];u.start=Math.floor(Date.now()-h)}this.sizes&&(u.size=this.sizes[t]),e.unshift([i,u])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let o=Date.now()-i.start;i.start=kr.now()-o}this.set(t,i.value,i)}}dispose(e,t,i){}set(e,t,{ttl:i=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,status:f}={}){if(u=this.requireSize(e,t,u,h),this.maxEntrySize&&u>this.maxEntrySize)return f&&(f.set="miss",f.maxEntrySizeExceeded=!0),this.delete(e),this;let g=this.size===0?void 0:this.keyMap.get(e);if(g===void 0)g=this.newIndex(),this.keyList[g]=e,this.valList[g]=t,this.keyMap.set(e,g),this.next[this.tail]=g,this.prev[g]=this.tail,this.tail=g,this.size++,this.addItemSize(g,u,f),f&&(f.set="add"),d=!1;else{this.moveToTail(g);let y=this.valList[g];if(t!==y){if(this.isBackgroundFetch(y)?y.__abortController.abort(new Error("replaced")):a||(this.dispose(y,e,"set"),this.disposeAfter&&this.disposed.push([y,e,"set"])),this.removeItemSize(g),this.valList[g]=t,this.addItemSize(g,u,f),f){f.set="replace";let m=y&&this.isBackgroundFetch(y)?y.__staleWhileFetching:y;m!==void 0&&(f.oldValue=m)}}else f&&(f.set="update")}if(i!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),d||this.setItemTTL(g,i,o),this.statusTTL(f,g),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let e=this.valList[this.head];return this.evict(!0),e}}evict(e){let t=this.head,i=this.keyList[t],o=this.valList[t];return this.isBackgroundFetch(o)?o.__abortController.abort(new Error("evicted")):(this.dispose(o,i,"evict"),this.disposeAfter&&this.disposed.push([o,i,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(i),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas,status:i}={}){let o=this.keyMap.get(e);if(o!==void 0)if(this.isStale(o))i&&(i.has="stale",this.statusTTL(i,o));else return t&&this.updateItemAge(o),i&&(i.has="hit"),this.statusTTL(i,o),!0;else i&&(i.has="miss");return!1}peek(e,{allowStale:t=this.allowStale}={}){let i=this.keyMap.get(e);if(i!==void 0&&(t||!this.isStale(i))){let o=this.valList[i];return this.isBackgroundFetch(o)?o.__staleWhileFetching:o}}backgroundFetch(e,t,i,o){let a=t===void 0?void 0:this.valList[t];if(this.isBackgroundFetch(a))return a;let u=new ei;i.signal&&i.signal.addEventListener("abort",()=>u.abort(i.signal.reason));let h={signal:u.signal,options:i,context:o},d=(p,S=!1)=>{let{aborted:R}=u.signal,T=i.ignoreFetchAbort&&p!==void 0;return i.status&&(R&&!S?(i.status.fetchAborted=!0,i.status.fetchError=u.signal.reason,T&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),R&&!T&&!S?g(u.signal.reason):(this.valList[t]===m&&(p===void 0?m.__staleWhileFetching?this.valList[t]=m.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,p,h.options))),p)},f=p=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=p),g(p)),g=p=>{let{aborted:S}=u.signal,R=S&&i.allowStaleOnFetchAbort,T=R||i.allowStaleOnFetchRejection,_=T||i.noDeleteOnFetchRejection;if(this.valList[t]===m&&(!_||m.__staleWhileFetching===void 0?this.delete(e):R||(this.valList[t]=m.__staleWhileFetching)),T)return i.status&&m.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),m.__staleWhileFetching;if(m.__returned===m)throw p},y=(p,S)=>{this.fetchMethod(e,a,h).then(R=>p(R),S),u.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(p(),i.allowStaleOnFetchAbort&&(p=R=>d(R,!0)))})};i.status&&(i.status.fetchDispatched=!0);let m=new Promise(y).then(d,f);return m.__abortController=u,m.__staleWhileFetching=a,m.__returned=null,t===void 0?(this.set(e,m,{...h.options,status:void 0}),t=this.keyMap.get(e)):this.valList[t]=m,m}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:h=0,sizeCalculation:d=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:g=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:y=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,fetchContext:S=this.fetchContext,forceRefresh:R=!1,status:T,signal:_}={}){if(!this.fetchMethod)return T&&(T.fetch="get"),this.get(e,{allowStale:t,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:T});let P={allowStale:t,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:a,noDisposeOnSet:u,size:h,sizeCalculation:d,noUpdateTTL:f,noDeleteOnFetchRejection:g,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:p,ignoreFetchAbort:m,status:T,signal:_},I=this.keyMap.get(e);if(I===void 0){T&&(T.fetch="miss");let v=this.backgroundFetch(e,I,P,S);return v.__returned=v}else{let v=this.valList[I];if(this.isBackgroundFetch(v)){let G=t&&v.__staleWhileFetching!==void 0;return T&&(T.fetch="inflight",G&&(T.returnedStale=!0)),G?v.__staleWhileFetching:v.__returned=v}let x=this.isStale(I);if(!R&&!x)return T&&(T.fetch="hit"),this.moveToTail(I),i&&this.updateItemAge(I),this.statusTTL(T,I),v;let q=this.backgroundFetch(e,I,P,S),D=q.__staleWhileFetching!==void 0,W=D&&t;return T&&(T.fetch=D&&x?"stale":"refresh",W&&x&&(T.returnedStale=!0)),W?q.__staleWhileFetching:q.__returned=q}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:a}={}){let u=this.keyMap.get(e);if(u!==void 0){let h=this.valList[u],d=this.isBackgroundFetch(h);return this.statusTTL(a,u),this.isStale(u)?(a&&(a.get="stale"),d?(a&&(a.returnedStale=t&&h.__staleWhileFetching!==void 0),t?h.__staleWhileFetching:void 0):(o||this.delete(e),a&&(a.returnedStale=t),t?h:void 0)):(a&&(a.get="hit"),d?h.__staleWhileFetching:(this.moveToTail(u),i&&this.updateItemAge(u),h))}else a&&(a.get="miss")}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return Es("del","delete"),this.delete}delete(e){let t=!1;if(this.size!==0){let i=this.keyMap.get(e);if(i!==void 0)if(t=!0,this.size===1)this.clear();else{this.removeItemSize(i);let o=this.valList[i];this.isBackgroundFetch(o)?o.__abortController.abort(new Error("deleted")):(this.dispose(o,e,"delete"),this.disposeAfter&&this.disposed.push([o,e,"delete"])),this.keyMap.delete(e),this.keyList[i]=null,this.valList[i]=null,i===this.tail?this.tail=this.prev[i]:i===this.head?this.head=this.next[i]:(this.next[this.prev[i]]=this.next[i],this.prev[this.next[i]]=this.prev[i]),this.size--,this.free.push(i)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(let e of this.rindexes({allowStale:!0})){let t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort(new Error("deleted"));else{let i=this.keyList[e];this.dispose(t,i,"delete"),this.disposeAfter&&this.disposed.push([t,i,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return Es("reset","clear"),this.clear}get length(){return Wg("length","size"),this.size}static get AbortController(){return ei}static get AbortSignal(){return $c}};Ic.exports=Xe});var Dc=A((v_,qc)=>{"use strict";var H=(...r)=>r.every(e=>e)?r.join(""):"",J=r=>r?encodeURIComponent(r):"",Lc=r=>r.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),jg={sshtemplate:({domain:r,user:e,project:t,committish:i})=>`git@${r}:${e}/${t}.git${H("#",i)}`,sshurltemplate:({domain:r,user:e,project:t,committish:i})=>`git+ssh://git@${r}/${e}/${t}.git${H("#",i)}`,edittemplate:({domain:r,user:e,project:t,committish:i,editpath:o,path:a})=>`https://${r}/${e}/${t}${H("/",o,"/",J(i||"HEAD"),"/",a)}`,browsetemplate:({domain:r,user:e,project:t,committish:i,treepath:o})=>`https://${r}/${e}/${t}${H("/",o,"/",J(i))}`,browsetreetemplate:({domain:r,user:e,project:t,committish:i,treepath:o,path:a,fragment:u,hashformat:h})=>`https://${r}/${e}/${t}/${o}/${J(i||"HEAD")}/${a}${H("#",h(u||""))}`,browseblobtemplate:({domain:r,user:e,project:t,committish:i,blobpath:o,path:a,fragment:u,hashformat:h})=>`https://${r}/${e}/${t}/${o}/${J(i||"HEAD")}/${a}${H("#",h(u||""))}`,docstemplate:({domain:r,user:e,project:t,treepath:i,committish:o})=>`https://${r}/${e}/${t}${H("/",i,"/",J(o))}#readme`,httpstemplate:({auth:r,domain:e,user:t,project:i,committish:o})=>`git+https://${H(r,"@")}${e}/${t}/${i}.git${H("#",o)}`,filetemplate:({domain:r,user:e,project:t,committish:i,path:o})=>`https://${r}/${e}/${t}/raw/${J(i||"HEAD")}/${o}`,shortcuttemplate:({type:r,user:e,project:t,committish:i})=>`${r}:${e}/${t}${H("#",i)}`,pathtemplate:({user:r,project:e,committish:t})=>`${r}/${e}${H("#",t)}`,bugstemplate:({domain:r,user:e,project:t})=>`https://${r}/${e}/${t}/issues`,hashformat:Lc},lt={};lt.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:r,user:e,project:t,committish:i,path:o})=>`https://${H(r,"@")}raw.githubusercontent.com/${e}/${t}/${J(i||"HEAD")}/${o}`,gittemplate:({auth:r,domain:e,user:t,project:i,committish:o})=>`git://${H(r,"@")}${e}/${t}/${i}.git${H("#",o)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://codeload.${r}/${e}/${t}/tar.gz/${J(i||"HEAD")}`,extract:r=>{let[,e,t,i,o]=r.pathname.split("/",5);if(!(i&&i!=="tree")&&(i||(o=r.hash.slice(1)),t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:o}}};lt.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:r,user:e,project:t,committish:i,treepath:o,path:a,editpath:u})=>`https://${r}/${e}/${t}${H("/",o,"/",J(i||"HEAD"),"/",a,u)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}/get/${J(i||"HEAD")}.tar.gz`,extract:r=>{let[,e,t,i]=r.pathname.split("/",4);if(!["get"].includes(i)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:r.hash.slice(1)}}};lt.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:r,domain:e,user:t,project:i,committish:o})=>`git+https://${H(r,"@")}${e}/${t}/${i}.git${H("#",o)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}/repository/archive.tar.gz?ref=${J(i||"HEAD")}`,extract:r=>{let e=r.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let t=e.split("/"),i=t.pop();i.endsWith(".git")&&(i=i.slice(0,-4));let o=t.join("/");if(!(!o||!i))return{user:o,project:i,committish:r.hash.slice(1)}}};lt.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:r,project:e,committish:t})=>`git@${r}:${e}.git${H("#",t)}`,sshurltemplate:({domain:r,project:e,committish:t})=>`git+ssh://git@${r}/${e}.git${H("#",t)}`,edittemplate:({domain:r,user:e,project:t,committish:i,editpath:o})=>`https://${r}/${e}/${t}${H("/",J(i))}/${o}`,browsetemplate:({domain:r,project:e,committish:t})=>`https://${r}/${e}${H("/",J(t))}`,browsetreetemplate:({domain:r,project:e,committish:t,path:i,hashformat:o})=>`https://${r}/${e}${H("/",J(t))}${H("#",o(i))}`,browseblobtemplate:({domain:r,project:e,committish:t,path:i,hashformat:o})=>`https://${r}/${e}${H("/",J(t))}${H("#",o(i))}`,docstemplate:({domain:r,project:e,committish:t})=>`https://${r}/${e}${H("/",J(t))}`,httpstemplate:({domain:r,project:e,committish:t})=>`git+https://${r}/${e}.git${H("#",t)}`,filetemplate:({user:r,project:e,committish:t,path:i})=>`https://gist.githubusercontent.com/${r}/${e}/raw${H("/",J(t))}/${i}`,shortcuttemplate:({type:r,project:e,committish:t})=>`${r}:${e}${H("#",t)}`,pathtemplate:({project:r,committish:e})=>`${r}${H("#",e)}`,bugstemplate:({domain:r,project:e})=>`https://${r}/${e}`,gittemplate:({domain:r,project:e,committish:t})=>`git://${r}/${e}.git${H("#",t)}`,tarballtemplate:({project:r,committish:e})=>`https://codeload.github.com/gist/${r}/tar.gz/${J(e||"HEAD")}`,extract:r=>{let[,e,t,i]=r.pathname.split("/",4);if(i!=="raw"){if(!t){if(!e)return;t=e,e=null}return t.endsWith(".git")&&(t=t.slice(0,-4)),{user:e,project:t,committish:r.hash.slice(1)}}},hashformat:function(r){return r&&"file-"+Lc(r)}};lt.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:r,user:e,project:t,committish:i,path:o})=>`https://${r}/${e}/${t}/blob/${J(i)||"HEAD"}/${o}`,httpstemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}.git${H("#",i)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}/archive/${J(i)||"HEAD"}.tar.gz`,bugstemplate:({user:r,project:e})=>`https://todo.sr.ht/${r}/${e}`,extract:r=>{let[,e,t,i]=r.pathname.split("/",4);if(!["archive"].includes(i)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:r.hash.slice(1)}}};for(let[r,e]of Object.entries(lt))lt[r]=Object.assign({},jg,e);qc.exports=lt});var Cs=A((T_,Fc)=>{var Ug=ye("url"),As=(r,e,t)=>{let i=r.indexOf(t);return r.lastIndexOf(e,i>-1?i:1/0)},Bc=r=>{try{return new Ug.URL(r)}catch{}},Mg=(r,e)=>{let t=r.indexOf(":"),i=r.slice(0,t+1);if(Object.prototype.hasOwnProperty.call(e,i))return r;let o=r.indexOf("@");return o>-1?o>t?`git+ssh://${r}`:r:r.indexOf("//")===t+1?r:`${r.slice(0,t+1)}//${r.slice(t+1)}`},Hg=r=>{let e=As(r,"@","#"),t=As(r,":","#");return t>e&&(r=r.slice(0,t)+"/"+r.slice(t+1)),As(r,":","#")===-1&&r.indexOf("//")===-1&&(r=`git+ssh://${r}`),r};Fc.exports=(r,e)=>{let t=e?Mg(r,e):r;return Bc(t)||Bc(Hg(t))}});var zc=A((A_,Nc)=>{"use strict";var Gg=Cs(),Vg=r=>{let e=r.indexOf("#"),t=r.indexOf("/"),i=r.indexOf("/",t+1),o=r.indexOf(":"),a=/\s/.exec(r),u=r.indexOf("@"),h=!a||e>-1&&a.index>e,d=u===-1||e>-1&&u>e,f=o===-1||e>-1&&o>e,g=i===-1||e>-1&&i>e,y=t>0,m=e>-1?r[e-1]!=="/":!r.endsWith("/"),p=!r.startsWith(".");return h&&y&&m&&p&&d&&f&&g};Nc.exports=(r,e,{gitHosts:t,protocols:i})=>{var R,T;if(!r)return;let o=Vg(r)?`github:${r}`:r,a=Gg(o,i);if(!a)return;let u=t.byShortcut[a.protocol],h=t.byDomain[a.hostname.startsWith("www.")?a.hostname.slice(4):a.hostname],d=u||h;if(!d)return;let f=t[u||h],g=null;(R=i[a.protocol])!=null&&R.auth&&(a.username||a.password)&&(g=`${a.username}${a.password?":"+a.password:""}`);let y=null,m=null,p=null,S=null;try{if(u){let _=a.pathname.startsWith("/")?a.pathname.slice(1):a.pathname,P=_.indexOf("@");P>-1&&(_=_.slice(P+1));let I=_.lastIndexOf("/");I>-1?(m=decodeURIComponent(_.slice(0,I)),m||(m=null),p=decodeURIComponent(_.slice(I+1))):p=decodeURIComponent(_),p.endsWith(".git")&&(p=p.slice(0,-4)),a.hash&&(y=decodeURIComponent(a.hash.slice(1))),S="shortcut"}else{if(!f.protocols.includes(a.protocol))return;let _=f.extract(a);if(!_)return;m=_.user&&decodeURIComponent(_.user),p=decodeURIComponent(_.project),y=decodeURIComponent(_.committish),S=((T=i[a.protocol])==null?void 0:T.name)||a.protocol.slice(0,-1)}}catch(_){if(_ instanceof URIError)return;throw _}return[d,m,g,p,y,S,e]}});var Wc=A((C_,kc)=>{"use strict";var Yg=xc(),Xg=Dc(),Qg=zc(),Kg=Cs(),$s=new Yg({max:1e3}),ut,Wr,re,ae,Ne=class{constructor(e,t,i,o,a,u,h={}){vn(this,re);Object.assign(this,nt(Ne,ut)[e],{type:e,user:t,auth:i,project:o,committish:a,default:u,opts:h})}static addHost(e,t){nt(Ne,ut)[e]=t,nt(Ne,ut).byDomain[t.domain]=e,nt(Ne,ut).byShortcut[`${e}:`]=e,nt(Ne,Wr)[`${e}:`]={name:e}}static fromUrl(e,t){if(typeof e!="string")return;let i=e+JSON.stringify(t||{});if(!$s.has(i)){let o=Qg(e,t,{gitHosts:nt(Ne,ut),protocols:nt(Ne,Wr)});$s.set(i,o?new Ne(...o):void 0)}return $s.get(i)}static parseUrl(e){return Kg(e)}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return se(this,re,ae).call(this,this.sshtemplate,e)}sshurl(e){return se(this,re,ae).call(this,this.sshurltemplate,e)}browse(e,...t){return typeof e!="string"?se(this,re,ae).call(this,this.browsetemplate,e):typeof t[0]!="string"?se(this,re,ae).call(this,this.browsetreetemplate,{...t[0],path:e}):se(this,re,ae).call(this,this.browsetreetemplate,{...t[1],fragment:t[0],path:e})}browseFile(e,...t){return typeof t[0]!="string"?se(this,re,ae).call(this,this.browseblobtemplate,{...t[0],path:e}):se(this,re,ae).call(this,this.browseblobtemplate,{...t[1],fragment:t[0],path:e})}docs(e){return se(this,re,ae).call(this,this.docstemplate,e)}bugs(e){return se(this,re,ae).call(this,this.bugstemplate,e)}https(e){return se(this,re,ae).call(this,this.httpstemplate,e)}git(e){return se(this,re,ae).call(this,this.gittemplate,e)}shortcut(e){return se(this,re,ae).call(this,this.shortcuttemplate,e)}path(e){return se(this,re,ae).call(this,this.pathtemplate,e)}tarball(e){return se(this,re,ae).call(this,this.tarballtemplate,{...e,noCommittish:!1})}file(e,t){return se(this,re,ae).call(this,this.filetemplate,{...t,path:e})}edit(e,t){return se(this,re,ae).call(this,this.edittemplate,{...t,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}},Zt=Ne;ut=new WeakMap,Wr=new WeakMap,re=new WeakSet,ae=function(e,t){if(typeof e!="function")return null;let i={...this,...this.opts,...t};i.path||(i.path=""),i.path.startsWith("/")&&(i.path=i.path.slice(1)),i.noCommittish&&(i.committish=null);let o=e(i);return i.noGitPlus&&o.startsWith("git+")?o.slice(4):o},vn(Zt,ut,{byShortcut:{},byDomain:{}}),vn(Zt,Wr,{"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}});for(let[r,e]of Object.entries(Xg))Zt.addHost(r,e);kc.exports=Zt});function Ni({onlyFirst:r=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,r?void 0:"g")}var Ui=Ie(oa(),1);var aa=Ui.default.HttpProxyAgent,la=Ui.default.HttpsProxyAgent;var _r=class extends Map{constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=e.maxSize,this.maxAge=e.maxAge||Number.POSITIVE_INFINITY,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(e){if(typeof this.onEviction=="function")for(let[t,i]of e)this.onEviction(t,i.value)}_deleteIfExpired(e,t){return typeof t.expiry=="number"&&t.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(e,t.value),this.delete(e)):!1}_getOrDeleteIfExpired(e,t){if(this._deleteIfExpired(e,t)===!1)return t.value}_getItemValue(e,t){return t.expiry?this._getOrDeleteIfExpired(e,t):t.value}_peek(e,t){let i=t.get(e);return this._getItemValue(e,i)}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(e,t){this.oldCache.delete(e),this._set(e,t)}*_entriesAscending(){for(let e of this.oldCache){let[t,i]=e;this.cache.has(t)||this._deleteIfExpired(t,i)===!1&&(yield e)}for(let e of this.cache){let[t,i]=e;this._deleteIfExpired(t,i)===!1&&(yield e)}}get(e){if(this.cache.has(e)){let t=this.cache.get(e);return this._getItemValue(e,t)}if(this.oldCache.has(e)){let t=this.oldCache.get(e);if(this._deleteIfExpired(e,t)===!1)return this._moveToRecent(e,t),t.value}}set(e,t,{maxAge:i=this.maxAge}={}){let o=typeof i=="number"&&i!==Number.POSITIVE_INFINITY?Date.now()+i:void 0;this.cache.has(e)?this.cache.set(e,{value:t,expiry:o}):this._set(e,{value:t,expiry:o})}has(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):this.oldCache.has(e)?!this._deleteIfExpired(e,this.oldCache.get(e)):!1}peek(e){if(this.cache.has(e))return this._peek(e,this.cache);if(this.oldCache.has(e))return this._peek(e,this.oldCache)}delete(e){let t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");let t=[...this._entriesAscending()],i=t.length-e;i<0?(this.cache=new Map(t),this.oldCache=new Map,this._size=t.length):(i>0&&this._emitEvictions(t.slice(0,i)),this.oldCache=new Map(t.slice(i)),this.cache=new Map,this._size=0),this.maxSize=e}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache){let[t,i]=e;this._deleteIfExpired(t,i)===!1&&(yield[t,i.value])}for(let e of this.oldCache){let[t,i]=e;this.cache.has(t)||this._deleteIfExpired(t,i)===!1&&(yield[t,i.value])}}*entriesDescending(){let e=[...this.cache];for(let t=e.length-1;t>=0;--t){let i=e[t],[o,a]=i;this._deleteIfExpired(o,a)===!1&&(yield[o,a.value])}e=[...this.oldCache];for(let t=e.length-1;t>=0;--t){let i=e[t],[o,a]=i;this.cache.has(o)||this._deleteIfExpired(o,a)===!1&&(yield[o,a.value])}}*entriesAscending(){for(let[e,t]of this._entriesAscending())yield[e,t.value]}get size(){if(!this._size)return this.oldCache.size;let e=0;for(let t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}entries(){return this.entriesAscending()}forEach(e,t=this){for(let[i,o]of this.entriesAscending())e.call(t,o,i,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};var ha=Ie(ca(),1);import{Agent as Xh}from"node:http";import{Agent as Qh}from"node:https";var Kh={agentCacheSize:512},fa={maxSockets:64,keepAlive:!1},wr=class extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace(this,wr)}};function Mi(r,e={}){if(!("undici"in e))throw new Error("The 'undici' option is required");let t={...Kh,...e},i=new _r({maxSize:t.agentCacheSize});async function o(u,h={}){let{origin:d,protocol:f}=new URL(u),g=h!=null&&h.noProxy?null:(0,ha.getProxyForUrl)(u),y=JSON.stringify({proxyUrl:g,origin:d,...h});if(i.has(y))return i.get(y);let m;if("noProxy"in h&&delete h.noProxy,e.undici){let{ProxyAgent:p,Agent:S}=await import("undici"),R={...h};"keepAlive"in R&&!("pipelining"in R)&&(R.pipelining=R.keepAlive?1:0),"keepAlive"in R&&delete R.keepAlive,"maxSockets"in R&&(R.connections=R.maxSockets,delete R.maxSockets),g?m=new p({...R,uri:g}):m=new S(R)}else{let p=f==="https:";g?m=new(p?la:aa)({...h,proxy:g}):m=new(p?Qh:Xh)(h)}return i.set(y,m),m}let a=(u,{timeout:h=0,agentOpts:d={},...f}={})=>new Promise(async(g,y)=>{var S;if(!e.undici&&!("agent"in f)){let R=await o(u,{...fa,...d});R&&(f.agent=R)}else if(e.undici&&!("dispatcher"in f)){let R=await o(u,{...fa,...d});R&&(f.dispatcher=R)}let m,p;h&&(!("signal"in f)&&globalThis.AbortController&&(p=new AbortController,f.signal=p.signal),m=setTimeout(()=>{var T;(T=p==null?void 0:p.abort)==null||T.call(p);let R=new wr(`${f.method||"GET"} ${u} timed out after ${h}ms`);y(R)},h),(S=m==null?void 0:m.unref)==null||S.call(m)),r(u,f).then(R=>{m&&clearTimeout(m),g(R)}).catch(R=>{if(m&&clearTimeout(m),R.name==="AbortError")return g(null);y(R)})});return a.clearCache=()=>{for(let u of i.values())"destroy"in u&&u.destroy();i.clear()},a}var tf=Ie(Hi(),1);import Td from"node:http";import Ad from"node:https";import jt from"node:zlib";import Ya,{PassThrough as Xa,pipeline as Ut}from"node:stream";import{Buffer as Bn}from"node:buffer";function Jh(r){if(!/^data:/i.test(r))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');r=r.replace(/\r?\n/g,"");let e=r.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let t=r.substring(5,e).split(";"),i="",o=!1,a=t[0]||"text/plain",u=a;for(let g=1;g<t.length;g++)t[g]==="base64"?o=!0:t[g]&&(u+=`;${t[g]}`,t[g].indexOf("charset=")===0&&(i=t[g].substring(8)));!t[0]&&!i.length&&(u+=";charset=US-ASCII",i="US-ASCII");let h=o?"base64":"ascii",d=unescape(r.substring(e+1)),f=Buffer.from(d,h);return f.type=a,f.typeFull=u,f.charset=i,f}var ga=Jh;Er();An();import st,{PassThrough as qa}from"node:stream";import{types as Da,deprecate as es,promisify as gd}from"node:util";import{Buffer as we}from"node:buffer";var He=class extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,this.constructor),this.type=t}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};var pe=class extends He{constructor(e,t,i){super(e,t),i&&(this.code=this.errno=i.code,this.erroredSysCall=i.syscall)}};var Cn=Symbol.toStringTag,Qi=r=>typeof r=="object"&&typeof r.append=="function"&&typeof r.delete=="function"&&typeof r.get=="function"&&typeof r.getAll=="function"&&typeof r.has=="function"&&typeof r.set=="function"&&typeof r.sort=="function"&&r[Cn]==="URLSearchParams",vr=r=>r&&typeof r=="object"&&typeof r.arrayBuffer=="function"&&typeof r.type=="string"&&typeof r.stream=="function"&&typeof r.constructor=="function"&&/^(Blob|File)$/.test(r[Cn]),Ta=r=>typeof r=="object"&&(r[Cn]==="AbortSignal"||r[Cn]==="EventTarget"),Aa=(r,e)=>{let t=new URL(e).hostname,i=new URL(r).hostname;return t===i||t.endsWith(`.${i}`)},Ca=(r,e)=>{let t=new URL(e).protocol,i=new URL(r).protocol;return t===i};var bd=gd(st.pipeline),me=Symbol("Body internals"),Fe=class{constructor(e,{size:t=0}={}){let i=null;e===null?e=null:Qi(e)?e=we.from(e.toString()):vr(e)||we.isBuffer(e)||(Da.isAnyArrayBuffer(e)?e=we.from(e):ArrayBuffer.isView(e)?e=we.from(e.buffer,e.byteOffset,e.byteLength):e instanceof st||(e instanceof yt?(e=va(e),i=e.type.split("=")[1]):e=we.from(String(e))));let o=e;we.isBuffer(e)?o=st.Readable.from(e):vr(e)&&(o=st.Readable.from(e.stream())),this[me]={body:e,stream:o,boundary:i,disturbed:!1,error:null},this.size=t,e instanceof st&&e.on("error",a=>{let u=a instanceof He?a:new pe(`Invalid response body while trying to fetch ${this.url}: ${a.message}`,"system",a);this[me].error=u})}get body(){return this[me].stream}get bodyUsed(){return this[me].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:t,byteLength:i}=await Ji(this);return e.slice(t,t+i)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let i=new yt,o=new URLSearchParams(await this.text());for(let[a,u]of o)i.append(a,u);return i}let{toFormData:t}=await Promise.resolve().then(()=>(La(),xa));return t(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[me].body&&this[me].body.type||"",t=await this.arrayBuffer();return new Me([t],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await Ji(this);return new TextDecoder().decode(e)}buffer(){return Ji(this)}};Fe.prototype.buffer=es(Fe.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Fe.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:es(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function Ji(r){if(r[me].disturbed)throw new TypeError(`body used already for: ${r.url}`);if(r[me].disturbed=!0,r[me].error)throw r[me].error;let{body:e}=r;if(e===null)return we.alloc(0);if(!(e instanceof st))return we.alloc(0);let t=[],i=0;try{for await(let o of e){if(r.size>0&&i+o.length>r.size){let a=new pe(`content size at ${r.url} over limit: ${r.size}`,"max-size");throw e.destroy(a),a}i+=o.length,t.push(o)}}catch(o){throw o instanceof He?o:new pe(`Invalid response body while trying to fetch ${r.url}: ${o.message}`,"system",o)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return t.every(o=>typeof o=="string")?we.from(t.join("")):we.concat(t,i)}catch(o){throw new pe(`Could not create Buffer from response body for ${r.url}: ${o.message}`,"system",o)}else throw new pe(`Premature close of server response while trying to fetch ${r.url}`)}var kt=(r,e)=>{let t,i,{body:o}=r[me];if(r.bodyUsed)throw new Error("cannot clone body after it is used");return o instanceof st&&typeof o.getBoundary!="function"&&(t=new qa({highWaterMark:e}),i=new qa({highWaterMark:e}),o.pipe(t),o.pipe(i),r[me].stream=t,o=i),o},yd=es(r=>r.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),In=(r,e)=>r===null?null:typeof r=="string"?"text/plain;charset=UTF-8":Qi(r)?"application/x-www-form-urlencoded;charset=UTF-8":vr(r)?r.type||null:we.isBuffer(r)||Da.isAnyArrayBuffer(r)||ArrayBuffer.isView(r)?null:r instanceof yt?`multipart/form-data; boundary=${e[me].boundary}`:r&&typeof r.getBoundary=="function"?`multipart/form-data;boundary=${yd(r)}`:r instanceof st?null:"text/plain;charset=UTF-8",Ba=r=>{let{body:e}=r[me];return e===null?0:vr(e)?e.size:we.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},Fa=async(r,{body:e})=>{e===null?r.end():await bd(e,r)};import{types as Na}from"node:util";import Ln from"node:http";var xn=typeof Ln.validateHeaderName=="function"?Ln.validateHeaderName:r=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(r)){let e=new TypeError(`Header name must be a valid HTTP token [${r}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},ts=typeof Ln.validateHeaderValue=="function"?Ln.validateHeaderValue:(r,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let t=new TypeError(`Invalid character in header content ["${r}"]`);throw Object.defineProperty(t,"code",{value:"ERR_INVALID_CHAR"}),t}},ce=class extends URLSearchParams{constructor(e){let t=[];if(e instanceof ce){let i=e.raw();for(let[o,a]of Object.entries(i))t.push(...a.map(u=>[o,u]))}else if(e!=null)if(typeof e=="object"&&!Na.isBoxedPrimitive(e)){let i=e[Symbol.iterator];if(i==null)t.push(...Object.entries(e));else{if(typeof i!="function")throw new TypeError("Header pairs must be iterable");t=[...e].map(o=>{if(typeof o!="object"||Na.isBoxedPrimitive(o))throw new TypeError("Each header pair must be an iterable object");return[...o]}).map(o=>{if(o.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...o]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return t=t.length>0?t.map(([i,o])=>(xn(i),ts(i,String(o)),[String(i).toLowerCase(),String(o)])):void 0,super(t),new Proxy(this,{get(i,o,a){switch(o){case"append":case"set":return(u,h)=>(xn(u),ts(u,String(h)),URLSearchParams.prototype[o].call(i,String(u).toLowerCase(),String(h)));case"delete":case"has":case"getAll":return u=>(xn(u),URLSearchParams.prototype[o].call(i,String(u).toLowerCase()));case"keys":return()=>(i.sort(),new Set(URLSearchParams.prototype.keys.call(i)).keys());default:return Reflect.get(i,o,a)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let t=this.getAll(e);if(t.length===0)return null;let i=t.join(", ");return/^content-encoding$/i.test(e)&&(i=i.toLowerCase()),i}forEach(e,t=void 0){for(let i of this.keys())Reflect.apply(e,t,[this.get(i),i,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,t)=>(e[t]=this.getAll(t),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,t)=>{let i=this.getAll(t);return t==="host"?e[t]=i[0]:e[t]=i.length>1?i:i[0],e},{})}};Object.defineProperties(ce.prototype,["get","entries","forEach","values"].reduce((r,e)=>(r[e]={enumerable:!0},r),{}));function za(r=[]){return new ce(r.reduce((e,t,i,o)=>(i%2===0&&e.push(o.slice(i,i+2)),e),[]).filter(([e,t])=>{try{return xn(e),ts(e,String(t)),!0}catch{return!1}}))}var Sd=new Set([301,302,303,307,308]),qn=r=>Sd.has(r);var xe=Symbol("Response internals"),oe=class extends Fe{constructor(e=null,t={}){super(e,t);let i=t.status!=null?t.status:200,o=new ce(t.headers);if(e!==null&&!o.has("Content-Type")){let a=In(e,this);a&&o.append("Content-Type",a)}this[xe]={type:"default",url:t.url,status:i,statusText:t.statusText||"",headers:o,counter:t.counter,highWaterMark:t.highWaterMark}}get type(){return this[xe].type}get url(){return this[xe].url||""}get status(){return this[xe].status}get ok(){return this[xe].status>=200&&this[xe].status<300}get redirected(){return this[xe].counter>0}get statusText(){return this[xe].statusText}get headers(){return this[xe].headers}get highWaterMark(){return this[xe].highWaterMark}clone(){return new oe(kt(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,t=302){if(!qn(t))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new oe(null,{headers:{location:new URL(e).toString()},status:t})}static error(){let e=new oe(null,{status:0,statusText:""});return e[xe].type="error",e}static json(e=void 0,t={}){let i=JSON.stringify(e);if(i===void 0)throw new TypeError("data is not JSON serializable");let o=new ce(t&&t.headers);return o.has("content-type")||o.set("content-type","application/json"),new oe(i,{...t,headers:o})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(oe.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});import{format as Ed}from"node:url";import{deprecate as Rd}from"node:util";var ka=r=>{if(r.search)return r.search;let e=r.href.length-1,t=r.hash||(r.href[e]==="#"?"#":"");return r.href[e-t.length]==="?"?"?":""};import{isIP as _d}from"node:net";function Wa(r,e=!1){return r==null||(r=new URL(r),/^(about|blob|data):$/.test(r.protocol))?"no-referrer":(r.username="",r.password="",r.hash="",e&&(r.pathname="",r.search=""),r)}var ja=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Ua="strict-origin-when-cross-origin";function Ma(r){if(!ja.has(r))throw new TypeError(`Invalid referrerPolicy: ${r}`);return r}function wd(r){if(/^(http|ws)s:$/.test(r.protocol))return!0;let e=r.host.replace(/(^\[)|(]$)/g,""),t=_d(e);return t===4&&/^127\./.test(e)||t===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:r.host==="localhost"||r.host.endsWith(".localhost")?!1:r.protocol==="file:"}function Wt(r){return/^about:(blank|srcdoc)$/.test(r)||r.protocol==="data:"||/^(blob|filesystem):$/.test(r.protocol)?!0:wd(r)}function Ha(r,{referrerURLCallback:e,referrerOriginCallback:t}={}){if(r.referrer==="no-referrer"||r.referrerPolicy==="")return null;let i=r.referrerPolicy;if(r.referrer==="about:client")return"no-referrer";let o=r.referrer,a=Wa(o),u=Wa(o,!0);a.toString().length>4096&&(a=u),e&&(a=e(a)),t&&(u=t(u));let h=new URL(r.url);switch(i){case"no-referrer":return"no-referrer";case"origin":return u;case"unsafe-url":return a;case"strict-origin":return Wt(a)&&!Wt(h)?"no-referrer":u.toString();case"strict-origin-when-cross-origin":return a.origin===h.origin?a:Wt(a)&&!Wt(h)?"no-referrer":u;case"same-origin":return a.origin===h.origin?a:"no-referrer";case"origin-when-cross-origin":return a.origin===h.origin?a:u;case"no-referrer-when-downgrade":return Wt(a)&&!Wt(h)?"no-referrer":a;default:throw new TypeError(`Invalid referrerPolicy: ${i}`)}}function Ga(r){let e=(r.get("referrer-policy")||"").split(/[,\s]+/),t="";for(let i of e)i&&ja.has(i)&&(t=i);return t}var ne=Symbol("Request internals"),Ar=r=>typeof r=="object"&&typeof r[ne]=="object",vd=Rd(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),Ge=class extends Fe{constructor(e,t={}){let i;if(Ar(e)?i=new URL(e.url):(i=new URL(e),e={}),i.username!==""||i.password!=="")throw new TypeError(`${i} is an url with embedded credentials.`);let o=t.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(o)&&(o=o.toUpperCase()),!Ar(t)&&"data"in t&&vd(),(t.body!=null||Ar(e)&&e.body!==null)&&(o==="GET"||o==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let a=t.body?t.body:Ar(e)&&e.body!==null?kt(e):null;super(a,{size:t.size||e.size||0});let u=new ce(t.headers||e.headers||{});if(a!==null&&!u.has("Content-Type")){let f=In(a,this);f&&u.set("Content-Type",f)}let h=Ar(e)?e.signal:null;if("signal"in t&&(h=t.signal),h!=null&&!Ta(h))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let d=t.referrer==null?e.referrer:t.referrer;if(d==="")d="no-referrer";else if(d){let f=new URL(d);d=/^about:(\/\/)?client$/.test(f)?"client":f}else d=void 0;this[ne]={method:o,redirect:t.redirect||e.redirect||"follow",headers:u,parsedURL:i,signal:h,referrer:d},this.follow=t.follow===void 0?e.follow===void 0?20:e.follow:t.follow,this.compress=t.compress===void 0?e.compress===void 0?!0:e.compress:t.compress,this.counter=t.counter||e.counter||0,this.agent=t.agent||e.agent,this.highWaterMark=t.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=t.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=t.referrerPolicy||e.referrerPolicy||""}get method(){return this[ne].method}get url(){return Ed(this[ne].parsedURL)}get headers(){return this[ne].headers}get redirect(){return this[ne].redirect}get signal(){return this[ne].signal}get referrer(){if(this[ne].referrer==="no-referrer")return"";if(this[ne].referrer==="client")return"about:client";if(this[ne].referrer)return this[ne].referrer.toString()}get referrerPolicy(){return this[ne].referrerPolicy}set referrerPolicy(e){this[ne].referrerPolicy=Ma(e)}clone(){return new Ge(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(Ge.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});var Va=r=>{let{parsedURL:e}=r[ne],t=new ce(r[ne].headers);t.has("Accept")||t.set("Accept","*/*");let i=null;if(r.body===null&&/^(post|put)$/i.test(r.method)&&(i="0"),r.body!==null){let h=Ba(r);typeof h=="number"&&!Number.isNaN(h)&&(i=String(h))}i&&t.set("Content-Length",i),r.referrerPolicy===""&&(r.referrerPolicy=Ua),r.referrer&&r.referrer!=="no-referrer"?r[ne].referrer=Ha(r):r[ne].referrer="no-referrer",r[ne].referrer instanceof URL&&t.set("Referer",r.referrer),t.has("User-Agent")||t.set("User-Agent","node-fetch"),r.compress&&!t.has("Accept-Encoding")&&t.set("Accept-Encoding","gzip, deflate, br");let{agent:o}=r;typeof o=="function"&&(o=o(e)),!t.has("Connection")&&!o&&t.set("Connection","close");let a=ka(e),u={path:e.pathname+a,method:r.method,headers:t[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:r.insecureHTTPParser,agent:o};return{parsedURL:e,options:u}};var Dn=class extends He{constructor(e,t="aborted"){super(e,t)}};An();Ki();var Cd=new Set(["data:","http:","https:"]);async function Fn(r,e){return new Promise((t,i)=>{let o=new Ge(r,e),{parsedURL:a,options:u}=Va(o);if(!Cd.has(a.protocol))throw new TypeError(`node-fetch cannot load ${r}. URL scheme "${a.protocol.replace(/:$/,"")}" is not supported.`);if(a.protocol==="data:"){let S=ga(o.url),R=new oe(S,{headers:{"Content-Type":S.typeFull}});t(R);return}let h=(a.protocol==="https:"?Ad:Td).request,{signal:d}=o,f=null,g=()=>{let S=new Dn("The operation was aborted.");i(S),o.body&&o.body instanceof Ya.Readable&&o.body.destroy(S),!(!f||!f.body)&&f.body.emit("error",S)};if(d&&d.aborted){g();return}let y=()=>{g(),p()},m=h(a.toString(),u);d&&d.addEventListener("abort",y);let p=()=>{m.abort(),d&&d.removeEventListener("abort",y)};m.on("error",S=>{i(new pe(`request to ${o.url} failed, reason: ${S.message}`,"system",S)),p()}),$d(m,S=>{f&&f.body&&f.body.destroy(S)}),process.version<"v14"&&m.on("socket",S=>{let R;S.prependListener("end",()=>{R=S._eventsCount}),S.prependListener("close",T=>{if(f&&R<S._eventsCount&&!T){let _=new Error("Premature close");_.code="ERR_STREAM_PREMATURE_CLOSE",f.body.emit("error",_)}})}),m.on("response",S=>{m.setTimeout(0);let R=za(S.rawHeaders);if(qn(S.statusCode)){let v=R.get("Location"),x=null;try{x=v===null?null:new URL(v,o.url)}catch{if(o.redirect!=="manual"){i(new pe(`uri requested responds with an invalid redirect URL: ${v}`,"invalid-redirect")),p();return}}switch(o.redirect){case"error":i(new pe(`uri requested responds with a redirect, redirect mode is set to error: ${o.url}`,"no-redirect")),p();return;case"manual":break;case"follow":{if(x===null)break;if(o.counter>=o.follow){i(new pe(`maximum redirect reached at: ${o.url}`,"max-redirect")),p();return}let q={headers:new ce(o.headers),follow:o.follow,counter:o.counter+1,agent:o.agent,compress:o.compress,method:o.method,body:kt(o),signal:o.signal,size:o.size,referrer:o.referrer,referrerPolicy:o.referrerPolicy};if(!Aa(o.url,x)||!Ca(o.url,x))for(let W of["authorization","www-authenticate","cookie","cookie2"])q.headers.delete(W);if(S.statusCode!==303&&o.body&&e.body instanceof Ya.Readable){i(new pe("Cannot follow redirect with body being a readable stream","unsupported-redirect")),p();return}(S.statusCode===303||(S.statusCode===301||S.statusCode===302)&&o.method==="POST")&&(q.method="GET",q.body=void 0,q.headers.delete("content-length"));let D=Ga(R);D&&(q.referrerPolicy=D),t(Fn(new Ge(x,q))),p();return}default:return i(new TypeError(`Redirect option '${o.redirect}' is not a valid value of RequestRedirect`))}}d&&S.once("end",()=>{d.removeEventListener("abort",y)});let T=Ut(S,new Xa,v=>{v&&i(v)});process.version<"v12.10"&&S.on("aborted",y);let _={url:o.url,status:S.statusCode,statusText:S.statusMessage,headers:R,size:o.size,counter:o.counter,highWaterMark:o.highWaterMark},P=R.get("Content-Encoding");if(!o.compress||o.method==="HEAD"||P===null||S.statusCode===204||S.statusCode===304){f=new oe(T,_),t(f);return}let I={flush:jt.Z_SYNC_FLUSH,finishFlush:jt.Z_SYNC_FLUSH};if(P==="gzip"||P==="x-gzip"){T=Ut(T,jt.createGunzip(I),v=>{v&&i(v)}),f=new oe(T,_),t(f);return}if(P==="deflate"||P==="x-deflate"){let v=Ut(S,new Xa,x=>{x&&i(x)});v.once("data",x=>{(x[0]&15)===8?T=Ut(T,jt.createInflate(),q=>{q&&i(q)}):T=Ut(T,jt.createInflateRaw(),q=>{q&&i(q)}),f=new oe(T,_),t(f)}),v.once("end",()=>{f||(f=new oe(T,_),t(f))});return}if(P==="br"){T=Ut(T,jt.createBrotliDecompress(),v=>{v&&i(v)}),f=new oe(T,_),t(f);return}f=new oe(T,_),t(f)}),Fa(m,o).catch(i)})}function $d(r,e){let t=Bn.from(`0\r
21
21
  \r
22
- `),i=!1,o=!1,a;r.on("response",u=>{let{headers:h}=u;i=h["transfer-encoding"]==="chunked"&&!h["content-length"]}),r.on("socket",u=>{let h=()=>{if(i&&!o){let f=new Error("Premature close");f.code="ERR_STREAM_PREMATURE_CLOSE",e(f)}},d=f=>{o=Dn.compare(f.slice(-5),t)===0,!o&&a&&(o=Dn.compare(a.slice(-3),t.slice(0,3))===0&&Dn.compare(f.slice(-2),t.slice(3))===0),a=f};u.prependListener("close",h),u.on("data",d),r.on("close",()=>{u.removeListener("close",h),u.removeListener("data",d)})})}var Gc=Ce(yl(),1),Vc=Ce(Nn(),1),Yc=Ce(_l(),1),J=Ce(bc(),1),Xc=Ce(Ec(),1),Qc=Ce(Bc(),1);import{cwd as Mg,stdout as Hg,argv as Gg,env as Wr,exit as jr,versions as Vg}from"node:process";import{join as ti,dirname as qs}from"node:path";import{lstatSync as Yg,readFileSync as Fc,truncateSync as Xg,writeFileSync as Qg,accessSync as Kg}from"node:fs";import{platform as Zg}from"node:os";import{rootCertificates as Nc}from"node:tls";var jg=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],Ug={"1 day ago":"yesterday","1 week ago":"last week","1 month ago":"last month","1 year ago":"last year","in 1 day":"tomorrow","in 1 week":"next week","in 1 month":"next month","in 1 year":"next year"};function Cs(r,{noAffix:e=!1,times:t=jg,nowThreshold:i=1e4,nowString:o="now",aliases:a=!1,aliasesMap:u=Ug}={}){let h=Date.now();if(r=typeof r=="number"?r:Date.parse(r),Number.isNaN(r))return"unknown";let d=!1,f=h-r;if(f<0&&(d=!0,f=Math.abs(f)),f<i)return o;let m,y;for(let p=0,_=t.length;p<_;p++){let R=t[p];if(!(f>=R[1])){m=Math.floor(f/R[0]),y=R[2]+(m>1?"s":"");break}}let g=`${d&&!e?"in ":""}${m} ${y}${!d&&!e?" ago":""}`;return a?u[g]??g:g}var{fromUrl:Jg}=Qc.default,Ur,Mc;globalThis.fetch&&!((Mc=Vg)!=null&&Mc.node)?Ur=globalThis.fetch:Ur=Ui(Bn,{undici:!1});var Kc=96,at="\0",eb=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,tb=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Ds=/^[0-9a-f]{7,}$/i,zc=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,kc=r=>r.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),rb=ii(Jg),Os=ii(Gc.default),nb=ii(Yc.default),Bs=ii(r=>r.endsWith("/")?r.substring(0,r.length-1):r),ib=new Set(["patch"]),sb=new Set(["patch","minor"]),ob=new Set(["patch","minor","major"]),De={},B=(0,Hc.default)(Gg.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","G","githubapi","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",G:"githubapi",h:"help",i:"include",j:"json",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}}),ri,ni,tr;B.color===!1||Wr.TERM==="dumb"?ri=ni=tr=r=>r:(ri=r=>`\x1B[35m${r}\x1B[0m`,ni=r=>`\x1B[31m${r}\x1B[0m`,tr=r=>`\x1B[32m${r}\x1B[0m`);var Kt=rr(B.greatest),Ps=rr(B.prerelease),Is=rr(B.release),Zt=rr(B.patch),Jt=rr(B.minor),er=rr(B["allow-downgrade"]),Be=(0,Vc.default)("npm",{registry:"https://registry.npmjs.org"}),Ls={npmrc:Be,recursive:!0},ab=Bs(B.registry||Be.registry),Wc=B.githubapi?Bs(B.githubapi):"https://api.github.com",Zc=typeof B.sockets=="number"?parseInt(B.sockets):Kc,jc=r=>Array.from(r.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g)).map(e=>e[0]);function ii(r){let e=Object.create(null);return(t,i)=>t in e?e[t]:e[t]=r(t,i)}function Jc(r,e,t){let i=ti(e,r);try{return Kg(i),i}catch{}let o=qs(e);return t&&i===t||o===e?null:Jc(r,o,t)}function lb(r,e){if(r.startsWith("@")){let t=(/@[a-z0-9][\w-.]+/.exec(r)||[])[0],i=Bs(nb(t,Be));if(i!==e)try{let o=Os(i,Ls);if(o!=null&&o.token)return[o,i]}catch{}return[Os(e,Ls),e]}else return[Os(e,Ls),e]}async function ub(r,e,t,i){let[o,a]=lb(r,t),u={maxSockets:Zc};Object.keys(i).length&&(u.agentOpts=i),o!=null&&o.token&&(u.headers={Authorization:`${o.type} ${o.token}`});let d=(e==="resolutions"?Sb(r):r).replace(/\//g,"%2f"),f=`${a}/${d}`;B.verbose&&console.error(`${ri("fetch")} ${f}`);let m=await Ur(f,u);if(m!=null&&m.ok)return B.verbose&&console.error(`${tr("done")} ${f}`),[await m.json(),e,a,r];throw m!=null&&m.status&&(m!=null&&m.statusText)?new Error(`Received ${m.status} ${m.statusText} for ${r} from ${a}`):new Error(`Unable to fetch ${r} from ${a}`)}function cb({repository:r,homepage:e},t,i){let o;if(t==="https://npm.pkg.github.com")return`https://github.com/${i.replace(/^@/,"")}`;if(r){let u=typeof r=="string"?r:r.url,h=rb(u);h!=null&&h.browse&&(o=h.browse()),o&&r.directory&&h.treepath&&(o=`${o}/${h.treepath}/HEAD/${r.directory}`),!o&&(r!=null&&r.url)&&/^https?:/.test(r.url)&&(o=r.url)}let a=o||e||"";if(a){let u=new URL(a);u.protocol==="http:"&&u.hostname==="github.com"&&(u.protocol="https:",a=String(u))}return a}function Re(r,e={}){let t={},i=r instanceof Error;typeof r=="string"?t.message=r:i&&(t.error=r.stack||r.message);for(let o of Object.values(e))"oldPrint"in o&&(o.old=o.oldPrint,delete o.oldPrint),"newPrint"in o&&(o.new=o.newPrint,delete o.newPrint),"oldOriginal"in o&&(o.old=o.oldOriginal,delete o.oldOriginal);if(B.json){if(!i){t.results={};for(let[o,a]of Object.entries(e)){let[u,h]=o.split(at);t.results[u]||(t.results[u]={}),t.results[u][h]=a}}console.info(JSON.stringify(t))}else Object.keys(e).length&&!i&&console.info(hb(e)),(t.message||t.error)&&(t.message?console.info(t.message):t.error&&console.info(ni(t.error)));B["error-on-outdated"]?jr(Object.keys(e).length?2:0):B["error-on-unchanged"]?jr(Object.keys(e).length?0:2):jr(t.error?1:0)}function fb(r,e){let t=Zg()==="win32";t&&Xg(r,0),Qg(r,e,t?{flag:"r+"}:void 0)}function Uc(r,e,t){let i=r.split(/\./),o=e.split(/\./),a=t?tr:ni,u=/^[0-9a-zA-Z-.]+$/,h="";for(let d=0;d<i.length;d++)if(i[d]!==o[d]){u.test(i[d])?h+=a(i.slice(d).join(".")):h+=i[d].split("").map(f=>u.test(f)?a(f):f).join("")+a(`.${i.slice(d+1).join(".")}`);break}else h+=`${i[d]}.`;return h}function hb(r){let e=[["NAME","OLD","NEW","AGE","INFO"]];for(let[t,i]of Object.entries(r))e.push([t.split(at)[1],Uc(i.old,i.new,!1),Uc(i.new,i.old,!0),i.age||"",i.info]);return(0,Xc.default)(e,{hsep:" ",stringLength:t=>t.replace(Fi(),"").length})}function db(r,e){let t=r;for(let i of Object.keys(e)){let o=i.split(at)[1],a=e[i].oldOriginal||e[i].old,u=new RegExp(`"${kc(o)}": +"${kc(a)}"`,"g");t=t.replace(u,`"${o}": "${e[i].new}"`)}return t}function pb(r,e){return r.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function xs(r){let e=J.default.parse(r);return e?!!e.prerelease.length:!1}function ef(r){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(r)}function mb(r){try{return J.default.coerce(r).version}catch{return null}}function gb(r,e,{range:t,semvers:i,usePre:o,useRel:a,useGreatest:u}={}){let h=mb(t),d=0;i=new Set(i),o=ef(t)||o,o&&(i.add("prerelease"),i.has("patch")&&i.add("prepatch"),i.has("minor")&&i.add("preminor"),i.has("major")&&i.add("premajor"));for(let f of e){let m=J.default.parse(f);if(m.prerelease.length&&(!o||a))continue;let y=J.default.diff(h,m.version);if(!(!y||!i.has(y)))if(u||!("time"in r))J.default.gte(J.default.coerce(m.version).version,h)&&(h=m.version);else{let g=new Date(r.time[f]).getTime();g>=0&&g>d&&(h=m.version,d=g)}}return h||null}function bb(r,e){var o;if(e.range==="*"||e.range.includes("||"))return null;let t=Object.keys(r.versions).filter(a=>J.default.valid(a)),i=gb(r,t,e);if(e.useGreatest)return i;{let a=r["dist-tags"].latest,u=J.default.coerce(e.range).version,h=ef(e.range),d=xs(i),f=xs(a),m=J.default.gt(i,u);if(!e.useRel&&e.usePre||h&&d||e.useRel&&!m&&h&&!d||h&&!d&&m)return i;if(h&&!d&&!m)return null;let y=J.default.diff(u,a);return y&&y!=="prerelease"&&!e.semvers.has(y.replace(/^pre/,""))||e.useRel&&xs(a)?i:J.default.lt(a,u)&&!f?er===!0||(o=er==null?void 0:er.has)!=null&&o.call(er,r.name)?a:null:a}}async function yb([r,e],{useGreatest:t}={}){var d,f;let i=e.old.replace(eb,""),[o,a,u,h]=tb.exec(i)||[];if(!(!a||!u||!h))if(Ds.test(h)){let m={maxSockets:Zc},y=Wr.UPDATES_GITHUB_API_TOKEN||Wr.GITHUB_API_TOKEN||Wr.GH_TOKEN||Wr.HOMEBREW_GITHUB_API_TOKEN;y&&(m.headers={Authorization:`Bearer ${y}`});let g=`${Wc}/repos/${a}/${u}/commits`;B.verbose&&console.error(`${ri("fetch")} ${g}`);let p=await Ur(g,m);if(B.verbose&&(p!=null&&p.ok)&&console.error(`${tr("done")} ${g}`),!p||!p.ok)return;let _=await p.json(),{sha:R,commit:S}=_[0];if(!R||!R.length)return;let v=((d=S==null?void 0:S.committer)==null?void 0:d.date)??((f=S==null?void 0:S.author)==null?void 0:f.date);if(R=R.substring(0,h.length),h!==R){let P=e.old.replace(h,R);return{key:r,newRange:P,user:a,repo:u,oldRef:h,newRef:R,newDate:v}}}else{let m=await Ur(`${Wc}/repos/${a}/${u}/git/refs/tags`);if(!m||!m.ok)return;let g=(await m.json()).map(_=>_.ref.replace(/^refs\/tags\//,"")),p=h.replace(/^v/,"");if(!J.default.valid(p))return;if(t){let _=h,R=h.replace(/^v/,"");for(let S of g){let v=S.replace(/^v/,"");J.default.valid(v)&&(!_||J.default.gt(v,R))&&(_=S,R=v)}if(J.default.neq(p,R))return{key:r,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}else{let _=g[g.length-1],R=_.replace(/^v/,"");if(!J.default.valid(R))return;if(J.default.neq(p,R))return{key:r,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}}}function Sb(r){let e=r.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function _b(r){let e=r.match(zc);return(e==null?void 0:e.length)!==1?r:r.replace(zc,J.default.coerce(e[0]))}function rr(r){return r===void 0?!1:r===""?!0:typeof r=="string"?r.includes(",")?new Set(r.split(",")):new Set([r]):Array.isArray(r)?new Set(r):!1}async function wb(){var y,g,p,_,R;for(let S of[process.stdout,process.stderr])(g=(y=S==null?void 0:S._handle)==null?void 0:y.setBlocking)==null||g.call(y,!0);B.help&&(Hg.write(`usage: updates [options]
22
+ `),i=!1,o=!1,a;r.on("response",u=>{let{headers:h}=u;i=h["transfer-encoding"]==="chunked"&&!h["content-length"]}),r.on("socket",u=>{let h=()=>{if(i&&!o){let f=new Error("Premature close");f.code="ERR_STREAM_PREMATURE_CLOSE",e(f)}},d=f=>{o=Bn.compare(f.slice(-5),t)===0,!o&&a&&(o=Bn.compare(a.slice(-3),t.slice(0,3))===0&&Bn.compare(f.slice(-2),t.slice(3))===0),a=f};u.prependListener("close",h),u.on("data",d),r.on("close",()=>{u.removeListener("close",h),u.removeListener("data",d)})})}var rf=Ie(Rl(),1),nf=Ie(zn(),1),sf=Ie(Tl(),1),ee=Ie(Ec(),1),of=Ie(Cc(),1),af=Ie(Wc(),1);import{cwd as sb,stdout as ob,argv as ab,env as ni,exit as Ur,versions as lb}from"node:process";import{join as ii,dirname as zs}from"node:path";import{lstatSync as ub,readFileSync as Vc,truncateSync as cb,writeFileSync as fb,accessSync as hb}from"node:fs";import{platform as db}from"node:os";import{rootCertificates as Yc}from"node:tls";var Zg=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],Jg={"1 day ago":"yesterday","1 week ago":"last week","1 month ago":"last month","1 year ago":"last year","in 1 day":"tomorrow","in 1 week":"next week","in 1 month":"next month","in 1 year":"next year"};function Os(r,{noAffix:e=!1,times:t=Zg,nowThreshold:i=1e4,nowString:o="now",aliases:a=!1,aliasesMap:u=Jg}={}){let h=Date.now();if(r=typeof r=="number"?r:Date.parse(r),Number.isNaN(r))return"unknown";let d=!1,f=h-r;if(f<0&&(d=!0,f=Math.abs(f)),f<i)return o;let g,y;for(let p=0,S=t.length;p<S;p++){let R=t[p];if(!(f>=R[1])){g=Math.floor(f/R[0]),y=R[2]+(g>1?"s":"");break}}let m=`${d&&!e?"in ":""}${g} ${y}${!d&&!e?" ago":""}`;return a?u[m]??m:m}import Ps from"node:process";import eb from"node:os";import jc from"node:tty";function ve(r,e=globalThis.Deno?globalThis.Deno.args:Ps.argv){let t=r.startsWith("-")?"":r.length===1?"-":"--",i=e.indexOf(t+r),o=e.indexOf("--");return i!==-1&&(o===-1||i<o)}var{env:Q}=Ps,ri;ve("no-color")||ve("no-colors")||ve("color=false")||ve("color=never")?ri=0:(ve("color")||ve("colors")||ve("color=true")||ve("color=always"))&&(ri=1);function tb(){if("FORCE_COLOR"in Q)return Q.FORCE_COLOR==="true"?1:Q.FORCE_COLOR==="false"?0:Q.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Q.FORCE_COLOR,10),3)}function rb(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function nb(r,{streamIsTTY:e,sniffFlags:t=!0}={}){let i=tb();i!==void 0&&(ri=i);let o=t?ri:i;if(o===0)return 0;if(t){if(ve("color=16m")||ve("color=full")||ve("color=truecolor"))return 3;if(ve("color=256"))return 2}if("TF_BUILD"in Q&&"AGENT_NAME"in Q)return 1;if(r&&!e&&o===void 0)return 0;let a=o||0;if(Q.TERM==="dumb")return a;if(Ps.platform==="win32"){let u=eb.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in Q)return"GITHUB_ACTIONS"in Q?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(u=>u in Q)||Q.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in Q)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Q.TEAMCITY_VERSION)?1:0;if(Q.COLORTERM==="truecolor"||Q.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Q){let u=Number.parseInt((Q.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Q.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Q.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Q.TERM)||"COLORTERM"in Q?1:a}function Uc(r,e={}){let t=nb(r,{streamIsTTY:r&&r.isTTY,...e});return rb(t)}var ib={stdout:Uc({isTTY:jc.isatty(1)}),stderr:Uc({isTTY:jc.isatty(2)})},Mc=ib;var Hc=!0;function Gc(){Hc=!1}function Is(r,e,t){return Hc?`\x1B[${e}m${r}\x1B[${t}m`:r}var xs=r=>Is(r,31,39),jr=r=>Is(r,32,39);var Ls=r=>Is(r,35,39);var{fromUrl:pb}=af.default,Mr,ef;globalThis.fetch&&!((ef=lb)!=null&&ef.node)?Mr=globalThis.fetch:Mr=Mi(Fn,{undici:!1});var lf=96,ct="\0",mb=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,gb=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,ks=/^[0-9a-f]{7,}$/i,Xc=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Qc=r=>r.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),bb=si(pb),qs=si(rf.default),yb=si(sf.default),Ws=si(r=>r.endsWith("/")?r.substring(0,r.length-1):r),Sb=new Set(["patch"]),_b=new Set(["patch","minor"]),wb=new Set(["patch","minor","major"]),Te={},B=(0,tf.default)(ab.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","G","githubapi","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",G:"githubapi",h:"help",i:"include",j:"json",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}});(B["no-color"]||!Mc.stdout)&&Gc();var Jt=nr(B.greatest),Ds=nr(B.prerelease),Bs=nr(B.release),er=nr(B.patch),tr=nr(B.minor),rr=nr(B["allow-downgrade"]),ze=(0,nf.default)("npm",{registry:"https://registry.npmjs.org"}),Fs={npmrc:ze,recursive:!0},Kc=B.githubapi?Ws(B.githubapi):"https://api.github.com",uf=typeof B.sockets=="number"?parseInt(B.sockets):lf,Zc=r=>Array.from(r.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0]);function si(r){let e=Object.create(null);return(t,i)=>t in e?e[t]:e[t]=r(t,i)}function cf(r,e,t){let i=ii(e,r);try{return hb(i),i}catch{}let o=zs(e);return t&&i===t||o===e?null:cf(r,o,t)}function Eb(r,e){if(r.startsWith("@")){let t=(/@[a-z0-9][\w-.]+/.exec(r)||[])[0],i=Ws(yb(t,ze));if(i!==e)try{let o=qs(i,Fs);if(o!=null&&o.token)return[o,i]}catch{}return[qs(e,Fs),e]}else return[qs(e,Fs),e]}async function Rb(r,e,t,i){let[o,a]=Eb(r,t),u={maxSockets:uf};Object.keys(i).length&&(u.agentOpts=i),o!=null&&o.token&&(u.headers={Authorization:`${o.type} ${o.token}`});let d=(e==="resolutions"?Lb(r):r).replace(/\//g,"%2f"),f=`${a}/${d}`;B.verbose&&console.error(`${Ls("fetch")} ${f}`);let g=await Mr(f,u);if(g!=null&&g.ok)return B.verbose&&console.error(`${jr("done")} ${f}`),[await g.json(),e,a,r];throw g!=null&&g.status&&(g!=null&&g.statusText)?new Error(`Received ${g.status} ${g.statusText} for ${r} from ${a}`):new Error(`Unable to fetch ${r} from ${a}`)}function vb({repository:r,homepage:e},t,i){let o;if(t==="https://npm.pkg.github.com")return`https://github.com/${i.replace(/^@/,"")}`;if(r){let u=typeof r=="string"?r:r.url,h=bb(u);h!=null&&h.browse&&(o=h.browse()),o&&r.directory&&h.treepath&&(o=`${o}/${h.treepath}/HEAD/${r.directory}`),!o&&(r!=null&&r.url)&&/^https?:/.test(r.url)&&(o=r.url)}let a=o||e||"";if(a){let u=new URL(a);u.protocol==="http:"&&u.hostname==="github.com"&&(u.protocol="https:",a=String(u))}return a}function Ae(r,e={}){let t={},i=r instanceof Error;typeof r=="string"?t.message=r:i&&(t.error=r.stack||r.message);for(let o of Object.values(e))"oldPrint"in o&&(o.old=o.oldPrint,delete o.oldPrint),"newPrint"in o&&(o.new=o.newPrint,delete o.newPrint),"oldOriginal"in o&&(o.old=o.oldOriginal,delete o.oldOriginal);if(B.json){if(!i){t.results={};for(let[o,a]of Object.entries(e)){let[u,h]=o.split(ct);t.results[u]||(t.results[u]={}),t.results[u][h]=a}}console.info(JSON.stringify(t))}else Object.keys(e).length&&!i&&console.info(Ab(e)),(t.message||t.error)&&(t.message?console.info(t.message):t.error&&console.info(xs(t.error)));B["error-on-outdated"]?Ur(Object.keys(e).length?2:0):B["error-on-unchanged"]?Ur(Object.keys(e).length?0:2):Ur(t.error?1:0)}function Tb(r,e){let t=db()==="win32";t&&cb(r,0),fb(r,e,t?{flag:"r+"}:void 0)}function Jc(r,e,t){let i=r.split(/\./),o=e.split(/\./),a=t?jr:xs,u=/^[0-9a-zA-Z-.]+$/,h="";for(let d=0;d<i.length;d++)if(i[d]!==o[d]){u.test(i[d])?h+=a(i.slice(d).join(".")):h+=i[d].split("").map(f=>u.test(f)?a(f):f).join("")+a(`.${i.slice(d+1).join(".")}`);break}else h+=`${i[d]}.`;return h}function Ab(r){let e=[["NAME","OLD","NEW","AGE","INFO"]];for(let[t,i]of Object.entries(r))e.push([t.split(ct)[1],Jc(i.old,i.new,!1),Jc(i.new,i.old,!0),i.age||"",i.info]);return(0,of.default)(e,{hsep:" ",stringLength:t=>t.replace(Ni(),"").length})}function Cb(r,e){let t=r;for(let i of Object.keys(e)){let o=i.split(ct)[1],a=e[i].oldOriginal||e[i].old,u=new RegExp(`"${Qc(o)}": +"${Qc(a)}"`,"g");t=t.replace(u,`"${o}": "${e[i].new}"`)}return t}function $b(r,e){return r.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Ns(r){let e=ee.default.parse(r);return e?!!e.prerelease.length:!1}function ff(r){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(r)}function Ob(r){try{return ee.default.coerce(r).version}catch{return null}}function Pb(r,e,{range:t,semvers:i,usePre:o,useRel:a,useGreatest:u}={}){let h=Ob(t),d=0;i=new Set(i),o=ff(t)||o,o&&(i.add("prerelease"),i.has("patch")&&i.add("prepatch"),i.has("minor")&&i.add("preminor"),i.has("major")&&i.add("premajor"));for(let f of e){let g=ee.default.parse(f);if(g.prerelease.length&&(!o||a))continue;let y=ee.default.diff(h,g.version);if(!(!y||!i.has(y)))if(u||!("time"in r))ee.default.gte(ee.default.coerce(g.version).version,h)&&(h=g.version);else{let m=new Date(r.time[f]).getTime();m>=0&&m>d&&(h=g.version,d=m)}}return h||null}function Ib(r,e){var o;if(e.range==="*"||e.range.includes("||"))return null;let t=Object.keys(r.versions).filter(a=>ee.default.valid(a)),i=Pb(r,t,e);if(e.useGreatest)return i;{let a=r["dist-tags"].latest,u=ee.default.coerce(e.range).version,h=ff(e.range),d=Ns(i),f=Ns(a),g=ee.default.gt(i,u);if(!e.useRel&&e.usePre||h&&d||e.useRel&&!g&&h&&!d||h&&!d&&g)return i;if(h&&!d&&!g)return null;let y=ee.default.diff(u,a);return y&&y!=="prerelease"&&!e.semvers.has(y.replace(/^pre/,""))||e.useRel&&Ns(a)?i:ee.default.lt(a,u)&&!f?rr===!0||(o=rr==null?void 0:rr.has)!=null&&o.call(rr,r.name)?a:null:a}}async function xb([r,e],{useGreatest:t}={}){var d,f;let i=e.old.replace(mb,""),[o,a,u,h]=gb.exec(i)||[];if(!(!a||!u||!h))if(ks.test(h)){let g={maxSockets:uf},y=ni.UPDATES_GITHUB_API_TOKEN||ni.GITHUB_API_TOKEN||ni.GH_TOKEN||ni.HOMEBREW_GITHUB_API_TOKEN;y&&(g.headers={Authorization:`Bearer ${y}`});let m=`${Kc}/repos/${a}/${u}/commits`;B.verbose&&console.error(`${Ls("fetch")} ${m}`);let p=await Mr(m,g);if(B.verbose&&(p!=null&&p.ok)&&console.error(`${jr("done")} ${m}`),!p||!p.ok)return;let S=await p.json(),{sha:R,commit:T}=S[0];if(!R||!R.length)return;let _=((d=T==null?void 0:T.committer)==null?void 0:d.date)??((f=T==null?void 0:T.author)==null?void 0:f.date);if(R=R.substring(0,h.length),h!==R){let P=e.old.replace(h,R);return{key:r,newRange:P,user:a,repo:u,oldRef:h,newRef:R,newDate:_}}}else{let g=await Mr(`${Kc}/repos/${a}/${u}/git/refs/tags`);if(!g||!g.ok)return;let m=(await g.json()).map(S=>S.ref.replace(/^refs\/tags\//,"")),p=h.replace(/^v/,"");if(!ee.default.valid(p))return;if(t){let S=h,R=h.replace(/^v/,"");for(let T of m){let _=T.replace(/^v/,"");ee.default.valid(_)&&(!S||ee.default.gt(_,R))&&(S=T,R=_)}if(ee.default.neq(p,R))return{key:r,newRange:S,user:a,repo:u,oldRef:h,newRef:S}}else{let S=m[m.length-1],R=S.replace(/^v/,"");if(!ee.default.valid(R))return;if(ee.default.neq(p,R))return{key:r,newRange:S,user:a,repo:u,oldRef:h,newRef:S}}}}function Lb(r){let e=r.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function qb(r){let e=r.match(Xc);return(e==null?void 0:e.length)!==1?r:r.replace(Xc,ee.default.coerce(e[0]))}function nr(r){return r===void 0?!1:r===""?!0:typeof r=="string"?r.includes(",")?new Set(r.split(",")):new Set([r]):Array.isArray(r)?new Set(r):!1}async function Db(){var m,p,S,R,T;for(let _ of[process.stdout,process.stderr])(p=(m=_==null?void 0:_._handle)==null?void 0:m.setBlocking)==null||p.call(m,!0);B.help&&(ob.write(`usage: updates [options]
23
23
 
24
24
  Options:
25
25
  -u, --update Update versions and write package.json
@@ -37,7 +37,7 @@ Content-Type: ${a.type||"application/octet-stream"}\r
37
37
  -r, --registry <url> Override npm registry URL
38
38
  -G, --githubapi <url> Override Github API URL
39
39
  -f, --file <path> Use given package.json file or module directory
40
- -S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: ${Kc}
40
+ -S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: ${lf}
41
41
  -j, --json Output a JSON object
42
42
  -n, --no-color Disable color output
43
43
  -v, --version Print the version
@@ -47,4 +47,4 @@ Content-Type: ${a.type||"application/octet-stream"}\r
47
47
  Examples:
48
48
  $ updates
49
49
  $ updates -u && npm i
50
- `),jr(0)),B.version&&(console.info("14.1.0"),jr(0));let r={};if(Be["strict-ssl"]===!1)r.rejectUnauthorized=!1;else if("cafile"in Be&&(r.ca=Nc.concat(jc(Fc(Be.cafile,"utf8")))),"ca"in Be){let S=Array.isArray(Be.ca)?Be.ca:[Be.ca];r.ca=Nc.concat(S.map(v=>jc(v)))}let e;if(B.file){let S;try{S=Yg(B.file)}catch(v){Re(new Error(`Unable to open ${B.file}: ${v.message}`))}S!=null&&S.isFile()?e=B.file:S!=null&&S.isDirectory()?e=ti(B.file,"package.json"):Re(new Error(`${B.file} is neither a file nor directory`))}else{let S=Mg();if(e=Jc("package.json",S),!e)return Re(new Error(`Unable to find package.json in ${S} or any of its parent directories`))}try{De=(await import(ti(qs(e),"updates.config.js"))).default}catch{try{De=(await import(ti(qs(e),"updates.config.mjs"))).default}catch{}}let t;B.types?t=Array.isArray(B.types)?B.types:B.types.split(","):"types"in De?t=De.types:t=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"];let i,o;try{o=Fc(e,"utf8")}catch(S){Re(new Error(`Unable to open ${e}: ${S.message}`))}try{i=JSON.parse(o)}catch(S){Re(new Error(`Error parsing ${e}: ${S.message}`))}let a,u;B.include&&B.include!==!0?a=new Set((Array.isArray(B.include)?B.include:[B.include]).flatMap(S=>S.split(","))):"include"in De&&Array.isArray(De.include)&&(a=new Set(De.include)),B.exclude&&B.exclude!==!0?u=new Set((Array.isArray(B.exclude)?B.exclude:[B.exclude]).flatMap(S=>S.split(","))):"exclude"in De&&Array.isArray(De.exclude)&&(u=new Set(De.exclude));function h(S){var v,P;return!(((v=u==null?void 0:u.has)==null?void 0:v.call(u,S))===!0||((P=a==null?void 0:a.has)==null?void 0:P.call(a,S))===!1)}let d={},f={};for(let S of t)for(let[v,P]of Object.entries(i[S]||{}))J.default.validRange(P)&&h(v)?d[`${S}${at}${v}`]={old:_b(P),oldOriginal:P}:h(v)&&(f[`${S}${at}${v}`]={old:P});!Object.keys(d).length&&!Object.keys(f).length&&Re(a||u?new Error("No dependencies match the given include/exclude filters"):"No dependencies present, nothing to do");let m=await Promise.all(Object.keys(d).map(S=>{let[v,P]=S.split(at);return ub(P,v,ab,r)}));for(let[S,v,P,D]of m){if(S!=null&&S.error)throw new Error(S.error);let A=typeof Kt=="boolean"?Kt:Kt.has(S.name),q=typeof Ps=="boolean"?Ps:Ps.has(S.name),I=typeof Is=="boolean"?Is:Is.has(S.name),L;Zt===!0||(p=Zt==null?void 0:Zt.has)!=null&&p.call(Zt,S.name)?L=ib:Jt===!0||(_=Jt==null?void 0:Jt.has)!=null&&_.call(Jt,S.name)?L=sb:L=ob;let W=`${v}${at}${D}`,Y=d[W].old,X=bb(S,{usePre:q,useRel:I,useGreatest:A,semvers:L,range:Y}),oe=pb(Y,X);!X||Y===oe?delete d[W]:(d[W].new=oe,d[W].info=cb(S.versions[X]||S,P,S.name),(R=S.time)!=null&&R[X]&&(d[W].age=Cs(S.time[X],{noAffix:!0})))}if(Object.keys(f).length){let S=await Promise.all(Object.entries(f).map(([v,P])=>{let D=v.split(at)[1],A=typeof Kt=="boolean"?Kt:Kt.has(D);return yb([v,P],{useGreatest:A})}));for(let v of(S||[]).filter(Boolean)){let{key:P,newRange:D,user:A,repo:q,oldRef:I,newRef:L,newDate:W}=v;d[P]={old:f[P].old,new:D,oldPrint:Ds.test(I)?I.substring(0,7):I,newPrint:Ds.test(L)?L.substring(0,7):L,info:`https://github.com/${A}/${q}`,...W?{age:Cs(W,{noAffix:!0})}:{}}}}Object.keys(d).length||Re("All dependencies are up to date."),B.update||Re(void 0,d);try{fb(e,db(o,d))}catch(S){Re(new Error(`Error writing ${e}: ${S.message}`))}Re(tr("\u2728 package.json updated"),d)}wb().catch(Re);
50
+ `),Ur(0)),B.version&&(console.info("14.1.1"),Ur(0));let r;if(B.file){let _;try{_=ub(B.file)}catch(P){Ae(new Error(`Unable to open ${B.file}: ${P.message}`))}_!=null&&_.isFile()?r=B.file:_!=null&&_.isDirectory()?r=ii(B.file,"package.json"):Ae(new Error(`${B.file} is neither a file nor directory`))}else{let _=sb();if(r=cf("package.json",_),!r)return Ae(new Error(`Unable to find package.json in ${_} or any of its parent directories`))}try{Te=(await import(ii(zs(r),"updates.config.js"))).default}catch{try{Te=(await import(ii(zs(r),"updates.config.mjs"))).default}catch{}}let e={};if(ze["strict-ssl"]===!1)e.rejectUnauthorized=!1;else if("cafile"in ze&&(e.ca=Yc.concat(Zc(Vc(ze.cafile,"utf8")))),"ca"in ze){let _=Array.isArray(ze.ca)?ze.ca:[ze.ca];e.ca=Yc.concat(_.map(P=>Zc(P)))}let t;B.types?t=Array.isArray(B.types)?B.types:B.types.split(","):"types"in Te&&Array.isArray(Te.types)?t=Te.types:t=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"];let i,o;try{o=Vc(r,"utf8")}catch(_){Ae(new Error(`Unable to open ${r}: ${_.message}`))}try{i=JSON.parse(o)}catch(_){Ae(new Error(`Error parsing ${r}: ${_.message}`))}let a,u;B.include&&B.include!==!0?a=new Set((Array.isArray(B.include)?B.include:[B.include]).flatMap(_=>_.split(","))):"include"in Te&&Array.isArray(Te.include)&&(a=new Set(Te.include)),B.exclude&&B.exclude!==!0?u=new Set((Array.isArray(B.exclude)?B.exclude:[B.exclude]).flatMap(_=>_.split(","))):"exclude"in Te&&Array.isArray(Te.exclude)&&(u=new Set(Te.exclude));function h(_){var P,I;return!(((P=u==null?void 0:u.has)==null?void 0:P.call(u,_))===!0||((I=a==null?void 0:a.has)==null?void 0:I.call(a,_))===!1)}let d={},f={};for(let _ of t)for(let[P,I]of Object.entries(i[_]||{}))ee.default.validRange(I)&&h(P)?d[`${_}${ct}${P}`]={old:qb(I),oldOriginal:I}:h(P)&&(f[`${_}${ct}${P}`]={old:I});!Object.keys(d).length&&!Object.keys(f).length&&Ae(a||u?new Error("No dependencies match the given include/exclude filters"):"No dependencies present, nothing to do");let g=Ws(B.registry||Te.registry||ze.registry),y=await Promise.all(Object.keys(d).map(_=>{let[P,I]=_.split(ct);return Rb(I,P,g,e)}));for(let[_,P,I,v]of y){if(_!=null&&_.error)throw new Error(_.error);let x=typeof Jt=="boolean"?Jt:Jt.has(_.name),q=typeof Ds=="boolean"?Ds:Ds.has(_.name),D=typeof Bs=="boolean"?Bs:Bs.has(_.name),W;er===!0||(S=er==null?void 0:er.has)!=null&&S.call(er,_.name)?W=Sb:tr===!0||(R=tr==null?void 0:tr.has)!=null&&R.call(tr,_.name)?W=_b:W=wb;let G=`${P}${ct}${v}`,K=d[G].old,te=Ib(_,{usePre:q,useRel:D,useGreatest:x,semvers:W,range:K}),qe=$b(K,te);!te||K===qe?delete d[G]:(d[G].new=qe,d[G].info=vb(_.versions[te]||_,I,_.name),(T=_.time)!=null&&T[te]&&(d[G].age=Os(_.time[te],{noAffix:!0})))}if(Object.keys(f).length){let _=await Promise.all(Object.entries(f).map(([P,I])=>{let v=P.split(ct)[1],x=typeof Jt=="boolean"?Jt:Jt.has(v);return xb([P,I],{useGreatest:x})}));for(let P of(_||[]).filter(Boolean)){let{key:I,newRange:v,user:x,repo:q,oldRef:D,newRef:W,newDate:G}=P;d[I]={old:f[I].old,new:v,oldPrint:ks.test(D)?D.substring(0,7):D,newPrint:ks.test(W)?W.substring(0,7):W,info:`https://github.com/${x}/${q}`,...G?{age:Os(G,{noAffix:!0})}:{}}}}Object.keys(d).length||Ae("All dependencies are up to date."),B.update||Ae(void 0,d);try{Tb(r,Cb(o,d))}catch(_){Ae(new Error(`Error writing ${r}: ${_.message}`))}Ae(jr("\u2728 package.json updated"),d)}Db().catch(Ae);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "updates",
3
- "version": "14.1.0",
3
+ "version": "14.1.1",
4
4
  "description": "Flexible npm dependency update tool",
5
5
  "author": "silverwind",
6
6
  "repository": "silverwind/updates",
@@ -15,11 +15,12 @@
15
15
  ],
16
16
  "devDependencies": {
17
17
  "ansi-regex": "6.0.1",
18
- "esbuild": "0.17.18",
19
- "eslint": "8.39.0",
20
- "eslint-config-silverwind": "65.1.6",
18
+ "esbuild": "0.17.19",
19
+ "eslint": "8.41.0",
20
+ "eslint-config-silverwind": "73.0.0",
21
21
  "execa": "7.1.1",
22
22
  "fetch-enhanced": "11.1.1",
23
+ "glowie": "1.0.1",
23
24
  "hosted-git-info": "6.1.1",
24
25
  "minimist": "1.2.8",
25
26
  "node-fetch": "3.3.1",
@@ -27,9 +28,10 @@
27
28
  "registry-auth-token": "4.2.2",
28
29
  "restana": "4.9.7",
29
30
  "semver": "7.3.8",
31
+ "supports-color": "9.3.1",
30
32
  "text-table": "0.2.0",
31
33
  "timerel": "5.4.1",
32
34
  "versions": "11.0.0",
33
- "vitest": "0.30.1"
35
+ "vitest": "0.31.1"
34
36
  }
35
37
  }