fix: update bundle

This commit is contained in:
Zoltan Kochan committed 2026-06-15 14:01:09 +02:00
1 parent 9835e4d21d
commit be9492a01c
1 file changed
+7 -7
+7 -7
View File
@@ -18,12 +18,12 @@ ${u(C)}\r
`);d.push(I),s+=I.byteLength}else{let I=im.encode(`${c}; name="${l(u(E))}"`+(C.name?`; filename="${l(C.name)}"`:"")+`\r
Content-Type: ${C.type||"application/octet-stream"}\r
\r
`);d.push(I,C,f),typeof C.size=="number"?s+=I.byteLength+C.size+f.byteLength:g=!0}let m=im.encode(`--${A}--`);d.push(m),s+=m.byteLength,g&&(s=null),i=t,n=async function*(){for(let E of d)E.stream?yield*E.stream():yield E},o="multipart/form-data; boundary="+A}else if(wP(t))i=t,s=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(nc.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof xs?t:_X(t)}if((typeof i=="string"||nc.isBuffer(i))&&(s=Buffer.byteLength(i)),n!=null){let A;r=new xs({async start(){A=n(t)[Symbol.asyncIterator]()},async pull(c){let{value:l,done:u}=await A.next();return u?queueMicrotask(()=>{c.close()}):qX(r)||c.enqueue(new Uint8Array(l)),c.desiredSize>0},async cancel(c){await A.return()},type:void 0})}return[{stream:r,source:i,length:s},o]}function JX(t,e=!1){return xs||(xs=require("stream/web").ReadableStream),t instanceof xs&&(lQ(!nc.isDisturbed(t),"The body has already been consumed."),lQ(!t.locked,"The stream is locked.")),_P(t,e)}function VX(t){let[e,r]=t.stream.tee(),n=MX(r,{transfer:[r]}),[,i]=n.tee();return t.stream=e,{stream:i,length:t.length,source:t.source}}async function*vP(t){if(t)if(DP(t))yield t;else{let e=t.stream;if(nc.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[UX]=!0,yield*e}}function dQ(t){if(t.aborted)throw new RP("The operation was aborted.","AbortError")}function WX(t){return{blob(){return sm(this,r=>{let n=ZX(this);return n==="failure"?n="":n&&(n=GX(n)),new LX([r],{type:n})},t)},arrayBuffer(){return sm(this,r=>new Uint8Array(r).buffer,t)},text(){return sm(this,kP,t)},json(){return sm(this,XX,t)},async formData(){cQ.brandCheck(this,t),dQ(this[Ss]);let r=this.headers.get("Content-Type");if(/multipart\/form-data/.test(r)){let n={};for(let[a,A]of this.headers)n[a.toLowerCase()]=A;let i=new xP,s;try{s=new DX({headers:n,preservePath:!0})}catch(a){throw new RP(`${a}`,"AbortError")}s.on("field",(a,A)=>{i.append(a,A)}),s.on("file",(a,A,c,l,u)=>{let d=[];if(l==="base64"||l.toLowerCase()==="base64"){let f="";A.on("data",g=>{f+=g.toString().replace(/[\r\n]/gm,"");let m=f.length-f.length%4;d.push(Buffer.from(f.slice(0,m),"base64")),f=f.slice(m)}),A.on("end",()=>{d.push(Buffer.from(f,"base64")),i.append(a,new SP(d,c,{type:u}))})}else A.on("data",f=>{d.push(f)}),A.on("end",()=>{i.append(a,new SP(d,c,{type:u}))})});let o=new Promise((a,A)=>{s.on("finish",a),s.on("error",c=>A(new TypeError(c)))});if(this.body!==null)for await(let a of vP(this[Ss].body))s.write(a);return s.end(),await o,i}else if(/application\/x-www-form-urlencoded/.test(r)){let n;try{let s="",o=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let a of vP(this[Ss].body)){if(!DP(a))throw new TypeError("Expected Uint8Array chunk");s+=o.decode(a,{stream:!0})}s+=o.decode(),n=new URLSearchParams(s)}catch(s){throw Object.assign(new TypeError,{cause:s})}let i=new xP;for(let[s,o]of n)i.append(s,o);return i}else throw await Promise.resolve(),dQ(this[Ss]),cQ.errors.exception({header:`${t.name}.formData`,message:"Could not parse content as FormData."})}}}function $X(t){Object.assign(t.prototype,WX(t))}async function sm(t,e,r){if(cQ.brandCheck(t,r),dQ(t[Ss]),KX(t[Ss].body))throw new TypeError("Body is unusable");let n=TX(),i=o=>n.reject(o),s=o=>{try{n.resolve(e(o))}catch(a){i(a)}};return t[Ss].body==null?(s(new Uint8Array),n.promise):(await OX(t[Ss].body,s,i),n.promise)}function KX(t){return t!=null&&(t.stream.locked||nc.isDisturbed(t.stream))}function kP(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),YX.decode(t))}function XX(t){return JSON.parse(kP(t))}function ZX(t){let{headersList:e}=t[Ss],r=e.get("content-type");return r===null?"failure":jX(r)}PP.exports={extractBody:_P,safelyExtractBody:JX,cloneBody:VX,mixinBody:$X}});var LP=h((k_e,MP)=>{"use strict";var{InvalidArgumentError:ft,NotSupportedError:e6}=at(),vs=require("assert"),{kHTTP2BuildRequest:t6,kHTTP2CopyHeaders:r6,kHTTP1BuildRequest:n6}=pt(),Xr=Fe(),TP=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/,OP=/[^\t\x20-\x7e\x80-\xff]/,i6=/[^\u0021-\u00ff]/,Ri=Symbol("handler"),$t={},fQ;try{let t=require("diagnostics_channel");$t.create=t.channel("undici:request:create"),$t.bodySent=t.channel("undici:request:bodySent"),$t.headers=t.channel("undici:request:headers"),$t.trailers=t.channel("undici:request:trailers"),$t.error=t.channel("undici:request:error")}catch{$t.create={hasSubscribers:!1},$t.bodySent={hasSubscribers:!1},$t.headers={hasSubscribers:!1},$t.trailers={hasSubscribers:!1},$t.error={hasSubscribers:!1}}var hQ=class t{constructor(e,{path:r,method:n,body:i,headers:s,query:o,idempotent:a,blocking:A,upgrade:c,headersTimeout:l,bodyTimeout:u,reset:d,throwOnError:f,expectContinue:g},m){if(typeof r!="string")throw new ft("path must be a string");if(r[0]!=="/"&&!(r.startsWith("http://")||r.startsWith("https://"))&&n!=="CONNECT")throw new ftLine truncated
`);d.push(I,C,f),typeof C.size=="number"?s+=I.byteLength+C.size+f.byteLength:g=!0}let m=im.encode(`--${A}--`);d.push(m),s+=m.byteLength,g&&(s=null),i=t,n=async function*(){for(let E of d)E.stream?yield*E.stream():yield E},o="multipart/form-data; boundary="+A}else if(wP(t))i=t,s=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(nc.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof xs?t:_X(t)}if((typeof i=="string"||nc.isBuffer(i))&&(s=Buffer.byteLength(i)),n!=null){let A;r=new xs({async start(){A=n(t)[Symbol.asyncIterator]()},async pull(c){let{value:l,done:u}=await A.next();return u?queueMicrotask(()=>{c.close()}):qX(r)||c.enqueue(new Uint8Array(l)),c.desiredSize>0},async cancel(c){await A.return()},type:void 0})}return[{stream:r,source:i,length:s},o]}function JX(t,e=!1){return xs||(xs=require("stream/web").ReadableStream),t instanceof xs&&(lQ(!nc.isDisturbed(t),"The body has already been consumed."),lQ(!t.locked,"The stream is locked.")),_P(t,e)}function VX(t){let[e,r]=t.stream.tee(),n=MX(r,{transfer:[r]}),[,i]=n.tee();return t.stream=e,{stream:i,length:t.length,source:t.source}}async function*vP(t){if(t)if(DP(t))yield t;else{let e=t.stream;if(nc.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[UX]=!0,yield*e}}function dQ(t){if(t.aborted)throw new RP("The operation was aborted.","AbortError")}function WX(t){return{blob(){return sm(this,r=>{let n=ZX(this);return n==="failure"?n="":n&&(n=GX(n)),new LX([r],{type:n})},t)},arrayBuffer(){return sm(this,r=>new Uint8Array(r).buffer,t)},text(){return sm(this,kP,t)},json(){return sm(this,XX,t)},async formData(){cQ.brandCheck(this,t),dQ(this[Ss]);let r=this.headers.get("Content-Type");if(/multipart\/form-data/.test(r)){let n={};for(let[a,A]of this.headers)n[a.toLowerCase()]=A;let i=new xP,s;try{s=new DX({headers:n,preservePath:!0})}catch(a){throw new RP(`${a}`,"AbortError")}s.on("field",(a,A)=>{i.append(a,A)}),s.on("file",(a,A,c,l,u)=>{let d=[];if(l==="base64"||l.toLowerCase()==="base64"){let f="";A.on("data",g=>{f+=g.toString().replace(/[\r\n]/gm,"");let m=f.length-f.length%4;d.push(Buffer.from(f.slice(0,m),"base64")),f=f.slice(m)}),A.on("end",()=>{d.push(Buffer.from(f,"base64")),i.append(a,new SP(d,c,{type:u}))})}else A.on("data",f=>{d.push(f)}),A.on("end",()=>{i.append(a,new SP(d,c,{type:u}))})});let o=new Promise((a,A)=>{s.on("finish",a),s.on("error",c=>A(new TypeError(c)))});if(this.body!==null)for await(let a of vP(this[Ss].body))s.write(a);return s.end(),await o,i}else if(/application\/x-www-form-urlencoded/.test(r)){let n;try{let s="",o=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let a of vP(this[Ss].body)){if(!DP(a))throw new TypeError("Expected Uint8Array chunk");s+=o.decode(a,{stream:!0})}s+=o.decode(),n=new URLSearchParams(s)}catch(s){throw Object.assign(new TypeError,{cause:s})}let i=new xP;for(let[s,o]of n)i.append(s,o);return i}else throw await Promise.resolve(),dQ(this[Ss]),cQ.errors.exception({header:`${t.name}.formData`,message:"Could not parse content as FormData."})}}}function $X(t){Object.assign(t.prototype,WX(t))}async function sm(t,e,r){if(cQ.brandCheck(t,r),dQ(t[Ss]),KX(t[Ss].body))throw new TypeError("Body is unusable");let n=TX(),i=o=>n.reject(o),s=o=>{try{n.resolve(e(o))}catch(a){i(a)}};return t[Ss].body==null?(s(new Uint8Array),n.promise):(await OX(t[Ss].body,s,i),n.promise)}function KX(t){return t!=null&&(t.stream.locked||nc.isDisturbed(t.stream))}function kP(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),YX.decode(t))}function XX(t){return JSON.parse(kP(t))}function ZX(t){let{headersList:e}=t[Ss],r=e.get("content-type");return r===null?"failure":jX(r)}PP.exports={extractBody:_P,safelyExtractBody:JX,cloneBody:VX,mixinBody:$X}});var LP=h((k_e,MP)=>{"use strict";var{InvalidArgumentError:ft,NotSupportedError:eZ}=at(),vs=require("assert"),{kHTTP2BuildRequest:tZ,kHTTP2CopyHeaders:rZ,kHTTP1BuildRequest:nZ}=pt(),Xr=Fe(),TP=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/,OP=/[^\t\x20-\x7e\x80-\xff]/,iZ=/[^\u0021-\u00ff]/,Ri=Symbol("handler"),$t={},fQ;try{let t=require("diagnostics_channel");$t.create=t.channel("undici:request:create"),$t.bodySent=t.channel("undici:request:bodySent"),$t.headers=t.channel("undici:request:headers"),$t.trailers=t.channel("undici:request:trailers"),$t.error=t.channel("undici:request:error")}catch{$t.create={hasSubscribers:!1},$t.bodySent={hasSubscribers:!1},$t.headers={hasSubscribers:!1},$t.trailers={hasSubscribers:!1},$t.error={hasSubscribers:!1}}var hQ=class t{constructor(e,{path:r,method:n,body:i,headers:s,query:o,idempotent:a,blocking:A,upgrade:c,headersTimeout:l,bodyTimeout:u,reset:d,throwOnError:f,expectContinue:g},m){if(typeof r!="string")throw new ft("path must be a string");if(r[0]!=="/"&&!(r.startsWith("http://")||r.startsWith("https://"))&&n!=="CONNECT")throw new ftLine truncated
`),this.body=E.stream,this.contentLength=E.length}else Xr.isBlobLike(i)&&this.contentType==null&&i.type&&(this.contentType=i.type,this.headers+=`content-type: ${i.type}\r
`);Xr.validateHandler(m,n,c),this.servername=Xr.getServerName(this.host),this[Ri]=m,$t.create.hasSubscribers&&$t.create.publish({request:this})}onBodySent(e){if(this[Ri].onBodySent)try{return this[Ri].onBodySent(e)}catch(r){this.abort(r)}}onRequestSent(){if($t.bodySent.hasSubscribers&&$t.bodySent.publish({request:this}),this[Ri].onRequestSent)try{return this[Ri].onRequestSent()}catch(e){this.abort(e)}}onConnect(e){if(vs(!this.aborted),vs(!this.completed),this.error)e(this.error);else return this.abort=e,this[Ri].onConnect(e)}onHeaders(e,r,n,i){vs(!this.aborted),vs(!this.completed),$t.headers.hasSubscribers&&$t.headers.publish({request:this,response:{statusCode:e,headers:r,statusText:i}});try{return this[Ri].onHeaders(e,r,n,i)}catch(s){this.abort(s)}}onData(e){vs(!this.aborted),vs(!this.completed);try{return this[Ri].onData(e)}catch(r){return this.abort(r),!1}}onUpgrade(e,r,n){return vs(!this.aborted),vs(!this.completed),this[Ri].onUpgrade(e,r,n)}onComplete(e){this.onFinally(),vs(!this.aborted),this.completed=!0,$t.trailers.hasSubscribers&&$t.trailers.publish({request:this,trailers:e});try{return this[Ri].onComplete(e)}catch(r){this.onError(r)}}onError(e){if(this.onFinally(),$t.error.hasSubscribers&&$t.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[Ri].onError(e)}onFinally(){this.errorHandler&&(this.body.off("error",this.errorHandler),this.errorHandler=null),this.endHandler&&(this.body.off("end",this.endHandler),this.endHandler=null)}addHeader(e,r){return Id(this,e,r),this}static[n6](e,r,n){return new t(e,r,n)}static[t6](e,r,n){let i=r.headers;r={...r,headers:null};let s=new t(e,r,n);if(s.headers={},Array.isArray(i)){if(i.length%2!==0)throw new ft("headers array must be even");for(let o=0;o<i.length;o+=2)Id(s,i[o],i[o+1],!0)}else if(i&&typeof i=="object"){let o=Object.keys(i);for(let a=0;a<o.length;a++){let A=o[a];Id(s,A,i[A],!0)}}else if(i!=null)throw new ft("headers must be an object or an array");return s}static[r6](e){let r=e.split(`\r
`);Xr.validateHandler(m,n,c),this.servername=Xr.getServerName(this.host),this[Ri]=m,$t.create.hasSubscribers&&$t.create.publish({request:this})}onBodySent(e){if(this[Ri].onBodySent)try{return this[Ri].onBodySent(e)}catch(r){this.abort(r)}}onRequestSent(){if($t.bodySent.hasSubscribers&&$t.bodySent.publish({request:this}),this[Ri].onRequestSent)try{return this[Ri].onRequestSent()}catch(e){this.abort(e)}}onConnect(e){if(vs(!this.aborted),vs(!this.completed),this.error)e(this.error);else return this.abort=e,this[Ri].onConnect(e)}onHeaders(e,r,n,i){vs(!this.aborted),vs(!this.completed),$t.headers.hasSubscribers&&$t.headers.publish({request:this,response:{statusCode:e,headers:r,statusText:i}});try{return this[Ri].onHeaders(e,r,n,i)}catch(s){this.abort(s)}}onData(e){vs(!this.aborted),vs(!this.completed);try{return this[Ri].onData(e)}catch(r){return this.abort(r),!1}}onUpgrade(e,r,n){return vs(!this.aborted),vs(!this.completed),this[Ri].onUpgrade(e,r,n)}onComplete(e){this.onFinally(),vs(!this.aborted),this.completed=!0,$t.trailers.hasSubscribers&&$t.trailers.publish({request:this,trailers:e});try{return this[Ri].onComplete(e)}catch(r){this.onError(r)}}onError(e){if(this.onFinally(),$t.error.hasSubscribers&&$t.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[Ri].onError(e)}onFinally(){this.errorHandler&&(this.body.off("error",this.errorHandler),this.errorHandler=null),this.endHandler&&(this.body.off("end",this.endHandler),this.endHandler=null)}addHeader(e,r){return Id(this,e,r),this}static[nZ](e,r,n){return new t(e,r,n)}static[tZ](e,r,n){let i=r.headers;r={...r,headers:null};let s=new t(e,r,n);if(s.headers={},Array.isArray(i)){if(i.length%2!==0)throw new ft("headers array must be even");for(let o=0;o<i.length;o+=2)Id(s,i[o],i[o+1],!0)}else if(i&&typeof i=="object"){let o=Object.keys(i);for(let a=0;a<o.length;a++){let A=o[a];Id(s,A,i[A],!0)}}else if(i!=null)throw new ft("headers must be an object or an array");return s}static[rZ](e){let r=e.split(`\r
`),n={};for(let i of r){let[s,o]=i.split(": ");o==null||o.length===0||(n[s]?n[s]+=`,${o}`:n[s]=o)}return n}};function Ba(t,e,r){if(e&&typeof e=="object")throw new ft(`invalid ${t} header`);if(e=e!=null?`${e}`:"",OP.exec(e)!==null)throw new ft(`invalid ${t} header`);return r?e:`${t}: ${e}\r
`}function Id(t,e,r,n=!1){if(r&&typeof r=="object"&&!Array.isArray(r))throw new ft(`invalid ${e} header`);if(r===void 0)return;if(t.host===null&&e.length===4&&e.toLowerCase()==="host"){if(OP.exec(r)!==null)throw new ft(`invalid ${e} header`);t.host=r}else if(t.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(t.contentLength=parseInt(r,10),!Number.isFinite(t.contentLength))throw new ft("invalid content-length header")}else if(t.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")t.contentType=r,n?t.headers[e]=Ba(e,r,n):t.headers+=Ba(e,r);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new ft("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof r=="string"?r.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new ft("invalid connection header");i==="close"&&(t.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new ft("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new ft("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new e6("expect header not supported");if(TP.exec(e)===null)throw new ft("invalid header key");if(Array.isArray(r))for(let i=0;i<r.length;i++)n?t.headers[e]?t.headers[e]+=`,${Ba(e,r[i],n)}`:t.headers[e]=Ba(e,r[i],n):t.headers+=Ba(e,r[i]);else n?t.headers[e]=Ba(e,r,n):t.headers+=Ba(e,r)}}}MP.exports=hQ});var om=h((P_e,FP)=>{"use strict";var s6=require("events"),gQ=class extends s6{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};FP.exports=gQ});var Qd=h((T_e,UP)=>{"use strict";var o6=om(),{ClientDestroyedError:mQ,ClientClosedError:a6,InvalidArgumentError:ic}=at(),{kDestroy:A6,kClose:c6,kDispatch:pQ,kInterceptors:Qa}=pt(),sc=Symbol("destroyed"),Bd=Symbol("closed"),Rs=Symbol("onDestroyed"),oc=Symbol("onClosed"),am=Symbol("Intercepted Dispatch"),yQ=class extends o6{constructor(){super(),this[sc]=!1,this[Rs]=null,this[Bd]=!1,this[oc]=[]}get destroyed(){return this[sc]}get closed(){return this[Bd]}get interceptors(){return this[Qa]}set interceptors(e){if(e){for(let r=e.length-1;r>=0;r--)if(typeof this[Qa][r]!="function")throw new ic("interceptor must be an function")}this[Qa]=e}close(e){if(e===void 0)return new Promise((n,i)=>{this.close((s,o)=>s?i(s):n(o))});if(typeof e!="function")throw new ic("invalid callback");if(this[sc]){queueMicrotask(()=>e(new mQ,null));return}if(this[Bd]){this[oc]?this[oc].push(e):queueMicrotask(()=>e(null,null));return}this[Bd]=!0,this[oc].push(e);let r=()=>{let n=this[oc];this[oc]=null;for(let i=0;i<n.length;i++)n[i](null,null)};this[c6]().then(()=>this.destroy()).then(()=>{queueMicrotask(r)})}destroy(e,r){if(typeof e=="function"&&(r=e,e=null),r===void 0)return new Promise((i,s)=>{this.destroy(e,(o,a)=>o?s(o):i(a))});if(typeof r!="function")throw new ic("invalid callback");if(this[sc]){this[Rs]?this[Rs].push(r):queueMicrotask(()=>r(null,null));return}e||(e=new mQ),this[sc]=!0,this[Rs]=this[Rs]||[],this[Rs].push(r);let n=()=>{let i=this[Rs];this[Rs]=null;for(let s=0;s<i.length;s++)i[s](null,null)};this[A6](e).then(()=>{queueMicrotask(n)})}[am](e,r){if(!this[Qa]||this[Qa].length===0)return this[am]=this[pQ],this[pQ](e,r);let n=this[pQ].bind(this);for(let i=this[Qa].length-1;i>=0;i--)n=this[Qa][i](n);return this[am]=n,n(e,r)}dispatch(e,r){if(!r||typeof r!="object")throw new ic("handler must be an object");try{if(!e||typeof e!="object")throw new ic("opts must be an object.");if(this[sc]||this[Rs])throw new mQ;if(this[Bd])throw new a6;return this[am](e,r)}catch(n){if(typeof r.onError!="function")throw new ic("invalid onError method");return r.onError(n),!1}}};UP.exports=yQ});var bd=h((L_e,zP)=>{"use strict";var l6=require("net"),qP=require("assert"),HP=Fe(),{InvalidArgumentError:u6,ConnectTimeoutError:d6}=at(),EQ,CQ;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?CQ=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(r=>{if(this._sessionCache.size<this._maxCachedSessions)return;let n=this._sessionCache.get(r);n!==void 0&&n.deref()===void 0&&this._sessionCache.delete(r)})}get(e){let r=this._sessionCache.get(e);return r?r.deref():null}set(e,r){this._maxCachedSessions!==0&&(this._sessionCache.set(e,new WeakRef(r)),this._sessionRegistry.register(r,e))}}:CQ=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map}get(e){return this._sessionCache.get(e)}set(e,r){if(this._maxCachedSessions!==0){if(this._sessionCache.size>=this._maxCachedSessions){let{value:n}=this._sessionCache.keys().next();this._sessionCache.delete(n)}this._sessionCache.set(e,r)}}};function f6({allowH2:t,maxCachedSessions:e,socketPath:r,timeout:n,...i}){if(e!=null&&(!Number.isInteger(e)||e<0))throw new u6("maxCachedSessions must be a positive integer or zero");let s={path:r,...i},o=new CQ(e??100);return n=n??1e4,t=t??!1,function({hostname: Line truncated
`,this[oT]=A??3e5,this[sT]=i??3e5,this[Rd]=I??!0,this[z6]=w,this[Dd]=T,this[Eo]=null,this[AT]=k>-1?k:-1,this[$i]="h1",this[Sn]=null,this[gm]=Se?{openStreams:0,maxConcurrentStreams:H??100}:null,this[cT]=`${this[Br].hostname}${this[Br].port?`:${this[Br].port}`:""}`,this[yt]=[],this[Et]=0,this[xn]=0}get pipelining(){return this[Io]}set pipelining(e){this[Io]=e,vn(this,!0)}get[wa](){return this[yt].length-this[xn]}get[St](){return this[xn]-this[Et]}get[Na](){return this[yt].length-this[Et]}get[H6](){return!!this[_t]&&!this[Ac]&&!this[_t].destroyed}get[SQ](){let e=this[_t];return e&&(e[Hr]||e[ks]||e[lc])||this[Na]>=(this[Io]||1)||this[wa]>0}[q6](e){fT(this),this.once("connect",e)}[Y6](e,r){let n=e.origin||this[Br].origin,i=this[$i]==="h2"?xQ[V6](n,e,r):xQ[$6](n,e,r);return this[yt].push(i),this[ba]||(Ae.bodyLength(i.body)==null&&Ae.isIterable(i.body)?(this[ba]=1,process.nextTick(vn,this)):vn(this,!0)),this[ba]&&this[Co]!==2&&this[SQ]&&(this[Co]=2),this[Co]<2}async[j6](){return new Promise(e=>{this[Na]?this[Eo]=e:e(null)})}async[G6](e){return new Promise(r=>{let n=this[yt].splice(this[xn]);for(let s=0;s<n.length;s++){let o=n[s];zr(this,o,e)}let i=()=>{this[Eo]&&(this[Eo](),this[Eo]=null),r()};this[Sn]!=null&&(Ae.destroy(this[Sn],e),this[Sn]=null,this[gm]=null),this[_t]?Ae.destroy(this[_t].on("close",i),e):queueMicrotask(i),vn(this)})}};function iZ(t){ee(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[_t][Qr]=t,Em(this[Wi],t)}function sZ(t,e,r){let n=new Vi(`HTTP/2: "frameError" received - type ${t}, code ${e}`);r===0&&(this[_t][Qr]=n,Em(this[Wi],n))}function oZ(){Ae.destroy(this,new cc("other side closed")),Ae.destroy(this[_t],new cc("other side closed"))}function aZ(t){let e=this[Wi],r=new Vi(`HTTP/2: "GOAWAY" frame received with code ${t}`);if(e[_t]=null,e[Sn]=null,e.destroyed){ee(this[wa]===0);let n=e[yt].splice(e[Et]);for(let i=0;i<n.length;i++){let s=n[i];zr(this,s,r)}}else if(e[St]>0){let n=e[yt][e[Et]];e[yt][e[Et]++]=null,zr(e,n,r)}e[xn]=e[Et],ee(e[St]===0),e.emit("disconnect",e[Br],[e],r),vn(e)}var Gi=GP(),AZ=lm(),cZ=Buffer.alloc(0);async function lZ(){let t=process.env.JEST_WORKER_ID?bQ():void 0,e;try{e=await WebAssembly.compile(Buffer.from(XP(),"base64"))}catch{e=await WebAssembly.compile(Buffer.from(t||bQ(),"base64"))}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,n,i)=>0,wasm_on_status:(r,n,i)=>{ee.strictEqual(tr.ptr,r);let s=n-Ji+Yi.byteOffset;return tr.onStatus(new um(Yi.buffer,s,i))||0},wasm_on_message_begin:r=>(ee.strictEqual(tr.ptr,r),tr.onMessageBegin()||0),wasm_on_header_field:(r,n,i)=>{ee.strictEqual(tr.ptr,r);let s=n-Ji+Yi.byteOffset;return tr.onHeaderField(new um(Yi.buffer,s,i))||0},wasm_on_header_value:(r,n,i)=>{ee.strictEqual(tr.ptr,r);let s=n-Ji+Yi.byteOffset;return tr.onHeaderValue(new um(Yi.buffer,s,i))||0},wasm_on_headers_complete:(r,n,i,s)=>(ee.strictEqual(tr.ptr,r),tr.onHeadersComplete(n,!!i,!!s)||0),wasm_on_body:(r,n,i)=>{ee.strictEqual(tr.ptr,r);let s=n-Ji+Yi.byteOffset;return tr.onBody(new um(Yi.buffer,s,i))||0},wasm_on_message_complete:r=>(ee.strictEqual(tr.ptr,r),tr.onMessageComplete()||0)}})}var wQ=null,DQ=lZ();DQ.catch();var tr=null,Yi=null,dm=0,Ji=null,uc=1,hm=2,_Q=3,kQ=class{constructor(e,r,{exports:n}){ee(Number.isFinite(e[fm])&&e[fm]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(Gi.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[fm],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[AT]}setTimeout(e,r){this.timeoutType=r,e!==this.timeoutValue?(NQ.clearTimeout(this.timeout),e?(this.timeout=NQ.setTimeout(uZ,e,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(ee(this.ptr!=null),ee(tr==null),this.llhttp.llhttp_resume(this.ptr),ee(this.timeoutType===hm),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||cZ),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){ee(this.ptr!=null),ee(tr==null),ee(!this.paused);let{socket:r,llhttp:n}=this;e.length>dm&&(Ji&&n.free(Ji),dm=Math.ceil(e.length/4096)*4096,Ji=n.malloc(dm)),new Uint8Array(n.memory.buffer,Ji,dm).set(e);try{let i;try{Yi=e,tr=this,i=n.llhttp_execute(this.ptr,Ji,e.length)}catch(o){throw o}finally{tr=null,Yi=null}let s=n.llhttp_get_error_pos(this.ptr)-Ji;if(i===Gi.ERROR.PAUSED_UPGRADE)this.onUpgrade(e.slice(s));else if(i===Gi.ERROR.PAUSED)this.paused=!0,r.unshift(e.slice(s));else if(i!==Gi.ERROR.OK){let o=n.llhttp_get_error_reason(this.ptr),a="";if(o){let A=new Uint8Array(n.memory.buffer,o).indexOf(0);a="Response does not match the HTTP/1.1 protocol ("+B Line truncated
`}function Id(t,e,r,n=!1){if(r&&typeof r=="object"&&!Array.isArray(r))throw new ft(`invalid ${e} header`);if(r===void 0)return;if(t.host===null&&e.length===4&&e.toLowerCase()==="host"){if(OP.exec(r)!==null)throw new ft(`invalid ${e} header`);t.host=r}else if(t.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(t.contentLength=parseInt(r,10),!Number.isFinite(t.contentLength))throw new ft("invalid content-length header")}else if(t.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")t.contentType=r,n?t.headers[e]=Ba(e,r,n):t.headers+=Ba(e,r);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new ft("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof r=="string"?r.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new ft("invalid connection header");i==="close"&&(t.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new ft("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new ft("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new eZ("expect header not supported");if(TP.exec(e)===null)throw new ft("invalid header key");if(Array.isArray(r))for(let i=0;i<r.length;i++)n?t.headers[e]?t.headers[e]+=`,${Ba(e,r[i],n)}`:t.headers[e]=Ba(e,r[i],n):t.headers+=Ba(e,r[i]);else n?t.headers[e]=Ba(e,r,n):t.headers+=Ba(e,r)}}}MP.exports=hQ});var om=h((P_e,FP)=>{"use strict";var sZ=require("events"),gQ=class extends sZ{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};FP.exports=gQ});var Qd=h((T_e,UP)=>{"use strict";var oZ=om(),{ClientDestroyedError:mQ,ClientClosedError:aZ,InvalidArgumentError:ic}=at(),{kDestroy:AZ,kClose:cZ,kDispatch:pQ,kInterceptors:Qa}=pt(),sc=Symbol("destroyed"),Bd=Symbol("closed"),Rs=Symbol("onDestroyed"),oc=Symbol("onClosed"),am=Symbol("Intercepted Dispatch"),yQ=class extends oZ{constructor(){super(),this[sc]=!1,this[Rs]=null,this[Bd]=!1,this[oc]=[]}get destroyed(){return this[sc]}get closed(){return this[Bd]}get interceptors(){return this[Qa]}set interceptors(e){if(e){for(let r=e.length-1;r>=0;r--)if(typeof this[Qa][r]!="function")throw new ic("interceptor must be an function")}this[Qa]=e}close(e){if(e===void 0)return new Promise((n,i)=>{this.close((s,o)=>s?i(s):n(o))});if(typeof e!="function")throw new ic("invalid callback");if(this[sc]){queueMicrotask(()=>e(new mQ,null));return}if(this[Bd]){this[oc]?this[oc].push(e):queueMicrotask(()=>e(null,null));return}this[Bd]=!0,this[oc].push(e);let r=()=>{let n=this[oc];this[oc]=null;for(let i=0;i<n.length;i++)n[i](null,null)};this[cZ]().then(()=>this.destroy()).then(()=>{queueMicrotask(r)})}destroy(e,r){if(typeof e=="function"&&(r=e,e=null),r===void 0)return new Promise((i,s)=>{this.destroy(e,(o,a)=>o?s(o):i(a))});if(typeof r!="function")throw new ic("invalid callback");if(this[sc]){this[Rs]?this[Rs].push(r):queueMicrotask(()=>r(null,null));return}e||(e=new mQ),this[sc]=!0,this[Rs]=this[Rs]||[],this[Rs].push(r);let n=()=>{let i=this[Rs];this[Rs]=null;for(let s=0;s<i.length;s++)i[s](null,null)};this[AZ](e).then(()=>{queueMicrotask(n)})}[am](e,r){if(!this[Qa]||this[Qa].length===0)return this[am]=this[pQ],this[pQ](e,r);let n=this[pQ].bind(this);for(let i=this[Qa].length-1;i>=0;i--)n=this[Qa][i](n);return this[am]=n,n(e,r)}dispatch(e,r){if(!r||typeof r!="object")throw new ic("handler must be an object");try{if(!e||typeof e!="object")throw new ic("opts must be an object.");if(this[sc]||this[Rs])throw new mQ;if(this[Bd])throw new aZ;return this[am](e,r)}catch(n){if(typeof r.onError!="function")throw new ic("invalid onError method");return r.onError(n),!1}}};UP.exports=yQ});var bd=h((L_e,zP)=>{"use strict";var lZ=require("net"),qP=require("assert"),HP=Fe(),{InvalidArgumentError:uZ,ConnectTimeoutError:dZ}=at(),EQ,CQ;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?CQ=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(r=>{if(this._sessionCache.size<this._maxCachedSessions)return;let n=this._sessionCache.get(r);n!==void 0&&n.deref()===void 0&&this._sessionCache.delete(r)})}get(e){let r=this._sessionCache.get(e);return r?r.deref():null}set(e,r){this._maxCachedSessions!==0&&(this._sessionCache.set(e,new WeakRef(r)),this._sessionRegistry.register(r,e))}}:CQ=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map}get(e){return this._sessionCache.get(e)}set(e,r){if(this._maxCachedSessions!==0){if(this._sessionCache.size>=this._maxCachedSessions){let{value:n}=this._sessionCache.keys().next();this._sessionCache.delete(n)}this._sessionCache.set(e,r)}}};function fZ({allowH2:t,maxCachedSessions:e,socketPath:r,timeout:n,...i}){if(e!=null&&(!Number.isInteger(e)||e<0))throw new uZ("maxCachedSessions must be a positive integer or zero");let s={path:r,...i},o=new CQ(e??100);return n=n??1e4,t=t??!1,function({hostname: Line truncated
`,this[oT]=A??3e5,this[sT]=i??3e5,this[Rd]=I??!0,this[zZ]=w,this[Dd]=T,this[Eo]=null,this[AT]=k>-1?k:-1,this[$i]="h1",this[Sn]=null,this[gm]=Se?{openStreams:0,maxConcurrentStreams:H??100}:null,this[cT]=`${this[Br].hostname}${this[Br].port?`:${this[Br].port}`:""}`,this[yt]=[],this[Et]=0,this[xn]=0}get pipelining(){return this[Io]}set pipelining(e){this[Io]=e,vn(this,!0)}get[wa](){return this[yt].length-this[xn]}get[St](){return this[xn]-this[Et]}get[Na](){return this[yt].length-this[Et]}get[HZ](){return!!this[_t]&&!this[Ac]&&!this[_t].destroyed}get[SQ](){let e=this[_t];return e&&(e[Hr]||e[ks]||e[lc])||this[Na]>=(this[Io]||1)||this[wa]>0}[qZ](e){fT(this),this.once("connect",e)}[YZ](e,r){let n=e.origin||this[Br].origin,i=this[$i]==="h2"?xQ[VZ](n,e,r):xQ[$Z](n,e,r);return this[yt].push(i),this[ba]||(Ae.bodyLength(i.body)==null&&Ae.isIterable(i.body)?(this[ba]=1,process.nextTick(vn,this)):vn(this,!0)),this[ba]&&this[Co]!==2&&this[SQ]&&(this[Co]=2),this[Co]<2}async[jZ](){return new Promise(e=>{this[Na]?this[Eo]=e:e(null)})}async[GZ](e){return new Promise(r=>{let n=this[yt].splice(this[xn]);for(let s=0;s<n.length;s++){let o=n[s];zr(this,o,e)}let i=()=>{this[Eo]&&(this[Eo](),this[Eo]=null),r()};this[Sn]!=null&&(Ae.destroy(this[Sn],e),this[Sn]=null,this[gm]=null),this[_t]?Ae.destroy(this[_t].on("close",i),e):queueMicrotask(i),vn(this)})}};function i6(t){ee(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[_t][Qr]=t,Em(this[Wi],t)}function s6(t,e,r){let n=new Vi(`HTTP/2: "frameError" received - type ${t}, code ${e}`);r===0&&(this[_t][Qr]=n,Em(this[Wi],n))}function o6(){Ae.destroy(this,new cc("other side closed")),Ae.destroy(this[_t],new cc("other side closed"))}function a6(t){let e=this[Wi],r=new Vi(`HTTP/2: "GOAWAY" frame received with code ${t}`);if(e[_t]=null,e[Sn]=null,e.destroyed){ee(this[wa]===0);let n=e[yt].splice(e[Et]);for(let i=0;i<n.length;i++){let s=n[i];zr(this,s,r)}}else if(e[St]>0){let n=e[yt][e[Et]];e[yt][e[Et]++]=null,zr(e,n,r)}e[xn]=e[Et],ee(e[St]===0),e.emit("disconnect",e[Br],[e],r),vn(e)}var Gi=GP(),A6=lm(),c6=Buffer.alloc(0);async function l6(){let t=process.env.JEST_WORKER_ID?bQ():void 0,e;try{e=await WebAssembly.compile(Buffer.from(XP(),"base64"))}catch{e=await WebAssembly.compile(Buffer.from(t||bQ(),"base64"))}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,n,i)=>0,wasm_on_status:(r,n,i)=>{ee.strictEqual(tr.ptr,r);let s=n-Ji+Yi.byteOffset;return tr.onStatus(new um(Yi.buffer,s,i))||0},wasm_on_message_begin:r=>(ee.strictEqual(tr.ptr,r),tr.onMessageBegin()||0),wasm_on_header_field:(r,n,i)=>{ee.strictEqual(tr.ptr,r);let s=n-Ji+Yi.byteOffset;return tr.onHeaderField(new um(Yi.buffer,s,i))||0},wasm_on_header_value:(r,n,i)=>{ee.strictEqual(tr.ptr,r);let s=n-Ji+Yi.byteOffset;return tr.onHeaderValue(new um(Yi.buffer,s,i))||0},wasm_on_headers_complete:(r,n,i,s)=>(ee.strictEqual(tr.ptr,r),tr.onHeadersComplete(n,!!i,!!s)||0),wasm_on_body:(r,n,i)=>{ee.strictEqual(tr.ptr,r);let s=n-Ji+Yi.byteOffset;return tr.onBody(new um(Yi.buffer,s,i))||0},wasm_on_message_complete:r=>(ee.strictEqual(tr.ptr,r),tr.onMessageComplete()||0)}})}var wQ=null,DQ=l6();DQ.catch();var tr=null,Yi=null,dm=0,Ji=null,uc=1,hm=2,_Q=3,kQ=class{constructor(e,r,{exports:n}){ee(Number.isFinite(e[fm])&&e[fm]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(Gi.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[fm],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[AT]}setTimeout(e,r){this.timeoutType=r,e!==this.timeoutValue?(NQ.clearTimeout(this.timeout),e?(this.timeout=NQ.setTimeout(u6,e,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(ee(this.ptr!=null),ee(tr==null),this.llhttp.llhttp_resume(this.ptr),ee(this.timeoutType===hm),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||c6),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){ee(this.ptr!=null),ee(tr==null),ee(!this.paused);let{socket:r,llhttp:n}=this;e.length>dm&&(Ji&&n.free(Ji),dm=Math.ceil(e.length/4096)*4096,Ji=n.malloc(dm)),new Uint8Array(n.memory.buffer,Ji,dm).set(e);try{let i;try{Yi=e,tr=this,i=n.llhttp_execute(this.ptr,Ji,e.length)}catch(o){throw o}finally{tr=null,Yi=null}let s=n.llhttp_get_error_pos(this.ptr)-Ji;if(i===Gi.ERROR.PAUSED_UPGRADE)this.onUpgrade(e.slice(s));else if(i===Gi.ERROR.PAUSED)this.paused=!0,r.unshift(e.slice(s));else if(i!==Gi.ERROR.OK){let o=n.llhttp_get_error_reason(this.ptr),a="";if(o){let A=new Uint8Array(n.memory.buffer,o).indexOf(0);a="Response does not match the HTTP/1.1 protocol ("+B Line truncated
`;return typeof s=="string"?g+=`host: ${s}\r
`:g+=t[rT],o?g+=`connection: upgrade\r
upgrade: ${o}\r
@@ -34,7 +34,7 @@ upgrade: ${o}\r
`,"latin1"):(ee(d===null,"no body must not have content length"),f.write(`${g}\r
`,"latin1")),e.onRequestSent()):Ae.isBuffer(r)?(ee(d===r.byteLength,"buffer body must have content length"),f.cork(),f.write(`${g}content-length: ${d}\r
\r
`,"latin1"),f.write(r),f.uncork(),e.onBodySent(r),e.onRequestSent(),l||(f[Hr]=!0)):Ae.isBlobLike(r)?typeof r.stream=="function"?pm({body:r.stream(),client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):mT({body:r,client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):Ae.isStream(r)?gT({body:r,client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):Ae.isIterable(r)?pm({body:r,client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):ee(!1),!0}function hZ(t,e,r){let{body:n,method:i,path:s,host:o,upgrade:a,expectContinue:A,signal:c,headers:l}=r,u;if(typeof l=="string"?u=xQ[W6](l.trim()):u=l,a)return zr(t,r,new Error("Upgrade not supported for H2")),!1;try{r.onConnect(I=>{r.aborted||r.completed||zr(t,r,I||new TQ)})}catch(I){zr(t,r,I)}if(r.aborted)return!1;let d,f=t[gm];if(u[K6]=o||t[cT],u[X6]=i,i==="CONNECT")return e.ref(),d=e.request(u,{endStream:!1,signal:c}),d.id&&!d.pending?(r.onUpgrade(null,null,d),++f.openStreams):d.once("ready",()=>{r.onUpgrade(null,null,d),++f.openStreams}),d.once("close",()=>{f.openStreams-=1,f.openStreams===0&&e.unref()}),!0;u[Z6]=s,u[eZ]="https";let g=i==="PUT"||i==="POST"||i==="PATCH";n&&typeof n.read=="function"&&n.read(0);let m=Ae.bodyLength(n);if(m==null&&(m=r.contentLength),(m===0||!g)&&(m=null),hT(i)&&m>0&&r.contentLength!=null&&r.contentLength!==m){if(t[Rd])return zr(t,r,new _s),!1;process.emitWarning(new _s)}m!=null&&(ee(n,"no body must not have content length"),u[tZ]=`${m}`),e.ref();let E=i==="GET"||i==="HEAD";return A?(u[rZ]="100-continue",d=e.request(u,{endStream:E,signal:c}),d.once("continue",C)):(d=e.request(u,{endStream:E,signal:c}),C()),++f.openStreams,d.once("response",I=>{let{[nZ]:b,...w}=I;r.onHeaders(Number(b),w,d.resume.bind(d),"")===!1&&d.pause()}),d.once("end",()=>{r.onComplete([])}),d.on("data",I=>{r.onData(I)===!1&&d.pause()}),d.once("close",()=>{f.openStreams-=1,f.openStreams===0&&e.unref()}),d.once("error",function(I){t[Sn]&&!t[Sn].destroyed&&!this.closed&&!this.destroyed&&(f.streams-=1,Ae.destroy(d,I))}),d.once("frameError",(I,b)=>{let w=new Vi(`HTTP/2: "frameError" received - type ${I}, code ${b}`);zr(t,r,w),t[Sn]&&!t[Sn].destroyed&&!this.closed&&!this.destroyed&&(f.streams-=1,Ae.destroy(d,w))}),!0;function C(){n?Ae.isBuffer(n)?(ee(m===n.byteLength,"buffer body must have content length"),d.cork(),d.write(n),d.uncork(),d.end(),r.onBodySent(n),r.onRequestSent()):Ae.isBlobLike(n)?typeof n.stream=="function"?pm({client:t,request:r,contentLength:m,h2stream:d,expectsPayload:g,body:n.stream(),socket:t[_t],header:""}):mT({body:n,client:t,request:r,contentLength:m,expectsPayload:g,h2stream:d,header:"",socket:t[_t]}):Ae.isStream(n)?gT({body:n,client:t,request:r,contentLength:m,expectsPayload:g,socket:t[_t],h2stream:d,header:""}):Ae.isIterable(n)?pm({body:n,client:t,request:r,contentLength:m,expectsPayload:g,header:"",h2stream:d,socket:t[_t]}):ee(!1):r.onRequestSent()}}function gT({h2stream:t,body:e,client:r,request:n,socket:i,contentLength:s,header:o,expectsPayload:a}){if(ee(s!==0||r[St]===0,"stream body cannot be pipelined"),r[$i]==="h2"){let m=function(E){n.onBodySent(E)},g=D6(e,t,E=>{E?(Ae.destroy(e,E),Ae.destroy(t,E)):n.onRequestSent()});g.on("data",m),g.once("end",()=>{g.removeListener("data",m),Ae.destroy(g)});return}let A=!1,c=new ym({socket:i,request:n,contentLength:s,client:r,expectsPayload:a,header:o}),l=function(g){if(!A)try{!c.write(g)&&this.pause&&this.pause()}catch(m){Ae.destroy(this,m)}},u=function(){A||e.resume&&e.resume()},d=function(){if(A)return;let g=new TQ;queueMicrotask(()=>f(g))},f=function(g){if(!A){if(A=!0,ee(i.destroyed||i[ks]&&r[St]<=1),i.off("drain",u).off("error",f),e.removeListener("data",l).removeListener("end",f).removeListener("error",f).removeListener("close",d),!g)try{c.end()}catch(m){g=m}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?Ae.destroy(e,g):Ae.destroy(e)}};e.on("data",l).on("end",f).on("error",f).on("close",d),e.resume&&e.resume(),i.on("drain",u).on("error",f)}async function mT({h2stream:t,body:e,client:r,request:n,socket:i,contentLength:s,header:o,expectsPayload:a}){ee(s===e.size,"blob body must have content length");let A=r[$i]==="h2";try{if(s!=null&&s!==e.size)throw new _s;let c=Buffer.from(await e.arrayBuffer());A?(t.cork(),t.write(c),t.uncork()):(i.cork(),i.write(`${o}content-length: ${s}\r
`,"latin1"),f.write(r),f.uncork(),e.onBodySent(r),e.onRequestSent(),l||(f[Hr]=!0)):Ae.isBlobLike(r)?typeof r.stream=="function"?pm({body:r.stream(),client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):mT({body:r,client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):Ae.isStream(r)?gT({body:r,client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):Ae.isIterable(r)?pm({body:r,client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):ee(!1),!0}function h6(t,e,r){let{body:n,method:i,path:s,host:o,upgrade:a,expectContinue:A,signal:c,headers:l}=r,u;if(typeof l=="string"?u=xQ[WZ](l.trim()):u=l,a)return zr(t,r,new Error("Upgrade not supported for H2")),!1;try{r.onConnect(I=>{r.aborted||r.completed||zr(t,r,I||new TQ)})}catch(I){zr(t,r,I)}if(r.aborted)return!1;let d,f=t[gm];if(u[KZ]=o||t[cT],u[XZ]=i,i==="CONNECT")return e.ref(),d=e.request(u,{endStream:!1,signal:c}),d.id&&!d.pending?(r.onUpgrade(null,null,d),++f.openStreams):d.once("ready",()=>{r.onUpgrade(null,null,d),++f.openStreams}),d.once("close",()=>{f.openStreams-=1,f.openStreams===0&&e.unref()}),!0;u[ZZ]=s,u[e6]="https";let g=i==="PUT"||i==="POST"||i==="PATCH";n&&typeof n.read=="function"&&n.read(0);let m=Ae.bodyLength(n);if(m==null&&(m=r.contentLength),(m===0||!g)&&(m=null),hT(i)&&m>0&&r.contentLength!=null&&r.contentLength!==m){if(t[Rd])return zr(t,r,new _s),!1;process.emitWarning(new _s)}m!=null&&(ee(n,"no body must not have content length"),u[t6]=`${m}`),e.ref();let E=i==="GET"||i==="HEAD";return A?(u[r6]="100-continue",d=e.request(u,{endStream:E,signal:c}),d.once("continue",C)):(d=e.request(u,{endStream:E,signal:c}),C()),++f.openStreams,d.once("response",I=>{let{[n6]:b,...w}=I;r.onHeaders(Number(b),w,d.resume.bind(d),"")===!1&&d.pause()}),d.once("end",()=>{r.onComplete([])}),d.on("data",I=>{r.onData(I)===!1&&d.pause()}),d.once("close",()=>{f.openStreams-=1,f.openStreams===0&&e.unref()}),d.once("error",function(I){t[Sn]&&!t[Sn].destroyed&&!this.closed&&!this.destroyed&&(f.streams-=1,Ae.destroy(d,I))}),d.once("frameError",(I,b)=>{let w=new Vi(`HTTP/2: "frameError" received - type ${I}, code ${b}`);zr(t,r,w),t[Sn]&&!t[Sn].destroyed&&!this.closed&&!this.destroyed&&(f.streams-=1,Ae.destroy(d,w))}),!0;function C(){n?Ae.isBuffer(n)?(ee(m===n.byteLength,"buffer body must have content length"),d.cork(),d.write(n),d.uncork(),d.end(),r.onBodySent(n),r.onRequestSent()):Ae.isBlobLike(n)?typeof n.stream=="function"?pm({client:t,request:r,contentLength:m,h2stream:d,expectsPayload:g,body:n.stream(),socket:t[_t],header:""}):mT({body:n,client:t,request:r,contentLength:m,expectsPayload:g,h2stream:d,header:"",socket:t[_t]}):Ae.isStream(n)?gT({body:n,client:t,request:r,contentLength:m,expectsPayload:g,socket:t[_t],h2stream:d,header:""}):Ae.isIterable(n)?pm({body:n,client:t,request:r,contentLength:m,expectsPayload:g,header:"",h2stream:d,socket:t[_t]}):ee(!1):r.onRequestSent()}}function gT({h2stream:t,body:e,client:r,request:n,socket:i,contentLength:s,header:o,expectsPayload:a}){if(ee(s!==0||r[St]===0,"stream body cannot be pipelined"),r[$i]==="h2"){let m=function(E){n.onBodySent(E)},g=DZ(e,t,E=>{E?(Ae.destroy(e,E),Ae.destroy(t,E)):n.onRequestSent()});g.on("data",m),g.once("end",()=>{g.removeListener("data",m),Ae.destroy(g)});return}let A=!1,c=new ym({socket:i,request:n,contentLength:s,client:r,expectsPayload:a,header:o}),l=function(g){if(!A)try{!c.write(g)&&this.pause&&this.pause()}catch(m){Ae.destroy(this,m)}},u=function(){A||e.resume&&e.resume()},d=function(){if(A)return;let g=new TQ;queueMicrotask(()=>f(g))},f=function(g){if(!A){if(A=!0,ee(i.destroyed||i[ks]&&r[St]<=1),i.off("drain",u).off("error",f),e.removeListener("data",l).removeListener("end",f).removeListener("error",f).removeListener("close",d),!g)try{c.end()}catch(m){g=m}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?Ae.destroy(e,g):Ae.destroy(e)}};e.on("data",l).on("end",f).on("error",f).on("close",d),e.resume&&e.resume(),i.on("drain",u).on("error",f)}async function mT({h2stream:t,body:e,client:r,request:n,socket:i,contentLength:s,header:o,expectsPayload:a}){ee(s===e.size,"blob body must have content length");let A=r[$i]==="h2";try{if(s!=null&&s!==e.size)throw new _s;let c=Buffer.from(await e.arrayBuffer());A?(t.cork(),t.write(c),t.uncork()):(i.cork(),i.write(`${o}content-length: ${s}\r
\r
`,"latin1"),i.write(c),i.uncork()),n.onBodySent(c),n.onRequestSent(),a||(i[Hr]=!0),vn(r)}catch(c){Ae.destroy(A?t:i,c)}}async function pm({h2stream:t,body:e,client:r,request:n,socket:i,contentLength:s,header:o,expectsPayload:a}){ee(s!==0||r[St]===0,"iterator body cannot be pipelined");let A=null;function c(){if(A){let d=A;A=null,d()}}let l=()=>new Promise((d,f)=>{ee(A===null),i[Qr]?f(i[Qr]):A=d});if(r[$i]==="h2"){t.on("close",c).on("drain",c);try{for await(let d of e){if(i[Qr])throw i[Qr];let f=t.write(d);n.onBodySent(d),f||await l()}}catch(d){t.destroy(d)}finally{n.onRequestSent(),t.end(),t.off("close",c).off("drain",c)}return}i.on("close",c).on("drain",c);let u=new ym({socket:i,request:n,contentLength:s,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(i[Qr])throw i[Qr];u.write(d)||await l()}u.end()}catch(d){u.destroy(d)}finally{i.off("close",c).off("drain",c)}}var ym=class{constructor({socket:e,request:r,contentLength:n,client:i,expectsPayload:s,header:o}){this.socket=e,this.request=r,this.contentLength=n,this.client=i,this.bytesWritten=0,this.expectsPayload=s,this.header=o,e[ks]=!0}write(e){let{socket:r,request:n,contentLength:i,client:s,bytesWritten:o,expectsPayload:a,header:A}=this;if(r[Qr])throw r[Qr];if(r.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(i!==null&&o+c>i){if(s[Rd])throw new _s;process.emitWarning(new _s)}r.cork(),o===0&&(a||(r[Hr]=!0),i===null?r.write(`${A}transfer-encoding: chunked\r
`,"latin1"):r.write(`${A}content-length: ${i}\r
@@ -47,7 +47,7 @@ ${c.toString(16)}\r
`,"latin1"):r===null&&e.write(`\r
0\r
\r
`,"latin1"),r!==null&&i!==r){if(n[Rd])throw new _s;process.emitWarning(new _s)}e[Dt].timeout&&e[Dt].timeoutType===uc&&e[Dt].timeout.refresh&&e[Dt].timeout.refresh(),vn(n)}}destroy(e){let{socket:r,client:n}=this;r[ks]=!1,e&&(ee(n[St]<=1,"pipeline should only contain this request"),Ae.destroy(r,e))}};function zr(t,e,r){try{e.onError(r),ee(e.aborted)}catch(n){t.emit("error",n)}}pT.exports=RQ});var ET=h((J_e,yT)=>{"use strict";var Cm=class{constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};yT.exports=class{constructor(){this.head=this.tail=new Cm}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new Cm),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var IT=h((V_e,CT)=>{var{kFree:gZ,kConnected:mZ,kPending:pZ,kQueued:yZ,kRunning:EZ,kSize:CZ}=pt(),xa=Symbol("pool"),OQ=class{constructor(e){this[xa]=e}get connected(){return this[xa][mZ]}get free(){return this[xa][gZ]}get pending(){return this[xa][pZ]}get queued(){return this[xa][yZ]}get running(){return this[xa][EZ]}get size(){return this[xa][CZ]}};CT.exports=OQ});var HQ=h((W_e,DT)=>{"use strict";var IZ=Qd(),BZ=ET(),{kConnected:MQ,kSize:BT,kRunning:QT,kPending:bT,kQueued:kd,kBusy:QZ,kFree:bZ,kUrl:NZ,kClose:wZ,kDestroy:xZ,kDispatch:SZ}=pt(),vZ=IT(),Zr=Symbol("clients"),jr=Symbol("needDrain"),Pd=Symbol("queue"),LQ=Symbol("closed resolve"),FQ=Symbol("onDrain"),NT=Symbol("onConnect"),wT=Symbol("onDisconnect"),xT=Symbol("onConnectionError"),UQ=Symbol("get dispatcher"),vT=Symbol("add client"),RT=Symbol("remove client"),ST=Symbol("stats"),qQ=class extends IZ{constructor(){super(),this[Pd]=new BZ,this[Zr]=[],this[kd]=0;let e=this;this[FQ]=function(n,i){let s=e[Pd],o=!1;for(;!o;){let a=s.shift();if(!a)break;e[kd]--,o=!this.dispatch(a.opts,a.handler)}this[jr]=o,!this[jr]&&e[jr]&&(e[jr]=!1,e.emit("drain",n,[e,...i])),e[LQ]&&s.isEmpty()&&Promise.all(e[Zr].map(a=>a.close())).then(e[LQ])},this[NT]=(r,n)=>{e.emit("connect",r,[e,...n])},this[wT]=(r,n,i)=>{e.emit("disconnect",r,[e,...n],i)},this[xT]=(r,n,i)=>{e.emit("connectionError",r,[e,...n],i)},this[ST]=new vZ(this)}get[QZ](){return this[jr]}get[MQ](){return this[Zr].filter(e=>e[MQ]).length}get[bZ](){return this[Zr].filter(e=>e[MQ]&&!e[jr]).length}get[bT](){let e=this[kd];for(let{[bT]:r}of this[Zr])e+=r;return e}get[QT](){let e=0;for(let{[QT]:r}of this[Zr])e+=r;return e}get[BT](){let e=this[kd];for(let{[BT]:r}of this[Zr])e+=r;return e}get stats(){return this[ST]}async[wZ](){return this[Pd].isEmpty()?Promise.all(this[Zr].map(e=>e.close())):new Promise(e=>{this[LQ]=e})}async[xZ](e){for(;;){let r=this[Pd].shift();if(!r)break;r.handler.onError(e)}return Promise.all(this[Zr].map(r=>r.destroy(e)))}[SZ](e,r){let n=this[UQ]();return n?n.dispatch(e,r)||(n[jr]=!0,this[jr]=!this[UQ]()):(this[jr]=!0,this[Pd].push({opts:e,handler:r}),this[kd]++),!this[jr]}[vT](e){return e.on("drain",this[FQ]).on("connect",this[NT]).on("disconnect",this[wT]).on("connectionError",this[xT]),this[Zr].push(e),this[jr]&&process.nextTick(()=>{this[jr]&&this[FQ](e[NZ],[this,e])}),this}[RT](e){e.close(()=>{let r=this[Zr].indexOf(e);r!==-1&&this[Zr].splice(r,1)}),this[jr]=this[Zr].some(r=>!r[jr]&&r.closed!==!0&&r.destroyed!==!0)}};DT.exports={PoolBase:qQ,kClients:Zr,kNeedDrain:jr,kAddClient:vT,kRemoveClient:RT,kGetDispatcher:UQ}});var dc=h(($_e,PT)=>{"use strict";var{PoolBase:RZ,kClients:Im,kNeedDrain:DZ,kAddClient:_Z,kGetDispatcher:kZ}=HQ(),PZ=_d(),{InvalidArgumentError:zQ}=at(),jQ=Fe(),{kUrl:_T,kInterceptors:TZ}=pt(),OZ=bd(),GQ=Symbol("options"),YQ=Symbol("connections"),kT=Symbol("factory");function MZ(t,e){return new PZ(t,e)}var JQ=class extends RZ{constructor(e,{connections:r,factory:n=MZ,connect:i,connectTimeout:s,tls:o,maxCachedSessions:a,socketPath:A,autoSelectFamily:c,autoSelectFamilyAttemptTimeout:l,allowH2:u,...d}={}){if(super(),r!=null&&(!Number.isFinite(r)||r<0))throw new zQ("invalid connections");if(typeof n!="function")throw new zQ("factory must be a function.");if(i!=null&&typeof i!="function"&&typeof i!="object")throw new zQ("connect must be a function or an object");typeof i!="function"&&(i=OZ({...o,maxCachedSessions:a,allowH2:u,socketPath:A,timeout:s,...jQ.nodeHasAutoSelectFamily&&c?{autoSelectFamily:c,autoSelectFamilyAttemptTimeout:l}:void 0,...i})),this[TZ]=d.interceptors&&d.interceptors.Pool&&Array.isArray(d.interceptors.Pool)?d.interceptors.Pool:[],this[YQ]=r||null,this[_T]=jQ.parseOrigin(e),this[GQ]={...jQ.deepClone(d),connect:i,allowH2:u},this[GQ].interceptors=d.interceptors?{...d.interceptors}:void 0,this[kT]=n,this.on("connectionError",(f,g,m)=>{for(let E of g){let C=this[Im].indexOf(E);C!==-1&&this[Im].splice(C,1)}})}[kZ](){let e=this[Im].fin Line truncated
`,"latin1"),r!==null&&i!==r){if(n[Rd])throw new _s;process.emitWarning(new _s)}e[Dt].timeout&&e[Dt].timeoutType===uc&&e[Dt].timeout.refresh&&e[Dt].timeout.refresh(),vn(n)}}destroy(e){let{socket:r,client:n}=this;r[ks]=!1,e&&(ee(n[St]<=1,"pipeline should only contain this request"),Ae.destroy(r,e))}};function zr(t,e,r){try{e.onError(r),ee(e.aborted)}catch(n){t.emit("error",n)}}pT.exports=RQ});var ET=h((J_e,yT)=>{"use strict";var Cm=class{constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};yT.exports=class{constructor(){this.head=this.tail=new Cm}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new Cm),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var IT=h((V_e,CT)=>{var{kFree:g6,kConnected:m6,kPending:p6,kQueued:y6,kRunning:E6,kSize:C6}=pt(),xa=Symbol("pool"),OQ=class{constructor(e){this[xa]=e}get connected(){return this[xa][m6]}get free(){return this[xa][g6]}get pending(){return this[xa][p6]}get queued(){return this[xa][y6]}get running(){return this[xa][E6]}get size(){return this[xa][C6]}};CT.exports=OQ});var HQ=h((W_e,DT)=>{"use strict";var I6=Qd(),B6=ET(),{kConnected:MQ,kSize:BT,kRunning:QT,kPending:bT,kQueued:kd,kBusy:Q6,kFree:b6,kUrl:N6,kClose:w6,kDestroy:x6,kDispatch:S6}=pt(),v6=IT(),Zr=Symbol("clients"),jr=Symbol("needDrain"),Pd=Symbol("queue"),LQ=Symbol("closed resolve"),FQ=Symbol("onDrain"),NT=Symbol("onConnect"),wT=Symbol("onDisconnect"),xT=Symbol("onConnectionError"),UQ=Symbol("get dispatcher"),vT=Symbol("add client"),RT=Symbol("remove client"),ST=Symbol("stats"),qQ=class extends I6{constructor(){super(),this[Pd]=new B6,this[Zr]=[],this[kd]=0;let e=this;this[FQ]=function(n,i){let s=e[Pd],o=!1;for(;!o;){let a=s.shift();if(!a)break;e[kd]--,o=!this.dispatch(a.opts,a.handler)}this[jr]=o,!this[jr]&&e[jr]&&(e[jr]=!1,e.emit("drain",n,[e,...i])),e[LQ]&&s.isEmpty()&&Promise.all(e[Zr].map(a=>a.close())).then(e[LQ])},this[NT]=(r,n)=>{e.emit("connect",r,[e,...n])},this[wT]=(r,n,i)=>{e.emit("disconnect",r,[e,...n],i)},this[xT]=(r,n,i)=>{e.emit("connectionError",r,[e,...n],i)},this[ST]=new v6(this)}get[Q6](){return this[jr]}get[MQ](){return this[Zr].filter(e=>e[MQ]).length}get[b6](){return this[Zr].filter(e=>e[MQ]&&!e[jr]).length}get[bT](){let e=this[kd];for(let{[bT]:r}of this[Zr])e+=r;return e}get[QT](){let e=0;for(let{[QT]:r}of this[Zr])e+=r;return e}get[BT](){let e=this[kd];for(let{[BT]:r}of this[Zr])e+=r;return e}get stats(){return this[ST]}async[w6](){return this[Pd].isEmpty()?Promise.all(this[Zr].map(e=>e.close())):new Promise(e=>{this[LQ]=e})}async[x6](e){for(;;){let r=this[Pd].shift();if(!r)break;r.handler.onError(e)}return Promise.all(this[Zr].map(r=>r.destroy(e)))}[S6](e,r){let n=this[UQ]();return n?n.dispatch(e,r)||(n[jr]=!0,this[jr]=!this[UQ]()):(this[jr]=!0,this[Pd].push({opts:e,handler:r}),this[kd]++),!this[jr]}[vT](e){return e.on("drain",this[FQ]).on("connect",this[NT]).on("disconnect",this[wT]).on("connectionError",this[xT]),this[Zr].push(e),this[jr]&&process.nextTick(()=>{this[jr]&&this[FQ](e[N6],[this,e])}),this}[RT](e){e.close(()=>{let r=this[Zr].indexOf(e);r!==-1&&this[Zr].splice(r,1)}),this[jr]=this[Zr].some(r=>!r[jr]&&r.closed!==!0&&r.destroyed!==!0)}};DT.exports={PoolBase:qQ,kClients:Zr,kNeedDrain:jr,kAddClient:vT,kRemoveClient:RT,kGetDispatcher:UQ}});var dc=h(($_e,PT)=>{"use strict";var{PoolBase:R6,kClients:Im,kNeedDrain:D6,kAddClient:_6,kGetDispatcher:k6}=HQ(),P6=_d(),{InvalidArgumentError:zQ}=at(),jQ=Fe(),{kUrl:_T,kInterceptors:T6}=pt(),O6=bd(),GQ=Symbol("options"),YQ=Symbol("connections"),kT=Symbol("factory");function M6(t,e){return new P6(t,e)}var JQ=class extends R6{constructor(e,{connections:r,factory:n=M6,connect:i,connectTimeout:s,tls:o,maxCachedSessions:a,socketPath:A,autoSelectFamily:c,autoSelectFamilyAttemptTimeout:l,allowH2:u,...d}={}){if(super(),r!=null&&(!Number.isFinite(r)||r<0))throw new zQ("invalid connections");if(typeof n!="function")throw new zQ("factory must be a function.");if(i!=null&&typeof i!="function"&&typeof i!="object")throw new zQ("connect must be a function or an object");typeof i!="function"&&(i=O6({...o,maxCachedSessions:a,allowH2:u,socketPath:A,timeout:s,...jQ.nodeHasAutoSelectFamily&&c?{autoSelectFamily:c,autoSelectFamilyAttemptTimeout:l}:void 0,...i})),this[T6]=d.interceptors&&d.interceptors.Pool&&Array.isArray(d.interceptors.Pool)?d.interceptors.Pool:[],this[YQ]=r||null,this[_T]=jQ.parseOrigin(e),this[GQ]={...jQ.deepClone(d),connect:i,allowH2:u},this[GQ].interceptors=d.interceptors?{...d.interceptors}:void 0,this[kT]=n,this.on("connectionError",(f,g,m)=>{for(let E of g){let C=this[Im].indexOf(E);C!==-1&&this[Im].splice(C,1)}})}[k6](){let e=this[Im].fin Line truncated
${n.count} ${n.noun} ${n.is} pending:
${e.format(r)}
@@ -260,7 +260,7 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
`,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",s=[];if(i&&r.sep&&!r.value){let o=[];for(let a=0;a<r.sep.length;++a){let A=r.sep[a];switch(A.type){case"newline":o.push(a);break;case"space":break;case"comment":A.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(s=r.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||r.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):i||r.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(wA(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(a9(r.key)&&!wA(r.sep,"newline")){let o=rd(r.start),a=r.key,A=r.sep;A.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:A}]})}else s.length>0?r.sep=r.sep.concat(s,this.sourceToken):r.sep.push(this.sourceToken);else if(wA(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let o=rd(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):wA(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);i||r.value?(e.items.push({start:s,key:o,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(o):(Object.assign(r,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){n&&o.type!=="block-seq"&&e.items.push({start:s}),this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||wA(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n&&n.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"singl Line truncated
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
`,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=rB(e),n=rd(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=rB(e),n=rd(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};A9.Parser=f_});var f9=h(vg=>{"use strict";var c9=e_(),cRe=Cg(),Sg=Qg(),lRe=XR(),uRe=qe(),dRe=d_(),l9=h_();function u9(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new dRe.LineCounter||null,prettyErrors:e}}function fRe(t,e={}){let{lineCounter:r,prettyErrors:n}=u9(e),i=new l9.Parser(r?.addNewLine),s=new c9.Composer(e),o=Array.from(s.compose(i.parse(t)));if(n&&r)for(let a of o)a.errors.forEach(Sg.prettifyError(t,r)),a.warnings.forEach(Sg.prettifyError(t,r));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function d9(t,e={}){let{lineCounter:r,prettyErrors:n}=u9(e),i=new l9.Parser(r?.addNewLine),s=new c9.Composer(e),o=null;for(let a of s.compose(i.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Sg.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(o.errors.forEach(Sg.prettifyError(t,r)),o.warnings.forEach(Sg.prettifyError(t,r))),o}function hRe(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);let i=d9(t,r);if(!i)return null;if(i.warnings.forEach(s=>lRe.warn(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},r))}function gRe(t,e,r){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let i=Math.round(r);r=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){let{keepUndefined:i}=r??e??{};if(!i)return}return uRe.isDocument(t)&&!n?t.toString(r):new cRe.Document(t,n,r).toString(r)}vg.parse=hRe;vg.parseAllDocuments=fRe;vg.parseDocument=d9;vg.stringify=gRe});var m_=h(et=>{"use strict";var mRe=e_(),pRe=Cg(),yRe=PD(),g_=Qg(),ERe=ng(),ha=qe(),CRe=la(),IRe=er(),BRe=da(),QRe=fa(),bRe=eB(),NRe=l_(),wRe=d_(),xRe=h_(),nB=f9(),h9=Zh();et.Composer=mRe.Composer;et.Document=pRe.Document;et.Schema=yRe.Schema;et.YAMLError=g_.YAMLError;et.YAMLParseError=g_.YAMLParseError;et.YAMLWarning=g_.YAMLWarning;et.Alias=ERe.Alias;et.isAlias=ha.isAlias;et.isCollection=ha.isCollection;et.isDocument=ha.isDocument;et.isMap=ha.isMap;et.isNode=ha.isNode;et.isPair=ha.isPair;et.isScalar=ha.isScalar;et.isSeq=ha.isSeq;et.Pair=CRe.Pair;et.Scalar=IRe.Scalar;et.YAMLMap=BRe.YAMLMap;et.YAMLSeq=QRe.YAMLSeq;et.CST=bRe;et.Lexer=NRe.Lexer;et.LineCounter=wRe.LineCounter;et.Parser=xRe.Parser;et.parse=nB.parse;et.parseAllDocuments=nB.parseAllDocuments;et.parseDocument=nB.parseDocument;et.stringify=nB.stringify;et.visit=h9.visit;et.visitAsync=h9.visitAsync});var ya=xt(ot());var d4=xt(ZC()),Yu=xt(ot());var a4=xt(ZC()),Ci=xt(ot()),A4=xt(tf()),c4=xt(o4()),l4=xt(require("os"));async function u4(t){let e=await GNe();(0,Ci.saveState)("cache_path",e);let r=await(0,c4.hashFiles)(t.cacheDependencyPath);if(!r)throw new Error("Some specified paths were not resolved, unable to cache dependencies.");let n=`pnpm-cache-${process.env.RUNNER_OS}-${l4.default.arch()}-${r}`;(0,Ci.debug)(`Primary key is ${n}`),(0,Ci.saveState)("cache_primary_key",n);let i=await(0,a4.restoreCache)([e],n);if((0,Ci.setOutput)("cache-hit",!!i),!i){(0,Ci.info)("Cache is not found");return}(0,Ci.saveState)("cache_restored_key",i),(0,Ci.info)(`Cache restored from key: ${i}`)}async function GNe(){let{stdout:t}=await(0,A4.getExecOutput)("pnpm store path --silent"),e=t.trim();return(0,Ci.debug)(`Cache folLine truncated
`,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=rB(e),n=rd(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=rB(e),n=rd(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};A9.Parser=f_});var f9=h(vg=>{"use strict";var c9=e_(),cRe=Cg(),Sg=Qg(),lRe=XR(),uRe=qe(),dRe=d_(),l9=h_();function u9(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new dRe.LineCounter||null,prettyErrors:e}}function fRe(t,e={}){let{lineCounter:r,prettyErrors:n}=u9(e),i=new l9.Parser(r?.addNewLine),s=new c9.Composer(e),o=Array.from(s.compose(i.parse(t)));if(n&&r)for(let a of o)a.errors.forEach(Sg.prettifyError(t,r)),a.warnings.forEach(Sg.prettifyError(t,r));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function d9(t,e={}){let{lineCounter:r,prettyErrors:n}=u9(e),i=new l9.Parser(r?.addNewLine),s=new c9.Composer(e),o=null;for(let a of s.compose(i.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Sg.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(o.errors.forEach(Sg.prettifyError(t,r)),o.warnings.forEach(Sg.prettifyError(t,r))),o}function hRe(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);let i=d9(t,r);if(!i)return null;if(i.warnings.forEach(s=>lRe.warn(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},r))}function gRe(t,e,r){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let i=Math.round(r);r=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){let{keepUndefined:i}=r??e??{};if(!i)return}return uRe.isDocument(t)&&!n?t.toString(r):new cRe.Document(t,n,r).toString(r)}vg.parse=hRe;vg.parseAllDocuments=fRe;vg.parseDocument=d9;vg.stringify=gRe});var m_=h(et=>{"use strict";var mRe=e_(),pRe=Cg(),yRe=PD(),g_=Qg(),ERe=ng(),ha=qe(),CRe=la(),IRe=er(),BRe=da(),QRe=fa(),bRe=eB(),NRe=l_(),wRe=d_(),xRe=h_(),nB=f9(),h9=Zh();et.Composer=mRe.Composer;et.Document=pRe.Document;et.Schema=yRe.Schema;et.YAMLError=g_.YAMLError;et.YAMLParseError=g_.YAMLParseError;et.YAMLWarning=g_.YAMLWarning;et.Alias=ERe.Alias;et.isAlias=ha.isAlias;et.isCollection=ha.isCollection;et.isDocument=ha.isDocument;et.isMap=ha.isMap;et.isNode=ha.isNode;et.isPair=ha.isPair;et.isScalar=ha.isScalar;et.isSeq=ha.isSeq;et.Pair=CRe.Pair;et.Scalar=IRe.Scalar;et.YAMLMap=BRe.YAMLMap;et.YAMLSeq=QRe.YAMLSeq;et.CST=bRe;et.Lexer=NRe.Lexer;et.LineCounter=wRe.LineCounter;et.Parser=xRe.Parser;et.parse=nB.parse;et.parseAllDocuments=nB.parseAllDocuments;et.parseDocument=nB.parseDocument;et.stringify=nB.stringify;et.visit=h9.visit;et.visitAsync=h9.visitAsync});var ya=xt(ot());var d4=xt(ZC()),Yu=xt(ot());var a4=xt(ZC()),Ci=xt(ot()),A4=xt(tf()),c4=xt(o4()),l4=xt(require("os"));async function u4(t){let e=await GNe();(0,Ci.saveState)("cache_path",e);let r=await(0,c4.hashFiles)(t.cacheDependencyPath);if(!r)throw new Error("Some specified paths were not resolved, unable to cache dependencies.");let n=`pnpm-cache-${process.env.RUNNER_OS}-${l4.default.arch()}-${r}`;(0,Ci.debug)(`Primary key is ${n}`),(0,Ci.saveState)("cache_primary_key",n);let i=await(0,a4.restoreCache)([e],n);if((0,Ci.setOutput)("cache-hit",!!i),!i){(0,Ci.info)("Cache is not found");return}(0,Ci.saveState)("cache_restored_key",i),(0,Ci.info)(`Cache restored from key: ${i}`)}async function GNe(){let{stdout:t}=await(0,A4.getExecOutput)("pnpm store path --silent"),e=t.trim();return(0,Ci.debug)(`Cache folLine truncated
- version ${e} in the GitHub Action config with the key "version"
- version ${i} in the package.json with the key "packageManager"
Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`);return e}if(s?.packageManager?.name==="pnpm"&&s.packageManager.version)return s.packageManager.version;if(o)return o;throw n?new Error(`No pnpm version is specified.