UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

8 lines 1.18 MB
"use strict";var La=Object.create,WI=Object.defineProperty,Ja=Object.getOwnPropertyDescriptor,Ka=Object.getOwnPropertyNames,Ha=Object.getPrototypeOf,Ya=Object.prototype.hasOwnProperty,ba=(I,A)=>()=>(I&&(A=I(I=0)),A),m=(I,A)=>()=>(A||I((A={exports:{}}).exports,A),A.exports),KQ=(I,A)=>{for(var e in A)WI(I,e,{get:A[e],enumerable:!0})},HQ=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of Ka(A))!Ya.call(I,C)&&C!==e&&WI(I,C,{get:()=>A[C],enumerable:!(g=Ja(A,C))||g.enumerable});return I},YQ=(I,A,e)=>(e=I!=null?La(Ha(I)):{},HQ(A||!I||!I.__esModule?WI(e,"default",{value:I,enumerable:!0}):e,I)),mA=I=>HQ(WI({},"__esModule",{value:!0}),I),ZQ=m((Yy,WQ)=>{"use strict";var ZI=Object.defineProperty,xa=Object.getOwnPropertyDescriptor,va=Object.getOwnPropertyNames,Ta=Object.prototype.hasOwnProperty,_I=(I,A)=>ZI(I,"name",{value:A,configurable:!0}),Pa=(I,A)=>{for(var e in A)ZI(I,e,{get:A[e],enumerable:!0})},Oa=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of va(A))!Ta.call(I,C)&&C!==e&&ZI(I,C,{get:()=>A[C],enumerable:!(g=xa(A,C))||g.enumerable});return I},qa=I=>Oa(ZI({},"__esModule",{value:!0}),I),bQ={};Pa(bQ,{AlgorithmId:()=>PQ,EndpointURLScheme:()=>TQ,FieldPosition:()=>OQ,HttpApiKeyAuthLocation:()=>vQ,HttpAuthLocation:()=>xQ,IniSectionType:()=>qQ,RequestHandlerProtocol:()=>VQ,SMITHY_CONTEXT_KEY:()=>Xa,getDefaultClientConfiguration:()=>Za,resolveDefaultRuntimeConfig:()=>_a}),WQ.exports=qa(bQ);var xQ=(I=>(I.HEADER="header",I.QUERY="query",I))(xQ||{}),vQ=(I=>(I.HEADER="header",I.QUERY="query",I))(vQ||{}),TQ=(I=>(I.HTTP="http",I.HTTPS="https",I))(TQ||{}),PQ=(I=>(I.MD5="md5",I.CRC32="crc32",I.CRC32C="crc32c",I.SHA1="sha1",I.SHA256="sha256",I))(PQ||{}),Va=_I(I=>{let A=[];return I.sha256!==void 0&&A.push({algorithmId:()=>"sha256",checksumConstructor:()=>I.sha256}),I.md5!=null&&A.push({algorithmId:()=>"md5",checksumConstructor:()=>I.md5}),{_checksumAlgorithms:A,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),Wa=_I(I=>{let A={};return I.checksumAlgorithms().forEach(e=>{A[e.algorithmId()]=e.checksumConstructor()}),A},"resolveChecksumRuntimeConfig"),Za=_I(I=>({...Va(I)}),"getDefaultClientConfiguration"),_a=_I(I=>({...Wa(I)}),"resolveDefaultRuntimeConfig"),OQ=(I=>(I[I.HEADER=0]="HEADER",I[I.TRAILER=1]="TRAILER",I))(OQ||{}),Xa="__smithy_context",qQ=(I=>(I.PROFILE="profile",I.SSO_SESSION="sso-session",I.SERVICES="services",I))(qQ||{}),VQ=(I=>(I.HTTP_0_9="http/0.9",I.HTTP_1_0="http/1.0",I.TDS_8_0="tds/8.0",I))(VQ||{})}),CE=m((Ty,IE)=>{"use strict";var XI=Object.defineProperty,ja=Object.getOwnPropertyDescriptor,za=Object.getOwnPropertyNames,$a=Object.prototype.hasOwnProperty,Xe=(I,A)=>XI(I,"name",{value:A,configurable:!0}),Au=(I,A)=>{for(var e in A)XI(I,e,{get:A[e],enumerable:!0})},eu=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of za(A))!$a.call(I,C)&&C!==e&&XI(I,C,{get:()=>A[C],enumerable:!(g=ja(A,C))||g.enumerable});return I},gu=I=>eu(XI({},"__esModule",{value:!0}),I),_Q={};Au(_Q,{Field:()=>tu,Fields:()=>Bu,HttpRequest:()=>iu,HttpResponse:()=>Qu,IHttpRequest:()=>XQ.HttpRequest,getHttpHandlerExtensionConfiguration:()=>Iu,isValidHostname:()=>gE,resolveHttpHandlerRuntimeConfig:()=>Cu}),IE.exports=gu(_Q);var Iu=Xe(I=>{let A=I.httpHandler;return{setHttpHandler(e){A=e},httpHandler(){return A},updateHttpClientConfig(e,g){A.updateHttpClientConfig(e,g)},httpHandlerConfigs(){return A.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),Cu=Xe(I=>({httpHandler:I.httpHandler()}),"resolveHttpHandlerRuntimeConfig"),XQ=ZQ(),jQ=class{constructor({name:A,kind:e=XQ.FieldPosition.HEADER,values:g=[]}){this.name=A,this.kind=e,this.values=g}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter(e=>e!==A)}toString(){return this.values.map(A=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}};Xe(jQ,"Field");var tu=jQ,zQ=class{constructor({fields:A=[],encoding:e="utf-8"}){this.entries={},A.forEach(this.setField.bind(this)),this.encoding=e}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter(e=>e.kind===A)}};Xe(zQ,"Fields");var Bu=zQ,$Q=class xt{constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let e=new xt({...A,headers:{...A.headers}});return e.query&&(e.query=AE(e.query)),e}static isInstance(A){if(!A)return!1;let e=A;return"method"in e&&"protocol"in e&&"hostname"in e&&"path"in e&&typeof e.query=="object"&&typeof e.headers=="object"}clone(){return xt.clone(this)}};Xe($Q,"HttpRequest");var iu=$Q;function AE(I){return Object.keys(I).reduce((A,e)=>{let g=I[e];return{...A,[e]:Array.isArray(g)?[...g]:g}},{})}Xe(AE,"cloneQuery");var eE=class{constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let e=A;return typeof e.statusCode=="number"&&typeof e.headers=="object"}};Xe(eE,"HttpResponse");var Qu=eE;function gE(I){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(I)}Xe(gE,"isValidHostname")}),QE=m((Py,iE)=>{"use strict";var jI=Object.defineProperty,Eu=Object.getOwnPropertyDescriptor,su=Object.getOwnPropertyNames,ru=Object.prototype.hasOwnProperty,vt=(I,A)=>jI(I,"name",{value:A,configurable:!0}),ou=(I,A)=>{for(var e in A)jI(I,e,{get:A[e],enumerable:!0})},nu=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of su(A))!ru.call(I,C)&&C!==e&&jI(I,C,{get:()=>A[C],enumerable:!(g=Eu(A,C))||g.enumerable});return I},au=I=>nu(jI({},"__esModule",{value:!0}),I),tE={};ou(tE,{escapeUri:()=>BE,escapeUriPath:()=>Du}),iE.exports=au(tE);var BE=vt(I=>encodeURIComponent(I).replace(/[!'()*]/g,uu),"escapeUri"),uu=vt(I=>`%${I.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Du=vt(I=>I.split("/").map(BE).join("/"),"escapeUriPath")}),oE=m((Oy,rE)=>{"use strict";var zI=Object.defineProperty,cu=Object.getOwnPropertyDescriptor,hu=Object.getOwnPropertyNames,lu=Object.prototype.hasOwnProperty,wu=(I,A)=>zI(I,"name",{value:A,configurable:!0}),fu=(I,A)=>{for(var e in A)zI(I,e,{get:A[e],enumerable:!0})},du=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of hu(A))!lu.call(I,C)&&C!==e&&zI(I,C,{get:()=>A[C],enumerable:!(g=cu(A,C))||g.enumerable});return I},yu=I=>du(zI({},"__esModule",{value:!0}),I),EE={};fu(EE,{buildQueryString:()=>sE}),rE.exports=yu(EE);var Tt=QE();function sE(I){let A=[];for(let e of Object.keys(I).sort()){let g=I[e];if(e=(0,Tt.escapeUri)(e),Array.isArray(g))for(let C=0,t=g.length;C<t;C++)A.push(`${e}=${(0,Tt.escapeUri)(g[C])}`);else{let C=e;(g||typeof g=="string")&&(C+=`=${(0,Tt.escapeUri)(g)}`),A.push(C)}}return A.join("&")}wu(sE,"buildQueryString")}),mE=m((Zy,NE)=>{"use strict";var Fu=Object.create,dI=Object.defineProperty,pu=Object.getOwnPropertyDescriptor,Su=Object.getOwnPropertyNames,Ru=Object.getPrototypeOf,ku=Object.prototype.hasOwnProperty,fA=(I,A)=>dI(I,"name",{value:A,configurable:!0}),Mu=(I,A)=>{for(var e in A)dI(I,e,{get:A[e],enumerable:!0})},cE=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of Su(A))!ku.call(I,C)&&C!==e&&dI(I,C,{get:()=>A[C],enumerable:!(g=pu(A,C))||g.enumerable});return I},Gu=(I,A,e)=>(e=I!=null?Fu(Ru(I)):{},cE(A||!I||!I.__esModule?dI(e,"default",{value:I,enumerable:!0}):e,I)),Nu=I=>cE(dI({},"__esModule",{value:!0}),I),hE={};Mu(hE,{DEFAULT_REQUEST_TIMEOUT:()=>Hu,NodeHttp2Handler:()=>Tu,NodeHttpHandler:()=>Yu,streamCollector:()=>Ou}),NE.exports=Nu(hE);var lE=CE(),wE=oE(),Pt=require("http"),Ot=require("https"),mu=["ECONNRESET","EPIPE","ETIMEDOUT"],fE=fA(I=>{let A={};for(let e of Object.keys(I)){let g=I[e];A[e]=Array.isArray(g)?g.join(","):g}return A},"getTransformedHeaders"),Ce={setTimeout:(I,A)=>setTimeout(I,A),clearTimeout:I=>clearTimeout(I)},nE=1e3,Uu=fA((I,A,e=0)=>{if(!e)return-1;let g=fA(C=>{let t=Ce.setTimeout(()=>{I.destroy(),A(Object.assign(new Error(`Socket timed out without establishing a connection within ${e} ms`),{name:"TimeoutError"}))},e-C),Q=fA(u=>{u?.connecting?u.on("connect",()=>{Ce.clearTimeout(t)}):Ce.clearTimeout(t)},"doWithSocket");I.socket?Q(I.socket):I.on("socket",Q)},"registerTimeout");return e<2e3?(g(0),0):Ce.setTimeout(g.bind(null,nE),nE)},"setConnectionTimeout"),Lu=3e3,Ju=fA((I,{keepAlive:A,keepAliveMsecs:e},g=Lu)=>{if(A!==!0)return-1;let C=fA(()=>{I.socket?I.socket.setKeepAlive(A,e||0):I.on("socket",t=>{t.setKeepAlive(A,e||0)})},"registerListener");return g===0?(C(),0):Ce.setTimeout(C,g)},"setSocketKeepAlive"),aE=3e3,Ku=fA((I,A,e=0)=>{let g=fA(C=>{let t=e-C,Q=fA(()=>{I.destroy(),A(Object.assign(new Error(`Connection timed out after ${e} ms`),{name:"TimeoutError"}))},"onTimeout");I.socket?I.socket.setTimeout(t,Q):I.setTimeout(t,Q)},"registerTimeout");return 0<e&&e<6e3?(g(0),0):Ce.setTimeout(g.bind(null,e===0?0:aE),aE)},"setSocketTimeout"),dE=require("stream"),uE=1e3;async function Vt(I,A,e=uE){let g=A.headers??{},C=g.Expect||g.expect,t=-1,Q=!0;C==="100-continue"&&(Q=await Promise.race([new Promise(u=>{t=Number(Ce.setTimeout(u,Math.max(uE,e)))}),new Promise(u=>{I.on("continue",()=>{Ce.clearTimeout(t),u(!0)}),I.on("response",()=>{Ce.clearTimeout(t),u(!1)}),I.on("error",()=>{Ce.clearTimeout(t),u(!1)})})])),Q&&yE(I,A.body)}fA(Vt,"writeRequestBody");function yE(I,A){if(A instanceof dE.Readable){A.pipe(I);return}if(A){if(Buffer.isBuffer(A)||typeof A=="string"){I.end(A);return}let e=A;if(typeof e=="object"&&e.buffer&&typeof e.byteOffset=="number"&&typeof e.byteLength=="number"){I.end(Buffer.from(e.buffer,e.byteOffset,e.byteLength));return}I.end(Buffer.from(A));return}I.end()}fA(yE,"writeBody");var Hu=0,FE=class qt{constructor(A){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((e,g)=>{typeof A=="function"?A().then(C=>{e(this.resolveDefaultConfig(C))}).catch(g):e(this.resolveDefaultConfig(A))})}static create(A){return typeof A?.handle=="function"?A:new qt(A)}static checkSocketUsage(A,e,g=console){var C,t,Q;let{sockets:u,requests:D,maxSockets:h}=A;if(typeof h!="number"||h===1/0||Date.now()-15e3<e)return e;if(u&&D)for(let a in u){let r=((C=u[a])==null?void 0:C.length)??0,B=((t=D[a])==null?void 0:t.length)??0;if(r>=h&&B>=2*h)return(Q=g?.warn)==null||Q.call(g,`@smithy/node-http-handler:WARN - socket usage at capacity=${r} and ${B} additional requests are enqueued. See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return e}resolveDefaultConfig(A){let{requestTimeout:e,connectionTimeout:g,socketTimeout:C,httpAgent:t,httpsAgent:Q}=A||{},u=!0,D=50;return{connectionTimeout:g,requestTimeout:e??C,httpAgent:t instanceof Pt.Agent||typeof t?.destroy=="function"?t:new Pt.Agent({keepAlive:u,maxSockets:D,...t}),httpsAgent:Q instanceof Ot.Agent||typeof Q?.destroy=="function"?Q:new Ot.Agent({keepAlive:u,maxSockets:D,...Q}),logger:console}}destroy(){var A,e,g,C;(e=(A=this.config)==null?void 0:A.httpAgent)==null||e.destroy(),(C=(g=this.config)==null?void 0:g.httpsAgent)==null||C.destroy()}async handle(A,{abortSignal:e}={}){return this.config||(this.config=await this.configProvider),new Promise((g,C)=>{let t,Q=[],u=fA(async y=>{await t,Q.forEach(Ce.clearTimeout),g(y)},"resolve"),D=fA(async y=>{await t,Q.forEach(Ce.clearTimeout),C(y)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(e?.aborted){let y=new Error("Request aborted");y.name="AbortError",D(y);return}let h=A.protocol==="https:",n=h?this.config.httpsAgent:this.config.httpAgent;Q.push(Ce.setTimeout(()=>{this.socketWarningTimestamp=qt.checkSocketUsage(n,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2e3)+(this.config.connectionTimeout??1e3)));let a=(0,wE.buildQueryString)(A.query||{}),r;if(A.username!=null||A.password!=null){let y=A.username??"",F=A.password??"";r=`${y}:${F}`}let B=A.path;a&&(B+=`?${a}`),A.fragment&&(B+=`#${A.fragment}`);let i=A.hostname??"";i[0]==="["&&i.endsWith("]")?i=A.hostname.slice(1,-1):i=A.hostname;let E={headers:A.headers,host:i,method:A.method,path:B,port:A.port,agent:n,auth:r},c=(h?Ot.request:Pt.request)(E,y=>{let F=new lE.HttpResponse({statusCode:y.statusCode||-1,reason:y.statusMessage,headers:fE(y.headers),body:y});u({response:F})});if(c.on("error",y=>{mu.includes(y.code)?D(Object.assign(y,{name:"TimeoutError"})):D(y)}),e){let y=fA(()=>{c.destroy();let F=new Error("Request aborted");F.name="AbortError",D(F)},"onAbort");if(typeof e.addEventListener=="function"){let F=e;F.addEventListener("abort",y,{once:!0}),c.once("close",()=>F.removeEventListener("abort",y))}else e.onabort=y}Q.push(Uu(c,D,this.config.connectionTimeout)),Q.push(Ku(c,D,this.config.requestTimeout));let w=E.agent;typeof w=="object"&&"keepAlive"in w&&Q.push(Ju(c,{keepAlive:w.keepAlive,keepAliveMsecs:w.keepAliveMsecs})),t=Vt(c,A,this.config.requestTimeout).catch(y=>(Q.forEach(Ce.clearTimeout),C(y)))})}updateHttpClientConfig(A,e){this.config=void 0,this.configProvider=this.configProvider.then(g=>({...g,[A]:e}))}httpHandlerConfigs(){return this.config??{}}};fA(FE,"NodeHttpHandler");var Yu=FE,DE=require("http2"),bu=Gu(require("http2")),pE=class{constructor(A){this.sessions=[],this.sessions=A??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(A){this.sessions.push(A)}contains(A){return this.sessions.includes(A)}remove(A){this.sessions=this.sessions.filter(e=>e!==A)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(A){for(let e of this.sessions)e===A&&(e.destroyed||e.destroy())}};fA(pE,"NodeHttp2ConnectionPool");var xu=pE,SE=class{constructor(A){if(this.sessionCache=new Map,this.config=A,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(A,e){let g=this.getUrlString(A),C=this.sessionCache.get(g);if(C){let D=C.poll();if(D&&!this.config.disableConcurrency)return D}let t=bu.default.connect(g);this.config.maxConcurrency&&t.settings({maxConcurrentStreams:this.config.maxConcurrency},D=>{if(D)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+A.destination.toString())}),t.unref();let Q=fA(()=>{t.destroy(),this.deleteSession(g,t)},"destroySessionCb");t.on("goaway",Q),t.on("error",Q),t.on("frameError",Q),t.on("close",()=>this.deleteSession(g,t)),e.requestTimeout&&t.setTimeout(e.requestTimeout,Q);let u=this.sessionCache.get(g)||new xu;return u.offerLast(t),this.sessionCache.set(g,u),t}deleteSession(A,e){let g=this.sessionCache.get(A);g&&g.contains(e)&&(g.remove(e),this.sessionCache.set(A,g))}release(A,e){var g;let C=this.getUrlString(A);(g=this.sessionCache.get(C))==null||g.offerLast(e)}destroy(){for(let[A,e]of this.sessionCache){for(let g of e)g.destroyed||g.destroy(),e.remove(g);this.sessionCache.delete(A)}}setMaxConcurrentStreams(A){if(A&&A<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=A}setDisableConcurrentStreams(A){this.config.disableConcurrency=A}getUrlString(A){return A.destination.toString()}};fA(SE,"NodeHttp2ConnectionManager");var vu=SE,RE=class kE{constructor(A){this.metadata={handlerProtocol:"h2"},this.connectionManager=new vu({}),this.configProvider=new Promise((e,g)=>{typeof A=="function"?A().then(C=>{e(C||{})}).catch(g):e(A||{})})}static create(A){return typeof A?.handle=="function"?A:new kE(A)}destroy(){this.connectionManager.destroy()}async handle(A,{abortSignal:e}={}){this.config||(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams&&this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams));let{requestTimeout:g,disableConcurrentStreams:C}=this.config;return new Promise((t,Q)=>{var u;let D=!1,h,n=fA(async H=>{await h,t(H)},"resolve"),a=fA(async H=>{await h,Q(H)},"reject");if(e?.aborted){D=!0;let H=new Error("Request aborted");H.name="AbortError",a(H);return}let{hostname:r,method:B,port:i,protocol:E,query:s}=A,c="";if(A.username!=null||A.password!=null){let H=A.username??"",Z=A.password??"";c=`${H}:${Z}@`}let w=`${E}//${c}${r}${i?`:${i}`:""}`,y={destination:new URL(w)},F=this.connectionManager.lease(y,{requestTimeout:(u=this.config)==null?void 0:u.sessionTimeout,disableConcurrentStreams:C||!1}),S=fA(H=>{C&&this.destroySession(F),D=!0,a(H)},"rejectWithDestroy"),k=(0,wE.buildQueryString)(s||{}),M=A.path;k&&(M+=`?${k}`),A.fragment&&(M+=`#${A.fragment}`);let b=F.request({...A.headers,[DE.constants.HTTP2_HEADER_PATH]:M,[DE.constants.HTTP2_HEADER_METHOD]:B});if(F.ref(),b.on("response",H=>{let Z=new lE.HttpResponse({statusCode:H[":status"]||-1,headers:fE(H),body:b});D=!0,n({response:Z}),C&&(F.close(),this.connectionManager.deleteSession(w,F))}),g&&b.setTimeout(g,()=>{b.close();let H=new Error(`Stream timed out because of no activity for ${g} ms`);H.name="TimeoutError",S(H)}),e){let H=fA(()=>{b.close();let Z=new Error("Request aborted");Z.name="AbortError",S(Z)},"onAbort");if(typeof e.addEventListener=="function"){let Z=e;Z.addEventListener("abort",H,{once:!0}),b.once("close",()=>Z.removeEventListener("abort",H))}else e.onabort=H}b.on("frameError",(H,Z,W)=>{S(new Error(`Frame type id ${H} in stream id ${W} has failed with code ${Z}.`))}),b.on("error",S),b.on("aborted",()=>{S(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${b.rstCode}.`))}),b.on("close",()=>{F.unref(),C&&F.destroy(),D||S(new Error("Unexpected error: http2 request did not get a response"))}),h=Vt(b,A,g)})}updateHttpClientConfig(A,e){this.config=void 0,this.configProvider=this.configProvider.then(g=>({...g,[A]:e}))}httpHandlerConfigs(){return this.config??{}}destroySession(A){A.destroyed||A.destroy()}};fA(RE,"NodeHttp2Handler");var Tu=RE,ME=class extends dE.Writable{constructor(){super(...arguments),this.bufferedBytes=[]}_write(A,e,g){this.bufferedBytes.push(A),g()}};fA(ME,"Collector");var Pu=ME,Ou=fA(I=>qu(I)?GE(I):new Promise((A,e)=>{let g=new Pu;I.pipe(g),I.on("error",C=>{g.end(),e(C)}),g.on("error",e),g.on("finish",function(){let C=new Uint8Array(Buffer.concat(this.bufferedBytes));A(C)})}),"streamCollector"),qu=fA(I=>typeof ReadableStream=="function"&&I instanceof ReadableStream,"isReadableStreamInstance");async function GE(I){let A=[],e=I.getReader(),g=!1,C=0;for(;!g;){let{done:u,value:D}=await e.read();D&&(A.push(D),C+=D.length),g=u}let t=new Uint8Array(C),Q=0;for(let u of A)t.set(u,Q),Q+=u.length;return t}fA(GE,"collectReadableStream")}),HE=m((jy,KE)=>{"use strict";var yI=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Vu=typeof AbortController=="function",$I=Vu?AbortController:class{constructor(){this.signal=new UE}abort(A=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||A,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},Wu=typeof AbortSignal=="function",Zu=typeof $I.AbortSignal=="function",UE=Wu?AbortSignal:Zu?$I.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(A){A.type==="abort"&&(this.aborted=!0,this.onabort(A),this._listeners.forEach(e=>e(A),this))}onabort(){}addEventListener(A,e){A==="abort"&&this._listeners.push(e)}removeEventListener(A,e){A==="abort"&&(this._listeners=this._listeners.filter(g=>g!==e))}},Xt=new Set,Wt=(I,A)=>{let e=`LRU_CACHE_OPTION_${I}`;AC(e)&&jt(e,`${I} option`,`options.${A}`,Sg)},Zt=(I,A)=>{let e=`LRU_CACHE_METHOD_${I}`;if(AC(e)){let{prototype:g}=Sg,{get:C}=Object.getOwnPropertyDescriptor(g,I);jt(e,`${I} method`,`cache.${A}()`,C)}},_u=(I,A)=>{let e=`LRU_CACHE_PROPERTY_${I}`;if(AC(e)){let{prototype:g}=Sg,{get:C}=Object.getOwnPropertyDescriptor(g,I);jt(e,`${I} property`,`cache.${A}`,C)}},LE=(...I)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...I):console.error(...I)},AC=I=>!Xt.has(I),jt=(I,A,e,g)=>{Xt.add(I);let C=`The ${A} is deprecated. Please use ${e} instead.`;LE(C,"DeprecationWarning",I,g)},je=I=>I&&I===Math.floor(I)&&I>0&&isFinite(I),JE=I=>je(I)?I<=Math.pow(2,8)?Uint8Array:I<=Math.pow(2,16)?Uint16Array:I<=Math.pow(2,32)?Uint32Array:I<=Number.MAX_SAFE_INTEGER?pg:null:null,pg=class extends Array{constructor(A){super(A),this.fill(0)}},_t=class{constructor(A){if(A===0)return[];let e=JE(A);this.heap=new e(A),this.length=0}push(A){this.heap[this.length++]=A}pop(){return this.heap[--this.length]}},Sg=class I{constructor(A={}){let{max:e=0,ttl:g,ttlResolution:C=1,ttlAutopurge:t,updateAgeOnGet:Q,updateAgeOnHas:u,allowStale:D,dispose:h,disposeAfter:n,noDisposeOnSet:a,noUpdateTTL:r,maxSize:B=0,maxEntrySize:i=0,sizeCalculation:E,fetchMethod:s,fetchContext:c,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:F,allowStaleOnFetchAbort:S,ignoreFetchAbort:k}=A,{length:M,maxAge:b,stale:H}=A instanceof I?{}:A;if(e!==0&&!je(e))throw new TypeError("max option must be a nonnegative integer");let Z=e?JE(e):Array;if(!Z)throw new Error("invalid max value: "+e);if(this.max=e,this.maxSize=B,this.maxEntrySize=i||this.maxSize,this.sizeCalculation=E||M,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=c,!this.fetchMethod&&c!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(e).fill(null),this.valList=new Array(e).fill(null),this.next=new Z(e),this.prev=new Z(e),this.head=0,this.tail=0,this.free=new _t(e),this.initialFill=1,this.size=0,typeof h=="function"&&(this.dispose=h),typeof n=="function"?(this.disposeAfter=n,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!a,this.noUpdateTTL=!!r,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!F,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.maxSize!==0&&!je(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!je(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!D||!!H,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!Q,this.updateAgeOnHas=!!u,this.ttlResolution=je(C)||C===0?C:1,this.ttlAutopurge=!!t,this.ttl=g||b||0,this.ttl){if(!je(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 W="LRU_CACHE_UNBOUNDED";AC(W)&&(Xt.add(W),LE("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",W,I))}H&&Wt("stale","allowStale"),b&&Wt("maxAge","ttl"),M&&Wt("length","sizeCalculation")}getRemainingTTL(A){return this.has(A,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new pg(this.max),this.starts=new pg(this.max),this.setItemTTL=(g,C,t=yI.now())=>{if(this.starts[g]=C!==0?t:0,this.ttls[g]=C,C!==0&&this.ttlAutopurge){let Q=setTimeout(()=>{this.isStale(g)&&this.delete(this.keyList[g])},C+1);Q.unref&&Q.unref()}},this.updateItemAge=g=>{this.starts[g]=this.ttls[g]!==0?yI.now():0},this.statusTTL=(g,C)=>{g&&(g.ttl=this.ttls[C],g.start=this.starts[C],g.now=A||e(),g.remainingTTL=g.now+g.ttl-g.start)};let A=0,e=()=>{let g=yI.now();if(this.ttlResolution>0){A=g;let C=setTimeout(()=>A=0,this.ttlResolution);C.unref&&C.unref()}return g};this.getRemainingTTL=g=>{let C=this.keyMap.get(g);return C===void 0?0:this.ttls[C]===0||this.starts[C]===0?1/0:this.starts[C]+this.ttls[C]-(A||e())},this.isStale=g=>this.ttls[g]!==0&&this.starts[g]!==0&&(A||e())-this.starts[g]>this.ttls[g]}updateItemAge(A){}statusTTL(A,e){}setItemTTL(A,e,g){}isStale(A){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new pg(this.max),this.removeItemSize=A=>{this.calculatedSize-=this.sizes[A],this.sizes[A]=0},this.requireSize=(A,e,g,C)=>{if(this.isBackgroundFetch(e))return 0;if(!je(g))if(C){if(typeof C!="function")throw new TypeError("sizeCalculation must be a function");if(g=C(e,A),!je(g))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 g},this.addItemSize=(A,e,g)=>{if(this.sizes[A]=e,this.maxSize){let C=this.maxSize-this.sizes[A];for(;this.calculatedSize>C;)this.evict(!0)}this.calculatedSize+=this.sizes[A],g&&(g.entrySize=e,g.totalCalculatedSize=this.calculatedSize)}}removeItemSize(A){}addItemSize(A,e){}requireSize(A,e,g,C){if(g||C)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:A=this.allowStale}={}){if(this.size)for(let e=this.tail;!(!this.isValidIndex(e)||((A||!this.isStale(e))&&(yield e),e===this.head));)e=this.prev[e]}*rindexes({allowStale:A=this.allowStale}={}){if(this.size)for(let e=this.head;!(!this.isValidIndex(e)||((A||!this.isStale(e))&&(yield e),e===this.tail));)e=this.next[e]}isValidIndex(A){return A!==void 0&&this.keyMap.get(this.keyList[A])===A}*entries(){for(let A of this.indexes())this.valList[A]!==void 0&&this.keyList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield[this.keyList[A],this.valList[A]])}*rentries(){for(let A of this.rindexes())this.valList[A]!==void 0&&this.keyList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield[this.keyList[A],this.valList[A]])}*keys(){for(let A of this.indexes())this.keyList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield this.keyList[A])}*rkeys(){for(let A of this.rindexes())this.keyList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield this.keyList[A])}*values(){for(let A of this.indexes())this.valList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield this.valList[A])}*rvalues(){for(let A of this.rindexes())this.valList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield this.valList[A])}[Symbol.iterator](){return this.entries()}find(A,e){for(let g of this.indexes()){let C=this.valList[g],t=this.isBackgroundFetch(C)?C.__staleWhileFetching:C;if(t!==void 0&&A(t,this.keyList[g],this))return this.get(this.keyList[g],e)}}forEach(A,e=this){for(let g of this.indexes()){let C=this.valList[g],t=this.isBackgroundFetch(C)?C.__staleWhileFetching:C;t!==void 0&&A.call(e,t,this.keyList[g],this)}}rforEach(A,e=this){for(let g of this.rindexes()){let C=this.valList[g],t=this.isBackgroundFetch(C)?C.__staleWhileFetching:C;t!==void 0&&A.call(e,t,this.keyList[g],this)}}get prune(){return Zt("prune","purgeStale"),this.purgeStale}purgeStale(){let A=!1;for(let e of this.rindexes({allowStale:!0}))this.isStale(e)&&(this.delete(this.keyList[e]),A=!0);return A}dump(){let A=[];for(let e of this.indexes({allowStale:!0})){let g=this.keyList[e],C=this.valList[e],t=this.isBackgroundFetch(C)?C.__staleWhileFetching:C;if(t===void 0)continue;let Q={value:t};if(this.ttls){Q.ttl=this.ttls[e];let u=yI.now()-this.starts[e];Q.start=Math.floor(Date.now()-u)}this.sizes&&(Q.size=this.sizes[e]),A.unshift([g,Q])}return A}load(A){this.clear();for(let[e,g]of A){if(g.start){let C=Date.now()-g.start;g.start=yI.now()-C}this.set(e,g.value,g)}}dispose(A,e,g){}set(A,e,{ttl:g=this.ttl,start:C,noDisposeOnSet:t=this.noDisposeOnSet,size:Q=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:D=this.noUpdateTTL,status:h}={}){if(Q=this.requireSize(A,e,Q,u),this.maxEntrySize&&Q>this.maxEntrySize)return h&&(h.set="miss",h.maxEntrySizeExceeded=!0),this.delete(A),this;let n=this.size===0?void 0:this.keyMap.get(A);if(n===void 0)n=this.newIndex(),this.keyList[n]=A,this.valList[n]=e,this.keyMap.set(A,n),this.next[this.tail]=n,this.prev[n]=this.tail,this.tail=n,this.size++,this.addItemSize(n,Q,h),h&&(h.set="add"),D=!1;else{this.moveToTail(n);let a=this.valList[n];if(e!==a){if(this.isBackgroundFetch(a)?a.__abortController.abort(new Error("replaced")):t||(this.dispose(a,A,"set"),this.disposeAfter&&this.disposed.push([a,A,"set"])),this.removeItemSize(n),this.valList[n]=e,this.addItemSize(n,Q,h),h){h.set="replace";let r=a&&this.isBackgroundFetch(a)?a.__staleWhileFetching:a;r!==void 0&&(h.oldValue=r)}}else h&&(h.set="update")}if(g!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),D||this.setItemTTL(n,g,C),this.statusTTL(h,n),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 A=this.valList[this.head];return this.evict(!0),A}}evict(A){let e=this.head,g=this.keyList[e],C=this.valList[e];return this.isBackgroundFetch(C)?C.__abortController.abort(new Error("evicted")):(this.dispose(C,g,"evict"),this.disposeAfter&&this.disposed.push([C,g,"evict"])),this.removeItemSize(e),A&&(this.keyList[e]=null,this.valList[e]=null,this.free.push(e)),this.head=this.next[e],this.keyMap.delete(g),this.size--,e}has(A,{updateAgeOnHas:e=this.updateAgeOnHas,status:g}={}){let C=this.keyMap.get(A);if(C!==void 0)if(this.isStale(C))g&&(g.has="stale",this.statusTTL(g,C));else return e&&this.updateItemAge(C),g&&(g.has="hit"),this.statusTTL(g,C),!0;else g&&(g.has="miss");return!1}peek(A,{allowStale:e=this.allowStale}={}){let g=this.keyMap.get(A);if(g!==void 0&&(e||!this.isStale(g))){let C=this.valList[g];return this.isBackgroundFetch(C)?C.__staleWhileFetching:C}}backgroundFetch(A,e,g,C){let t=e===void 0?void 0:this.valList[e];if(this.isBackgroundFetch(t))return t;let Q=new $I;g.signal&&g.signal.addEventListener("abort",()=>Q.abort(g.signal.reason));let u={signal:Q.signal,options:g,context:C},D=(B,i=!1)=>{let{aborted:E}=Q.signal,s=g.ignoreFetchAbort&&B!==void 0;return g.status&&(E&&!i?(g.status.fetchAborted=!0,g.status.fetchError=Q.signal.reason,s&&(g.status.fetchAbortIgnored=!0)):g.status.fetchResolved=!0),E&&!s&&!i?n(Q.signal.reason):(this.valList[e]===r&&(B===void 0?r.__staleWhileFetching?this.valList[e]=r.__staleWhileFetching:this.delete(A):(g.status&&(g.status.fetchUpdated=!0),this.set(A,B,u.options))),B)},h=B=>(g.status&&(g.status.fetchRejected=!0,g.status.fetchError=B),n(B)),n=B=>{let{aborted:i}=Q.signal,E=i&&g.allowStaleOnFetchAbort,s=E||g.allowStaleOnFetchRejection,c=s||g.noDeleteOnFetchRejection;if(this.valList[e]===r&&(!c||r.__staleWhileFetching===void 0?this.delete(A):E||(this.valList[e]=r.__staleWhileFetching)),s)return g.status&&r.__staleWhileFetching!==void 0&&(g.status.returnedStale=!0),r.__staleWhileFetching;if(r.__returned===r)throw B},a=(B,i)=>{this.fetchMethod(A,t,u).then(E=>B(E),i),Q.signal.addEventListener("abort",()=>{(!g.ignoreFetchAbort||g.allowStaleOnFetchAbort)&&(B(),g.allowStaleOnFetchAbort&&(B=E=>D(E,!0)))})};g.status&&(g.status.fetchDispatched=!0);let r=new Promise(a).then(D,h);return r.__abortController=Q,r.__staleWhileFetching=t,r.__returned=null,e===void 0?(this.set(A,r,{...u.options,status:void 0}),e=this.keyMap.get(A)):this.valList[e]=r,r}isBackgroundFetch(A){return A&&typeof A=="object"&&typeof A.then=="function"&&Object.prototype.hasOwnProperty.call(A,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(A,"__returned")&&(A.__returned===A||A.__returned===null)}async fetch(A,{allowStale:e=this.allowStale,updateAgeOnGet:g=this.updateAgeOnGet,noDeleteOnStaleGet:C=this.noDeleteOnStaleGet,ttl:t=this.ttl,noDisposeOnSet:Q=this.noDisposeOnSet,size:u=0,sizeCalculation:D=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:n=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:a=this.allowStaleOnFetchRejection,ignoreFetchAbort:r=this.ignoreFetchAbort,allowStaleOnFetchAbort:B=this.allowStaleOnFetchAbort,fetchContext:i=this.fetchContext,forceRefresh:E=!1,status:s,signal:c}={}){if(!this.fetchMethod)return s&&(s.fetch="get"),this.get(A,{allowStale:e,updateAgeOnGet:g,noDeleteOnStaleGet:C,status:s});let w={allowStale:e,updateAgeOnGet:g,noDeleteOnStaleGet:C,ttl:t,noDisposeOnSet:Q,size:u,sizeCalculation:D,noUpdateTTL:h,noDeleteOnFetchRejection:n,allowStaleOnFetchRejection:a,allowStaleOnFetchAbort:B,ignoreFetchAbort:r,status:s,signal:c},y=this.keyMap.get(A);if(y===void 0){s&&(s.fetch="miss");let F=this.backgroundFetch(A,y,w,i);return F.__returned=F}else{let F=this.valList[y];if(this.isBackgroundFetch(F)){let H=e&&F.__staleWhileFetching!==void 0;return s&&(s.fetch="inflight",H&&(s.returnedStale=!0)),H?F.__staleWhileFetching:F.__returned=F}let S=this.isStale(y);if(!E&&!S)return s&&(s.fetch="hit"),this.moveToTail(y),g&&this.updateItemAge(y),this.statusTTL(s,y),F;let k=this.backgroundFetch(A,y,w,i),M=k.__staleWhileFetching!==void 0,b=M&&e;return s&&(s.fetch=M&&S?"stale":"refresh",b&&S&&(s.returnedStale=!0)),b?k.__staleWhileFetching:k.__returned=k}}get(A,{allowStale:e=this.allowStale,updateAgeOnGet:g=this.updateAgeOnGet,noDeleteOnStaleGet:C=this.noDeleteOnStaleGet,status:t}={}){let Q=this.keyMap.get(A);if(Q!==void 0){let u=this.valList[Q],D=this.isBackgroundFetch(u);return this.statusTTL(t,Q),this.isStale(Q)?(t&&(t.get="stale"),D?(t&&(t.returnedStale=e&&u.__staleWhileFetching!==void 0),e?u.__staleWhileFetching:void 0):(C||this.delete(A),t&&(t.returnedStale=e),e?u:void 0)):(t&&(t.get="hit"),D?u.__staleWhileFetching:(this.moveToTail(Q),g&&this.updateItemAge(Q),u))}else t&&(t.get="miss")}connect(A,e){this.prev[e]=A,this.next[A]=e}moveToTail(A){A!==this.tail&&(A===this.head?this.head=this.next[A]:this.connect(this.prev[A],this.next[A]),this.connect(this.tail,A),this.tail=A)}get del(){return Zt("del","delete"),this.delete}delete(A){let e=!1;if(this.size!==0){let g=this.keyMap.get(A);if(g!==void 0)if(e=!0,this.size===1)this.clear();else{this.removeItemSize(g);let C=this.valList[g];this.isBackgroundFetch(C)?C.__abortController.abort(new Error("deleted")):(this.dispose(C,A,"delete"),this.disposeAfter&&this.disposed.push([C,A,"delete"])),this.keyMap.delete(A),this.keyList[g]=null,this.valList[g]=null,g===this.tail?this.tail=this.prev[g]:g===this.head?this.head=this.next[g]:(this.next[this.prev[g]]=this.next[g],this.prev[this.next[g]]=this.prev[g]),this.size--,this.free.push(g)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return e}clear(){for(let A of this.rindexes({allowStale:!0})){let e=this.valList[A];if(this.isBackgroundFetch(e))e.__abortController.abort(new Error("deleted"));else{let g=this.keyList[A];this.dispose(e,g,"delete"),this.disposeAfter&&this.disposed.push([e,g,"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 Zt("reset","clear"),this.clear}get length(){return _u("length","size"),this.size}static get AbortController(){return $I}static get AbortSignal(){return UE}};KE.exports=Sg}),xE=m(te=>{"use strict";var Xu=te&&te.__createBinding||(Object.create?(function(I,A,e,g){g===void 0&&(g=e);var C=Object.getOwnPropertyDescriptor(A,e);(!C||("get"in C?!A.__esModule:C.writable||C.configurable))&&(C={enumerable:!0,get:function(){return A[e]}}),Object.defineProperty(I,g,C)}):(function(I,A,e,g){g===void 0&&(g=e),I[g]=A[e]})),ju=te&&te.__setModuleDefault||(Object.create?(function(I,A){Object.defineProperty(I,"default",{enumerable:!0,value:A})}):function(I,A){I.default=A}),YE=te&&te.__importStar||function(I){if(I&&I.__esModule)return I;var A={};if(I!=null)for(var e in I)e!=="default"&&Object.prototype.hasOwnProperty.call(I,e)&&Xu(A,I,e);return ju(A,I),A};Object.defineProperty(te,"__esModule",{value:!0}),te.req=te.json=te.toBuffer=void 0;var zu=YE(require("http")),$u=YE(require("https"));async function bE(I){let A=0,e=[];for await(let g of I)A+=g.length,e.push(g);return Buffer.concat(e,A)}te.toBuffer=bE;async function AD(I){let e=(await bE(I)).toString("utf8");try{return JSON.parse(e)}catch(g){let C=g;throw C.message+=` (input: ${e})`,C}}te.json=AD;function eD(I,A={}){let g=((typeof I=="string"?I:I.href).startsWith("https:")?$u:zu).request(I,A),C=new Promise((t,Q)=>{g.once("response",t).once("error",Q).end()});return g.then=C.then.bind(C),g}te.req=eD}),Rg=m(Ee=>{"use strict";var TE=Ee&&Ee.__createBinding||(Object.create?(function(I,A,e,g){g===void 0&&(g=e);var C=Object.getOwnPropertyDescriptor(A,e);(!C||("get"in C?!A.__esModule:C.writable||C.configurable))&&(C={enumerable:!0,get:function(){return A[e]}}),Object.defineProperty(I,g,C)}):(function(I,A,e,g){g===void 0&&(g=e),I[g]=A[e]})),gD=Ee&&Ee.__setModuleDefault||(Object.create?(function(I,A){Object.defineProperty(I,"default",{enumerable:!0,value:A})}):function(I,A){I.default=A}),PE=Ee&&Ee.__importStar||function(I){if(I&&I.__esModule)return I;var A={};if(I!=null)for(var e in I)e!=="default"&&Object.prototype.hasOwnProperty.call(I,e)&&TE(A,I,e);return gD(A,I),A},ID=Ee&&Ee.__exportStar||function(I,A){for(var e in I)e!=="default"&&!Object.prototype.hasOwnProperty.call(A,e)&&TE(A,I,e)};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Agent=void 0;var CD=PE(require("net")),vE=PE(require("http")),tD=require("https");ID(xE(),Ee);var Ne=Symbol("AgentBaseInternalState"),zt=class extends vE.Agent{constructor(A){super(A),this[Ne]={}}isSecureEndpoint(A){if(A){if(typeof A.secureEndpoint=="boolean")return A.secureEndpoint;if(typeof A.protocol=="string")return A.protocol==="https:"}let{stack:e}=new Error;return typeof e!="string"?!1:e.split(` `).some(g=>g.indexOf("(https.js:")!==-1||g.indexOf("node:https:")!==-1)}incrementSockets(A){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[A]||(this.sockets[A]=[]);let e=new CD.Socket({writable:!1});return this.sockets[A].push(e),this.totalSocketCount++,e}decrementSockets(A,e){if(!this.sockets[A]||e===null)return;let g=this.sockets[A],C=g.indexOf(e);C!==-1&&(g.splice(C,1),this.totalSocketCount--,g.length===0&&delete this.sockets[A])}getName(A){return this.isSecureEndpoint(A)?tD.Agent.prototype.getName.call(this,A):super.getName(A)}createSocket(A,e,g){let C={...e,secureEndpoint:this.isSecureEndpoint(e)},t=this.getName(C),Q=this.incrementSockets(t);Promise.resolve().then(()=>this.connect(A,C)).then(u=>{if(this.decrementSockets(t,Q),u instanceof vE.Agent)try{return u.addRequest(A,C)}catch(D){return g(D)}this[Ne].currentSocket=u,super.createSocket(A,e,g)},u=>{this.decrementSockets(t,Q),g(u)})}createConnection(){let A=this[Ne].currentSocket;if(this[Ne].currentSocket=void 0,!A)throw new Error("No socket was returned in the `connect()` function");return A}get defaultPort(){return this[Ne].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(A){this[Ne]&&(this[Ne].defaultPort=A)}get protocol(){return this[Ne].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(A){this[Ne]&&(this[Ne].protocol=A)}};Ee.Agent=zt}),qE=m((AF,OE)=>{"use strict";var kg=1e3,Mg=kg*60,Gg=Mg*60,Eg=Gg*24,BD=Eg*7,iD=Eg*365.25;OE.exports=function(I,A){A=A||{};var e=typeof I;if(e==="string"&&I.length>0)return QD(I);if(e==="number"&&isFinite(I))return A.long?sD(I):ED(I);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(I))};function QD(I){if(I=String(I),!(I.length>100)){var A=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(I);if(A){var e=parseFloat(A[1]),g=(A[2]||"ms").toLowerCase();switch(g){case"years":case"year":case"yrs":case"yr":case"y":return e*iD;case"weeks":case"week":case"w":return e*BD;case"days":case"day":case"d":return e*Eg;case"hours":case"hour":case"hrs":case"hr":case"h":return e*Gg;case"minutes":case"minute":case"mins":case"min":case"m":return e*Mg;case"seconds":case"second":case"secs":case"sec":case"s":return e*kg;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}function ED(I){var A=Math.abs(I);return A>=Eg?Math.round(I/Eg)+"d":A>=Gg?Math.round(I/Gg)+"h":A>=Mg?Math.round(I/Mg)+"m":A>=kg?Math.round(I/kg)+"s":I+"ms"}function sD(I){var A=Math.abs(I);return A>=Eg?eC(I,A,Eg,"day"):A>=Gg?eC(I,A,Gg,"hour"):A>=Mg?eC(I,A,Mg,"minute"):A>=kg?eC(I,A,kg,"second"):I+" ms"}function eC(I,A,e,g){var C=A>=e*1.5;return Math.round(I/e)+" "+g+(C?"s":"")}}),$t=m((eF,VE)=>{"use strict";function rD(I){e.debug=e,e.default=e,e.coerce=D,e.disable=Q,e.enable=C,e.enabled=u,e.humanize=qE(),e.destroy=h,Object.keys(I).forEach(n=>{e[n]=I[n]}),e.names=[],e.skips=[],e.formatters={};function A(n){let a=0;for(let r=0;r<n.length;r++)a=(a<<5)-a+n.charCodeAt(r),a|=0;return e.colors[Math.abs(a)%e.colors.length]}e.selectColor=A;function e(n){let a,r=null,B,i;function E(...s){if(!E.enabled)return;let c=E,w=Number(new Date),y=w-(a||w);c.diff=y,c.prev=a,c.curr=w,a=w,s[0]=e.coerce(s[0]),typeof s[0]!="string"&&s.unshift("%O");let F=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(k,M)=>{if(k==="%%")return"%";F++;let b=e.formatters[M];if(typeof b=="function"){let H=s[F];k=b.call(c,H),s.splice(F,1),F--}return k}),e.formatArgs.call(c,s),(c.log||e.log).apply(c,s)}return E.namespace=n,E.useColors=e.useColors(),E.color=e.selectColor(n),E.extend=g,E.destroy=e.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>r!==null?r:(B!==e.namespaces&&(B=e.namespaces,i=e.enabled(n)),i),set:s=>{r=s}}),typeof e.init=="function"&&e.init(E),E}function g(n,a){let r=e(this.namespace+(typeof a>"u"?":":a)+n);return r.log=this.log,r}function C(n){e.save(n),e.namespaces=n,e.names=[],e.skips=[];let a=(typeof n=="string"?n:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let r of a)r[0]==="-"?e.skips.push(r.slice(1)):e.names.push(r)}function t(n,a){let r=0,B=0,i=-1,E=0;for(;r<n.length;)if(B<a.length&&(a[B]===n[r]||a[B]==="*"))a[B]==="*"?(i=B,E=r,B++):(r++,B++);else if(i!==-1)B=i+1,E++,r=E;else return!1;for(;B<a.length&&a[B]==="*";)B++;return B===a.length}function Q(){let n=[...e.names,...e.skips.map(a=>"-"+a)].join(",");return e.enable(""),n}function u(n){for(let a of e.skips)if(t(n,a))return!1;for(let a of e.names)if(t(n,a))return!0;return!1}function D(n){return n instanceof Error?n.stack||n.message:n}function h(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return e.enable(e.load()),e}VE.exports=rD}),WE=m((Be,gC)=>{"use strict";Be.formatArgs=nD,Be.save=aD,Be.load=uD,Be.useColors=oD,Be.storage=DD(),Be.destroy=(()=>{let I=!1;return()=>{I||(I=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),Be.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function oD(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let I;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(I=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(I[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function nD(I){if(I[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+I[0]+(this.useColors?"%c ":" ")+"+"+gC.exports.humanize(this.diff),!this.useColors)return;let A="color: "+this.color;I.splice(1,0,A,"color: inherit");let e=0,g=0;I[0].replace(/%[a-zA-Z%]/g,C=>{C!=="%%"&&(e++,C==="%c"&&(g=e))}),I.splice(g,0,A)}Be.log=console.debug||console.log||(()=>{});function aD(I){try{I?Be.storage.setItem("debug",I):Be.storage.removeItem("debug")}catch{}}function uD(){let I;try{I=Be.storage.getItem("debug")||Be.storage.getItem("DEBUG")}catch{}return!I&&typeof process<"u"&&"env"in process&&(I=process.env.DEBUG),I}function DD(){try{return localStorage}catch{}}gC.exports=$t()(Be);var{formatters:cD}=gC.exports;cD.j=function(I){try{return JSON.stringify(I)}catch(A){return"[UnexpectedJSONParseError]: "+A.message}}}),_E=m((gF,ZE)=>{"use strict";ZE.exports=(I,A=process.argv)=>{let e=I.startsWith("-")?"":I.length===1?"-":"--",g=A.indexOf(e+I),C=A.indexOf("--");return g!==-1&&(C===-1||g<C)}}),zE=m((IF,jE)=>{"use strict";var hD=require("os"),XE=require("tty"),ne=_E(),{env:PA}=process,ze;ne("no-color")||ne("no-colors")||ne("color=false")||ne("color=never")?ze=0:(ne("color")||ne("colors")||ne("color=true")||ne("color=always"))&&(ze=1),"FORCE_COLOR"in PA&&(PA.FORCE_COLOR==="true"?ze=1:PA.FORCE_COLOR==="false"?ze=0:ze=PA.FORCE_COLOR.length===0?1:Math.min(parseInt(PA.FORCE_COLOR,10),3));function AB(I){return I===0?!1:{level:I,hasBasic:!0,has256:I>=2,has16m:I>=3}}function eB(I,A){if(ze===0)return 0;if(ne("color=16m")||ne("color=full")||ne("color=truecolor"))return 3;if(ne("color=256"))return 2;if(I&&!A&&ze===void 0)return 0;let e=ze||0;if(PA.TERM==="dumb")return e;if(process.platform==="win32"){let g=hD.release().split(".");return Number(g[0])>=10&&Number(g[2])>=10586?Number(g[2])>=14931?3:2:1}if("CI"in PA)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(g=>g in PA)||PA.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in PA)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(PA.TEAMCITY_VERSION)?1:0;if(PA.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in PA){let g=parseInt((PA.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(PA.TERM_PROGRAM){case"iTerm.app":return g>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(PA.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(PA.TERM)||"COLORTERM"in PA?1:e}function lD(I){let A=eB(I,I&&I.isTTY);return AB(A)}jE.exports={supportsColor:lD,stdout:AB(eB(!0,XE.isatty(1))),stderr:AB(eB(!0,XE.isatty(2)))}}),As=m((OA,CC)=>{"use strict";var wD=require("tty"),IC=require("util");OA.init=RD,OA.log=FD,OA.formatArgs=dD,OA.save=pD,OA.load=SD,OA.useColors=fD,OA.destroy=IC.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),OA.colors=[6,2,3,4,5,1];try{let I=zE();I&&(I.stderr||I).level>=2&&(OA.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}OA.inspectOpts=Object.keys(process.env).filter(I=>/^debug_/i.test(I)).reduce((I,A)=>{let e=A.substring(6).toLowerCase().replace(/_([a-z])/g,(C,t)=>t.toUpperCase()),g=process.env[A];return/^(yes|on|true|enabled)$/i.test(g)?g=!0:/^(no|off|false|disabled)$/i.test(g)?g=!1:g==="null"?g=null:g=Number(g),I[e]=g,I},{});function fD(){return"colors"in OA.inspectOpts?!!OA.inspectOpts.colors:wD.isatty(process.stderr.fd)}function dD(I){let{namespace:A,useColors:e}=this;if(e){let g=this.color,C="\x1B[3"+(g<8?g:"8;5;"+g),t=` ${C};1m${A} \x1B[0m`;I[0]=t+I[0].split(` `).join(` `+t),I.push(C+"m+"+CC.exports.humanize(this.diff)+"\x1B[0m")}else I[0]=yD()+A+" "+I[0]}function yD(){return OA.inspectOpts.hideDate?"":new Date().toISOString()+" "}function FD(...I){return process.stderr.write(IC.formatWithOptions(OA.inspectOpts,...I)+` `)}function pD(I){I?process.env.DEBUG=I:delete process.env.DEBUG}function SD(){return process.env.DEBUG}function RD(I){I.inspectOpts={};let A=Object.keys(OA.inspectOpts);for(let e=0;e<A.length;e++)I.inspectOpts[A[e]]=OA.inspectOpts[A[e]]}CC.exports=$t()(OA);var{formatters:$E}=CC.exports;$E.o=function(I){return this.inspectOpts.colors=this.useColors,IC.inspect(I,this.inspectOpts).split(` `).map(A=>A.trim()).join(" ")},$E.O=function(I){return this.inspectOpts.colors=this.useColors,IC.inspect(I,this.inspectOpts)}}),ae=m((CF,gB)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?gB.exports=WE():gB.exports=As()}),gs=m(es=>{"use strict";var kD=require("url").parse,MD={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},GD=String.prototype.endsWith||function(I){return I.length<=this.length&&t