aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
8 lines • 1.19 MB
JavaScript
"use strict";var za=Object.create,gC=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,Au=Object.getOwnPropertyNames,eu=Object.getPrototypeOf,gu=Object.prototype.hasOwnProperty,Iu=(I,A)=>()=>(I&&(A=I(I=0)),A),N=(I,A)=>()=>(A||I((A={exports:{}}).exports,A),A.exports),_Q=(I,A)=>{for(var e in A)gC(I,e,{get:A[e],enumerable:!0})},XQ=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of Au(A))!gu.call(I,C)&&C!==e&&gC(I,C,{get:()=>A[C],enumerable:!(g=$a(A,C))||g.enumerable});return I},jQ=(I,A,e)=>(e=I!=null?za(eu(I)):{},XQ(A||!I||!I.__esModule?gC(e,"default",{value:I,enumerable:!0}):e,I)),NA=I=>XQ(gC({},"__esModule",{value:!0}),I),iE=N((yF,BE)=>{"use strict";var IC=Object.defineProperty,Cu=Object.getOwnPropertyDescriptor,tu=Object.getOwnPropertyNames,Bu=Object.prototype.hasOwnProperty,CC=(I,A)=>IC(I,"name",{value:A,configurable:!0}),iu=(I,A)=>{for(var e in A)IC(I,e,{get:A[e],enumerable:!0})},Qu=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of tu(A))!Bu.call(I,C)&&C!==e&&IC(I,C,{get:()=>A[C],enumerable:!(g=Cu(A,C))||g.enumerable});return I},Eu=I=>Qu(IC({},"__esModule",{value:!0}),I),zQ={};iu(zQ,{AlgorithmId:()=>gE,EndpointURLScheme:()=>eE,FieldPosition:()=>IE,HttpApiKeyAuthLocation:()=>AE,HttpAuthLocation:()=>$Q,IniSectionType:()=>CE,RequestHandlerProtocol:()=>tE,SMITHY_CONTEXT_KEY:()=>au,getDefaultClientConfiguration:()=>nu,resolveDefaultRuntimeConfig:()=>ou}),BE.exports=Eu(zQ);var $Q=(I=>(I.HEADER="header",I.QUERY="query",I))($Q||{}),AE=(I=>(I.HEADER="header",I.QUERY="query",I))(AE||{}),eE=(I=>(I.HTTP="http",I.HTTPS="https",I))(eE||{}),gE=(I=>(I.MD5="md5",I.CRC32="crc32",I.CRC32C="crc32c",I.SHA1="sha1",I.SHA256="sha256",I))(gE||{}),su=CC(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"),ru=CC(I=>{let A={};return I.checksumAlgorithms().forEach(e=>{A[e.algorithmId()]=e.checksumConstructor()}),A},"resolveChecksumRuntimeConfig"),nu=CC(I=>({...su(I)}),"getDefaultClientConfiguration"),ou=CC(I=>({...ru(I)}),"resolveDefaultRuntimeConfig"),IE=(I=>(I[I.HEADER=0]="HEADER",I[I.TRAILER=1]="TRAILER",I))(IE||{}),au="__smithy_context",CE=(I=>(I.PROFILE="profile",I.SSO_SESSION="sso-session",I.SERVICES="services",I))(CE||{}),tE=(I=>(I.HTTP_0_9="http/0.9",I.HTTP_1_0="http/1.0",I.TDS_8_0="tds/8.0",I))(tE||{})}),DE=N((RF,cE)=>{"use strict";var tC=Object.defineProperty,uu=Object.getOwnPropertyDescriptor,cu=Object.getOwnPropertyNames,Du=Object.prototype.hasOwnProperty,eg=(I,A)=>tC(I,"name",{value:A,configurable:!0}),hu=(I,A)=>{for(var e in A)tC(I,e,{get:A[e],enumerable:!0})},lu=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of cu(A))!Du.call(I,C)&&C!==e&&tC(I,C,{get:()=>A[C],enumerable:!(g=uu(A,C))||g.enumerable});return I},wu=I=>lu(tC({},"__esModule",{value:!0}),I),QE={};hu(QE,{Field:()=>yu,Fields:()=>Fu,HttpRequest:()=>pu,HttpResponse:()=>Su,IHttpRequest:()=>EE.HttpRequest,getHttpHandlerExtensionConfiguration:()=>fu,isValidHostname:()=>uE,resolveHttpHandlerRuntimeConfig:()=>du}),cE.exports=wu(QE);var fu=eg(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"),du=eg(I=>({httpHandler:I.httpHandler()}),"resolveHttpHandlerRuntimeConfig"),EE=iE(),sE=class{constructor({name:A,kind:e=EE.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}};eg(sE,"Field");var yu=sE,rE=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)}};eg(rE,"Fields");var Fu=rE,nE=class jt{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 jt({...A,headers:{...A.headers}});return e.query&&(e.query=oE(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 jt.clone(this)}};eg(nE,"HttpRequest");var pu=nE;function oE(I){return Object.keys(I).reduce((A,e)=>{let g=I[e];return{...A,[e]:Array.isArray(g)?[...g]:g}},{})}eg(oE,"cloneQuery");var aE=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"}};eg(aE,"HttpResponse");var Su=aE;function uE(I){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(I)}eg(uE,"isValidHostname")}),fE=N((kF,wE)=>{"use strict";var BC=Object.defineProperty,Ru=Object.getOwnPropertyDescriptor,ku=Object.getOwnPropertyNames,Mu=Object.prototype.hasOwnProperty,zt=(I,A)=>BC(I,"name",{value:A,configurable:!0}),Gu=(I,A)=>{for(var e in A)BC(I,e,{get:A[e],enumerable:!0})},mu=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of ku(A))!Mu.call(I,C)&&C!==e&&BC(I,C,{get:()=>A[C],enumerable:!(g=Ru(A,C))||g.enumerable});return I},Nu=I=>mu(BC({},"__esModule",{value:!0}),I),hE={};Gu(hE,{escapeUri:()=>lE,escapeUriPath:()=>Lu}),wE.exports=Nu(hE);var lE=zt(I=>encodeURIComponent(I).replace(/[!'()*]/g,Uu),"escapeUri"),Uu=zt(I=>`%${I.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Lu=zt(I=>I.split("/").map(lE).join("/"),"escapeUriPath")}),pE=N((MF,FE)=>{"use strict";var iC=Object.defineProperty,Ju=Object.getOwnPropertyDescriptor,Ku=Object.getOwnPropertyNames,Hu=Object.prototype.hasOwnProperty,bu=(I,A)=>iC(I,"name",{value:A,configurable:!0}),Yu=(I,A)=>{for(var e in A)iC(I,e,{get:A[e],enumerable:!0})},xu=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of Ku(A))!Hu.call(I,C)&&C!==e&&iC(I,C,{get:()=>A[C],enumerable:!(g=Ju(A,C))||g.enumerable});return I},vu=I=>xu(iC({},"__esModule",{value:!0}),I),dE={};Yu(dE,{buildQueryString:()=>yE}),FE.exports=vu(dE);var $t=fE();function yE(I){let A=[];for(let e of Object.keys(I).sort()){let g=I[e];if(e=(0,$t.escapeUri)(e),Array.isArray(g))for(let C=0,t=g.length;C<t;C++)A.push(`${e}=${(0,$t.escapeUri)(g[C])}`);else{let C=e;(g||typeof g=="string")&&(C+=`=${(0,$t.escapeUri)(g)}`),A.push(C)}}return A.join("&")}bu(yE,"buildQueryString")}),qE=N((UF,OE)=>{"use strict";var Tu=Object.create,NI=Object.defineProperty,Pu=Object.getOwnPropertyDescriptor,Ou=Object.getOwnPropertyNames,qu=Object.getPrototypeOf,Vu=Object.prototype.hasOwnProperty,dA=(I,A)=>NI(I,"name",{value:A,configurable:!0}),Wu=(I,A)=>{for(var e in A)NI(I,e,{get:A[e],enumerable:!0})},GE=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of Ou(A))!Vu.call(I,C)&&C!==e&&NI(I,C,{get:()=>A[C],enumerable:!(g=Pu(A,C))||g.enumerable});return I},Zu=(I,A,e)=>(e=I!=null?Tu(qu(I)):{},GE(A||!I||!I.__esModule?NI(e,"default",{value:I,enumerable:!0}):e,I)),_u=I=>GE(NI({},"__esModule",{value:!0}),I),mE={};Wu(mE,{DEFAULT_REQUEST_TIMEOUT:()=>ec,NodeHttp2Handler:()=>Bc,NodeHttpHandler:()=>gc,streamCollector:()=>Qc}),OE.exports=_u(mE);var NE=DE(),UE=pE(),AB=require("http"),eB=require("https"),Xu=["ECONNRESET","EPIPE","ETIMEDOUT"],LE=dA(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"),Be={setTimeout:(I,A)=>setTimeout(I,A),clearTimeout:I=>clearTimeout(I)},SE=1e3,ju=dA((I,A,e=0)=>{if(!e)return-1;let g=dA(C=>{let t=Be.setTimeout(()=>{I.destroy(),A(Object.assign(new Error(`Socket timed out without establishing a connection within ${e} ms`),{name:"TimeoutError"}))},e-C),Q=dA(a=>{a?.connecting?a.on("connect",()=>{Be.clearTimeout(t)}):Be.clearTimeout(t)},"doWithSocket");I.socket?Q(I.socket):I.on("socket",Q)},"registerTimeout");return e<2e3?(g(0),0):Be.setTimeout(g.bind(null,SE),SE)},"setConnectionTimeout"),zu=3e3,$u=dA((I,{keepAlive:A,keepAliveMsecs:e},g=zu)=>{if(A!==!0)return-1;let C=dA(()=>{I.socket?I.socket.setKeepAlive(A,e||0):I.on("socket",t=>{t.setKeepAlive(A,e||0)})},"registerListener");return g===0?(C(),0):Be.setTimeout(C,g)},"setSocketKeepAlive"),RE=3e3,Ac=dA((I,A,e=0)=>{let g=dA(C=>{let t=e-C,Q=dA(()=>{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):Be.setTimeout(g.bind(null,e===0?0:RE),RE)},"setSocketTimeout"),JE=require("stream"),kE=1e3;async function IB(I,A,e=kE){let g=A.headers??{},C=g.Expect||g.expect,t=-1,Q=!0;C==="100-continue"&&(Q=await Promise.race([new Promise(a=>{t=Number(Be.setTimeout(a,Math.max(kE,e)))}),new Promise(a=>{I.on("continue",()=>{Be.clearTimeout(t),a(!0)}),I.on("response",()=>{Be.clearTimeout(t),a(!1)}),I.on("error",()=>{Be.clearTimeout(t),a(!1)})})])),Q&&KE(I,A.body)}dA(IB,"writeRequestBody");function KE(I,A){if(A instanceof JE.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()}dA(KE,"writeBody");var ec=0,HE=class gB{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 gB(A)}static checkSocketUsage(A,e,g=console){var C,t,Q;let{sockets:a,requests:c,maxSockets:l}=A;if(typeof l!="number"||l===1/0||Date.now()-15e3<e)return e;if(a&&c)for(let u in a){let n=((C=a[u])==null?void 0:C.length)??0,B=((t=c[u])==null?void 0:t.length)??0;if(n>=l&&B>=2*l)return(Q=g?.warn)==null||Q.call(g,`@smithy/node-http-handler:WARN - socket usage at capacity=${n} 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||{},a=!0,c=50;return{connectionTimeout:g,requestTimeout:e??C,httpAgent:t instanceof AB.Agent||typeof t?.destroy=="function"?t:new AB.Agent({keepAlive:a,maxSockets:c,...t}),httpsAgent:Q instanceof eB.Agent||typeof Q?.destroy=="function"?Q:new eB.Agent({keepAlive:a,maxSockets:c,...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=[],a=dA(async y=>{await t,Q.forEach(Be.clearTimeout),g(y)},"resolve"),c=dA(async y=>{await t,Q.forEach(Be.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",c(y);return}let l=A.protocol==="https:",o=l?this.config.httpsAgent:this.config.httpAgent;Q.push(Be.setTimeout(()=>{this.socketWarningTimestamp=gB.checkSocketUsage(o,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2e3)+(this.config.connectionTimeout??1e3)));let u=(0,UE.buildQueryString)(A.query||{}),n;if(A.username!=null||A.password!=null){let y=A.username??"",F=A.password??"";n=`${y}:${F}`}let B=A.path;u&&(B+=`?${u}`),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:o,auth:n},D=(l?eB.request:AB.request)(E,y=>{let F=new NE.HttpResponse({statusCode:y.statusCode||-1,reason:y.statusMessage,headers:LE(y.headers),body:y});a({response:F})});if(D.on("error",y=>{Xu.includes(y.code)?c(Object.assign(y,{name:"TimeoutError"})):c(y)}),e){let y=dA(()=>{D.destroy();let F=new Error("Request aborted");F.name="AbortError",c(F)},"onAbort");if(typeof e.addEventListener=="function"){let F=e;F.addEventListener("abort",y,{once:!0}),D.once("close",()=>F.removeEventListener("abort",y))}else e.onabort=y}Q.push(ju(D,c,this.config.connectionTimeout)),Q.push(Ac(D,c,this.config.requestTimeout));let w=E.agent;typeof w=="object"&&"keepAlive"in w&&Q.push($u(D,{keepAlive:w.keepAlive,keepAliveMsecs:w.keepAliveMsecs})),t=IB(D,A,this.config.requestTimeout).catch(y=>(Q.forEach(Be.clearTimeout),C(y)))})}updateHttpClientConfig(A,e){this.config=void 0,this.configProvider=this.configProvider.then(g=>({...g,[A]:e}))}httpHandlerConfigs(){return this.config??{}}};dA(HE,"NodeHttpHandler");var gc=HE,ME=require("http2"),Ic=Zu(require("http2")),bE=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())}};dA(bE,"NodeHttp2ConnectionPool");var Cc=bE,YE=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 c=C.poll();if(c&&!this.config.disableConcurrency)return c}let t=Ic.default.connect(g);this.config.maxConcurrency&&t.settings({maxConcurrentStreams:this.config.maxConcurrency},c=>{if(c)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+A.destination.toString())}),t.unref();let Q=dA(()=>{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 a=this.sessionCache.get(g)||new Cc;return a.offerLast(t),this.sessionCache.set(g,a),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()}};dA(YE,"NodeHttp2ConnectionManager");var tc=YE,xE=class vE{constructor(A){this.metadata={handlerProtocol:"h2"},this.connectionManager=new tc({}),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 vE(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 a;let c=!1,l,o=dA(async H=>{await l,t(H)},"resolve"),u=dA(async H=>{await l,Q(H)},"reject");if(e?.aborted){c=!0;let H=new Error("Request aborted");H.name="AbortError",u(H);return}let{hostname:n,method:B,port:i,protocol:E,query:s}=A,D="";if(A.username!=null||A.password!=null){let H=A.username??"",Z=A.password??"";D=`${H}:${Z}@`}let w=`${E}//${D}${n}${i?`:${i}`:""}`,y={destination:new URL(w)},F=this.connectionManager.lease(y,{requestTimeout:(a=this.config)==null?void 0:a.sessionTimeout,disableConcurrentStreams:C||!1}),S=dA(H=>{C&&this.destroySession(F),c=!0,u(H)},"rejectWithDestroy"),k=(0,UE.buildQueryString)(s||{}),M=A.path;k&&(M+=`?${k}`),A.fragment&&(M+=`#${A.fragment}`);let Y=F.request({...A.headers,[ME.constants.HTTP2_HEADER_PATH]:M,[ME.constants.HTTP2_HEADER_METHOD]:B});if(F.ref(),Y.on("response",H=>{let Z=new NE.HttpResponse({statusCode:H[":status"]||-1,headers:LE(H),body:Y});c=!0,o({response:Z}),C&&(F.close(),this.connectionManager.deleteSession(w,F))}),g&&Y.setTimeout(g,()=>{Y.close();let H=new Error(`Stream timed out because of no activity for ${g} ms`);H.name="TimeoutError",S(H)}),e){let H=dA(()=>{Y.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}),Y.once("close",()=>Z.removeEventListener("abort",H))}else e.onabort=H}Y.on("frameError",(H,Z,W)=>{S(new Error(`Frame type id ${H} in stream id ${W} has failed with code ${Z}.`))}),Y.on("error",S),Y.on("aborted",()=>{S(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${Y.rstCode}.`))}),Y.on("close",()=>{F.unref(),C&&F.destroy(),c||S(new Error("Unexpected error: http2 request did not get a response"))}),l=IB(Y,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()}};dA(xE,"NodeHttp2Handler");var Bc=xE,TE=class extends JE.Writable{constructor(){super(...arguments),this.bufferedBytes=[]}_write(A,e,g){this.bufferedBytes.push(A),g()}};dA(TE,"Collector");var ic=TE,Qc=dA(I=>Ec(I)?PE(I):new Promise((A,e)=>{let g=new ic;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"),Ec=dA(I=>typeof ReadableStream=="function"&&I instanceof ReadableStream,"isReadableStreamInstance");async function PE(I){let A=[],e=I.getReader(),g=!1,C=0;for(;!g;){let{done:a,value:c}=await e.read();c&&(A.push(c),C+=c.length),g=a}let t=new Uint8Array(C),Q=0;for(let a of A)t.set(a,Q),Q+=a.length;return t}dA(PE,"collectReadableStream")}),XE=N((KF,_E)=>{"use strict";var UI=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,sc=typeof AbortController=="function",QC=sc?AbortController:class{constructor(){this.signal=new VE}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})}},rc=typeof AbortSignal=="function",nc=typeof QC.AbortSignal=="function",VE=rc?AbortSignal:nc?QC.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))}},iB=new Set,CB=(I,A)=>{let e=`LRU_CACHE_OPTION_${I}`;EC(e)&&QB(e,`${I} option`,`options.${A}`,Jg)},tB=(I,A)=>{let e=`LRU_CACHE_METHOD_${I}`;if(EC(e)){let{prototype:g}=Jg,{get:C}=Object.getOwnPropertyDescriptor(g,I);QB(e,`${I} method`,`cache.${A}()`,C)}},oc=(I,A)=>{let e=`LRU_CACHE_PROPERTY_${I}`;if(EC(e)){let{prototype:g}=Jg,{get:C}=Object.getOwnPropertyDescriptor(g,I);QB(e,`${I} property`,`cache.${A}`,C)}},WE=(...I)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...I):console.error(...I)},EC=I=>!iB.has(I),QB=(I,A,e,g)=>{iB.add(I);let C=`The ${A} is deprecated. Please use ${e} instead.`;WE(C,"DeprecationWarning",I,g)},gg=I=>I&&I===Math.floor(I)&&I>0&&isFinite(I),ZE=I=>gg(I)?I<=Math.pow(2,8)?Uint8Array:I<=Math.pow(2,16)?Uint16Array:I<=Math.pow(2,32)?Uint32Array:I<=Number.MAX_SAFE_INTEGER?Lg:null:null,Lg=class extends Array{constructor(A){super(A),this.fill(0)}},BB=class{constructor(A){if(A===0)return[];let e=ZE(A);this.heap=new e(A),this.length=0}push(A){this.heap[this.length++]=A}pop(){return this.heap[--this.length]}},Jg=class I{constructor(A={}){let{max:e=0,ttl:g,ttlResolution:C=1,ttlAutopurge:t,updateAgeOnGet:Q,updateAgeOnHas:a,allowStale:c,dispose:l,disposeAfter:o,noDisposeOnSet:u,noUpdateTTL:n,maxSize:B=0,maxEntrySize:i=0,sizeCalculation:E,fetchMethod:s,fetchContext:D,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:F,allowStaleOnFetchAbort:S,ignoreFetchAbort:k}=A,{length:M,maxAge:Y,stale:H}=A instanceof I?{}:A;if(e!==0&&!gg(e))throw new TypeError("max option must be a nonnegative integer");let Z=e?ZE(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=D,!this.fetchMethod&&D!==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 BB(e),this.initialFill=1,this.size=0,typeof l=="function"&&(this.dispose=l),typeof o=="function"?(this.disposeAfter=o,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!u,this.noUpdateTTL=!!n,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!F,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.maxSize!==0&&!gg(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!gg(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!c||!!H,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!Q,this.updateAgeOnHas=!!a,this.ttlResolution=gg(C)||C===0?C:1,this.ttlAutopurge=!!t,this.ttl=g||Y||0,this.ttl){if(!gg(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";EC(W)&&(iB.add(W),WE("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",W,I))}H&&CB("stale","allowStale"),Y&&CB("maxAge","ttl"),M&&CB("length","sizeCalculation")}getRemainingTTL(A){return this.has(A,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Lg(this.max),this.starts=new Lg(this.max),this.setItemTTL=(g,C,t=UI.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?UI.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=UI.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 Lg(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(!gg(g))if(C){if(typeof C!="function")throw new TypeError("sizeCalculation must be a function");if(g=C(e,A),!gg(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 tB("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 a=UI.now()-this.starts[e];Q.start=Math.floor(Date.now()-a)}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=UI.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:a=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,status:l}={}){if(Q=this.requireSize(A,e,Q,a),this.maxEntrySize&&Q>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(A),this;let o=this.size===0?void 0:this.keyMap.get(A);if(o===void 0)o=this.newIndex(),this.keyList[o]=A,this.valList[o]=e,this.keyMap.set(A,o),this.next[this.tail]=o,this.prev[o]=this.tail,this.tail=o,this.size++,this.addItemSize(o,Q,l),l&&(l.set="add"),c=!1;else{this.moveToTail(o);let u=this.valList[o];if(e!==u){if(this.isBackgroundFetch(u)?u.__abortController.abort(new Error("replaced")):t||(this.dispose(u,A,"set"),this.disposeAfter&&this.disposed.push([u,A,"set"])),this.removeItemSize(o),this.valList[o]=e,this.addItemSize(o,Q,l),l){l.set="replace";let n=u&&this.isBackgroundFetch(u)?u.__staleWhileFetching:u;n!==void 0&&(l.oldValue=n)}}else l&&(l.set="update")}if(g!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),c||this.setItemTTL(o,g,C),this.statusTTL(l,o),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 QC;g.signal&&g.signal.addEventListener("abort",()=>Q.abort(g.signal.reason));let a={signal:Q.signal,options:g,context:C},c=(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?o(Q.signal.reason):(this.valList[e]===n&&(B===void 0?n.__staleWhileFetching?this.valList[e]=n.__staleWhileFetching:this.delete(A):(g.status&&(g.status.fetchUpdated=!0),this.set(A,B,a.options))),B)},l=B=>(g.status&&(g.status.fetchRejected=!0,g.status.fetchError=B),o(B)),o=B=>{let{aborted:i}=Q.signal,E=i&&g.allowStaleOnFetchAbort,s=E||g.allowStaleOnFetchRejection,D=s||g.noDeleteOnFetchRejection;if(this.valList[e]===n&&(!D||n.__staleWhileFetching===void 0?this.delete(A):E||(this.valList[e]=n.__staleWhileFetching)),s)return g.status&&n.__staleWhileFetching!==void 0&&(g.status.returnedStale=!0),n.__staleWhileFetching;if(n.__returned===n)throw B},u=(B,i)=>{this.fetchMethod(A,t,a).then(E=>B(E),i),Q.signal.addEventListener("abort",()=>{(!g.ignoreFetchAbort||g.allowStaleOnFetchAbort)&&(B(),g.allowStaleOnFetchAbort&&(B=E=>c(E,!0)))})};g.status&&(g.status.fetchDispatched=!0);let n=new Promise(u).then(c,l);return n.__abortController=Q,n.__staleWhileFetching=t,n.__returned=null,e===void 0?(this.set(A,n,{...a.options,status:void 0}),e=this.keyMap.get(A)):this.valList[e]=n,n}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:a=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:o=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:n=this.ignoreFetchAbort,allowStaleOnFetchAbort:B=this.allowStaleOnFetchAbort,fetchContext:i=this.fetchContext,forceRefresh:E=!1,status:s,signal:D}={}){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:a,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:o,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:B,ignoreFetchAbort:n,status:s,signal:D},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,Y=M&&e;return s&&(s.fetch=M&&S?"stale":"refresh",Y&&S&&(s.returnedStale=!0)),Y?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 a=this.valList[Q],c=this.isBackgroundFetch(a);return this.statusTTL(t,Q),this.isStale(Q)?(t&&(t.get="stale"),c?(t&&(t.returnedStale=e&&a.__staleWhileFetching!==void 0),e?a.__staleWhileFetching:void 0):(C||this.delete(A),t&&(t.returnedStale=e),e?a:void 0)):(t&&(t.get="hit"),c?a.__staleWhileFetching:(this.moveToTail(Q),g&&this.updateItemAge(Q),a))}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 tB("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 tB("reset","clear"),this.clear}get length(){return oc("length","size"),this.size}static get AbortController(){return QC}static get AbortSignal(){return VE}};_E.exports=Jg}),$E=N(ie=>{"use strict";var ac=ie&&ie.__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]})),uc=ie&&ie.__setModuleDefault||(Object.create?(function(I,A){Object.defineProperty(I,"default",{enumerable:!0,value:A})}):function(I,A){I.default=A}),jE=ie&&ie.__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)&&ac(A,I,e);return uc(A,I),A};Object.defineProperty(ie,"__esModule",{value:!0}),ie.req=ie.json=ie.toBuffer=void 0;var cc=jE(require("http")),Dc=jE(require("https"));async function zE(I){let A=0,e=[];for await(let g of I)A+=g.length,e.push(g);return Buffer.concat(e,A)}ie.toBuffer=zE;async function hc(I){let e=(await zE(I)).toString("utf8");try{return JSON.parse(e)}catch(g){let C=g;throw C.message+=` (input: ${e})`,C}}ie.json=hc;function lc(I,A={}){let g=((typeof I=="string"?I:I.href).startsWith("https:")?Dc:cc).request(I,A),C=new Promise((t,Q)=>{g.once("response",t).once("error",Q).end()});return g.then=C.then.bind(C),g}ie.req=lc}),Kg=N(re=>{"use strict";var es=re&&re.__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]})),wc=re&&re.__setModuleDefault||(Object.create?(function(I,A){Object.defineProperty(I,"default",{enumerable:!0,value:A})}):function(I,A){I.default=A}),gs=re&&re.__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)&&es(A,I,e);return wc(A,I),A},fc=re&&re.__exportStar||function(I,A){for(var e in I)e!=="default"&&!Object.prototype.hasOwnProperty.call(A,e)&&es(A,I,e)};Object.defineProperty(re,"__esModule",{value:!0}),re.Agent=void 0;var dc=gs(require("net")),As=gs(require("http")),yc=require("https");fc($E(),re);var Ue=Symbol("AgentBaseInternalState"),EB=class extends As.Agent{constructor(A){super(A),this[Ue]={}}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 dc.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)?yc.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(a=>{if(this.decrementSockets(t,Q),a instanceof As.Agent)try{return a.addRequest(A,C)}catch(c){return g(c)}this[Ue].currentSocket=a,super.createSocket(A,e,g)},a=>{this.decrementSockets(t,Q),g(a)})}createConnection(){let A=this[Ue].currentSocket;if(this[Ue].currentSocket=void 0,!A)throw new Error("No socket was returned in the `connect()` function");return A}get defaultPort(){return this[Ue].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(A){this[Ue]&&(this[Ue].defaultPort=A)}get protocol(){return this[Ue].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(A){this[Ue]&&(this[Ue].protocol=A)}};re.Agent=EB}),Cs=N((YF,Is)=>{"use strict";var Hg=1e3,bg=Hg*60,Yg=bg*60,Dg=Yg*24,Fc=Dg*7,pc=Dg*365.25;Is.exports=function(I,A){A=A||{};var e=typeof I;if(e==="string"&&I.length>0)return Sc(I);if(e==="number"&&isFinite(I))return A.long?kc(I):Rc(I);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(I))};function Sc(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*pc;case"weeks":case"week":case"w":return e*Fc;case"days":case"day":case"d":return e*Dg;case"hours":case"hour":case"hrs":case"hr":case"h":return e*Yg;case"minutes":case"minute":case"mins":case"min":case"m":return e*bg;case"seconds":case"second":case"secs":case"sec":case"s":return e*Hg;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}function Rc(I){var A=Math.abs(I);return A>=Dg?Math.round(I/Dg)+"d":A>=Yg?Math.round(I/Yg)+"h":A>=bg?Math.round(I/bg)+"m":A>=Hg?Math.round(I/Hg)+"s":I+"ms"}function kc(I){var A=Math.abs(I);return A>=Dg?sC(I,A,Dg,"day"):A>=Yg?sC(I,A,Yg,"hour"):A>=bg?sC(I,A,bg,"minute"):A>=Hg?sC(I,A,Hg,"second"):I+" ms"}function sC(I,A,e,g){var C=A>=e*1.5;return Math.round(I/e)+" "+g+(C?"s":"")}}),sB=N((xF,ts)=>{"use strict";function Mc(I){e.debug=e,e.default=e,e.coerce=c,e.disable=Q,e.enable=C,e.enabled=a,e.humanize=Cs(),e.destroy=l,Object.keys(I).forEach(o=>{e[o]=I[o]}),e.names=[],e.skips=[],e.formatters={};function A(o){let u=0;for(let n=0;n<o.length;n++)u=(u<<5)-u+o.charCodeAt(n),u|=0;return e.colors[Math.abs(u)%e.colors.length]}e.selectColor=A;function e(o){let u,n=null,B,i;function E(...s){if(!E.enabled)return;let D=E,w=Number(new Date),y=w-(u||w);D.diff=y,D.prev=u,D.curr=w,u=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 Y=e.formatters[M];if(typeof Y=="function"){let H=s[F];k=Y.call(D,H),s.splice(F,1),F--}return k}),e.formatArgs.call(D,s),(D.log||e.log).apply(D,s)}return E.namespace=o,E.useColors=e.useColors(),E.color=e.selectColor(o),E.extend=g,E.destroy=e.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>n!==null?n:(B!==e.namespaces&&(B=e.namespaces,i=e.enabled(o)),i),set:s=>{n=s}}),typeof e.init=="function"&&e.init(E),E}function g(o,u){let n=e(this.namespace+(typeof u>"u"?":":u)+o);return n.log=this.log,n}function C(o){e.save(o),e.namespaces=o,e.names=[],e.skips=[];let u=(typeof o=="string"?o:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let n of u)n[0]==="-"?e.skips.push(n.slice(1)):e.names.push(n)}function t(o,u){let n=0,B=0,i=-1,E=0;for(;n<o.length;)if(B<u.length&&(u[B]===o[n]||u[B]==="*"))u[B]==="*"?(i=B,E=n,B++):(n++,B++);else if(i!==-1)B=i+1,E++,n=E;else return!1;for(;B<u.length&&u[B]==="*";)B++;return B===u.length}function Q(){let o=[...e.names,...e.skips.map(u=>"-"+u)].join(",");return e.enable(""),o}function a(o){for(let u of e.skips)if(t(o,u))return!1;for(let u of e.names)if(t(o,u))return!0;return!1}function c(o){return o instanceof Error?o.stack||o.message:o}function l(){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}ts.exports=Mc}),Bs=N((Qe,rC)=>{"use strict";Qe.formatArgs=mc,Qe.save=Nc,Qe.load=Uc,Qe.useColors=Gc,Qe.storage=Lc(),Qe.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`."))}})(),Qe.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 Gc(){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 mc(I){if(I[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+I[0]+(this.useColors?"%c ":" ")+"+"+rC.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)}Qe.log=console.debug||console.log||(()=>{});function Nc(I){try{I?Qe.storage.setItem("debug",I):Qe.storage.removeItem("debug")}catch{}}function Uc(){let I;try{I=Qe.storage.getItem("debug")||Qe.storage.getItem("DEBUG")}catch{}return!I&&typeof process<"u"&&"env"in process&&(I=process.env.DEBUG),I}function Lc(){try{return localStorage}catch{}}rC.exports=sB()(Qe);var{formatters:Jc}=rC.exports;Jc.j=function(I){try{return JSON.stringify(I)}catch(A){return"[UnexpectedJSONParseError]: "+A.message}}}),Qs=N((vF,is)=>{"use strict";is.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)}}),rs=N((TF,ss)=>{"use strict";var Kc=require("os"),Es=require("tty"),ue=Qs(),{env:PA}=process,Ig;ue("no-color")||ue("no-colors")||ue("color=false")||ue("color=never")?Ig=0:(ue("color")||ue("colors")||ue("color=true")||ue("color=always"))&&(Ig=1),"FORCE_COLOR"in PA&&(PA.FORCE_COLOR==="true"?Ig=1:PA.FORCE_COLOR==="false"?Ig=0:Ig=PA.FORCE_COLOR.length===0?1:Math.min(parseInt(PA.FORCE_COLOR,10),3));function rB(I){return I===0?!1:{level:I,hasBasic:!0,has256:I>=2,has16m:I>=3}}function nB(I,A){if(Ig===0)return 0;if(ue("color=16m")||ue("color=full")||ue("color=truecolor"))return 3;if(ue("color=256"))return 2;if(I&&!A&&Ig===void 0)return 0;let e=Ig||0;if(PA.TERM==="dumb")return e;if(process.platform==="win32"){let g=Kc.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 Hc(I){let A=nB(I,I&&I.isTTY);return rB(A)}ss.exports={supportsColor:Hc,stdout:rB(nB(!0,Es.isatty(1))),stderr:rB(nB(!0,Es.isatty(2)))}}),os=N((OA,oC)=>{"use strict";var bc=require("tty"),nC=require("util");OA.init=qc,OA.log=Tc,OA.formatArgs=xc,OA.save=Pc,OA.load=Oc,OA.useColors=Yc,OA.destroy=nC.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=rs();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 Yc(){return"colors"in OA.inspectOpts?!!OA.inspectOpts.colors:bc.isatty(process.stderr.fd)}function xc(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+"+oC.exports.humanize(this.diff)+"\x1B[0m")}else I[0]=vc()+A+" "+I[0]}function vc(){return OA.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Tc(...I){return process.stderr.write(nC.formatWithOptions(OA.inspectOpts,...I)+`
`)}function Pc(I){I?process.env.DEBUG=I:delete process.env.DEBUG}function Oc(){return process.env.DEBUG}function qc(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]]}oC.exports=sB()(OA);var{formatters:ns}=oC.exports;ns.o=function(I){return this.inspectOpts.colors=this.useColors,nC.inspect(I,this.inspectOpts).split(`
`).map(A=>A.trim()).join(" ")},ns.O=function(I){return this.inspectOpts.colors=this.useColors,nC.inspect(I,this.inspectOpts)}}),ce=N((PF,oB)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?oB.exports=Bs():oB.exports=os()}),us=N(as=>{"use strict";var Vc=require("url").parse,Wc={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Zc=String.prototype.endsWith||function(I){return I.length<=this.length&&t